- 0.121.6 (latest)
- 0.121.5
- 0.120.1
- 0.119.0
- 0.118.3
- 0.117.0
- 0.116.0
- 0.115.1
- 0.114.0
- 0.113.0
- 0.112.2
- 0.111.0
- 0.110.10
- 0.109.0
- 0.108.0
- 0.107.0
- 0.106.0
- 0.105.0
- 0.104.0
- 0.103.0
- 0.102.1
- 0.101.1
- 0.100.2
- 0.99.0
- 0.98.0
- 0.97.0
- 0.96.0
- 0.95.0
- 0.94.1
- 0.93.3
- 0.92.3
- 0.91.1
- 0.90.0
- 0.89.0
- 0.88.0
- 0.87.0
- 0.86.0
- 0.85.0
- 0.84.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
Package errorreporting is an auto-generated package for the Cloud Error Reporting API.
Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.
Functions
func DefaultAuthScopes
func
DefaultAuthScopes
()
[]
string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
func ErrorStatsProjectPath (deprecated)
ErrorStatsProjectPath returns the path for the project resource.
Deprecated: Use fmt.Sprintf("projects/%s", project) instead.
func ReportErrorsProjectPath (deprecated)
ReportErrorsProjectPath returns the path for the project resource.
Deprecated: Use fmt.Sprintf("projects/%s", project) instead.
func ResultPath (deprecated)
ResultPath returns the path for the result resource.
Deprecated: Use fmt.Sprintf("inspect/results/%s", result) instead.
ErrorEventIterator
type
ErrorEventIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
clouderrorreportingpb
.
ErrorEvent
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
ErrorEventIterator manages a stream of *clouderrorreportingpb.ErrorEvent.
func (*ErrorEventIterator) Next
func
(
it
*
ErrorEventIterator
)
Next
()
(
*
clouderrorreportingpb
.
ErrorEvent
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ErrorEventIterator) PageInfo
func
(
it
*
ErrorEventIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
ErrorGroupCallOptions
type
ErrorGroupCallOptions
struct
{
GetGroup
[]
gax
.
CallOption
UpdateGroup
[]
gax
.
CallOption
}
ErrorGroupCallOptions contains the retry settings for each method of ErrorGroupClient.
ErrorGroupClient
type
ErrorGroupClient
struct
{
// The call options for this service.
CallOptions
*
ErrorGroupCallOptions
// contains filtered or unexported fields
}
ErrorGroupClient is a client for interacting with Cloud Error Reporting API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func NewErrorGroupClient
func
NewErrorGroupClient
(
ctx
context
.
Context
,
opts
...
option
.
ClientOption
)
(
*
ErrorGroupClient
,
error
)
NewErrorGroupClient creates a new error group service client.
Service for retrieving and updating individual error groups.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorGroupClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use client.
_
=
c
}
func (*ErrorGroupClient) Close
func
(
c
*
ErrorGroupClient
)
Close
()
error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ErrorGroupClient) Connection
func
(
c
*
ErrorGroupClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ErrorGroupClient) GetGroup
func
(
c
*
ErrorGroupClient
)
GetGroup
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
GetGroupRequest
,
opts
...
gax
.
CallOption
)
(
*
clouderrorreportingpb
.
ErrorGroup
,
error
)
GetGroup get the specified group.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorGroupClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
GetGroupRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
GetGroup
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*ErrorGroupClient) SetGoogleClientInfo
func
(
egc
*
ErrorGroupClient
)
SetGoogleClientInfo
(
keyval
string
)
SetGoogleClientInfo sets the name and version of the application in
the x-goog-api-client
header passed on each request. Also passes any
provided key-value pairs. Intended for use by Google-written clients.
Internal use only.
func (*ErrorGroupClient) UpdateGroup
func
(
c
*
ErrorGroupClient
)
UpdateGroup
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
UpdateGroupRequest
,
opts
...
gax
.
CallOption
)
(
*
clouderrorreportingpb
.
ErrorGroup
,
error
)
UpdateGroup replace the data for the specified group. Fails if the group does not exist.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorGroupClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
UpdateGroupRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
UpdateGroup
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
ErrorGroupStatsIterator
type
ErrorGroupStatsIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
clouderrorreportingpb
.
ErrorGroupStats
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
ErrorGroupStatsIterator manages a stream of *clouderrorreportingpb.ErrorGroupStats.
func (*ErrorGroupStatsIterator) Next
func
(
it
*
ErrorGroupStatsIterator
)
Next
()
(
*
clouderrorreportingpb
.
ErrorGroupStats
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ErrorGroupStatsIterator) PageInfo
func
(
it
*
ErrorGroupStatsIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
ErrorStatsCallOptions
type
ErrorStatsCallOptions
struct
{
ListGroupStats
[]
gax
.
CallOption
ListEvents
[]
gax
.
CallOption
DeleteEvents
[]
gax
.
CallOption
}
ErrorStatsCallOptions contains the retry settings for each method of ErrorStatsClient.
ErrorStatsClient
type
ErrorStatsClient
struct
{
// The call options for this service.
CallOptions
*
ErrorStatsCallOptions
// contains filtered or unexported fields
}
ErrorStatsClient is a client for interacting with Cloud Error Reporting API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func NewErrorStatsClient
func
NewErrorStatsClient
(
ctx
context
.
Context
,
opts
...
option
.
ClientOption
)
(
*
ErrorStatsClient
,
error
)
NewErrorStatsClient creates a new error stats service client.
An API for retrieving and managing error statistics as well as data for individual events.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorStatsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use client.
_
=
c
}
func (*ErrorStatsClient) Close
func
(
c
*
ErrorStatsClient
)
Close
()
error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ErrorStatsClient) Connection
func
(
c
*
ErrorStatsClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ErrorStatsClient) DeleteEvents
func
(
c
*
ErrorStatsClient
)
DeleteEvents
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
DeleteEventsRequest
,
opts
...
gax
.
CallOption
)
(
*
clouderrorreportingpb
.
DeleteEventsResponse
,
error
)
DeleteEvents deletes all error events of a given project.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorStatsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
DeleteEventsRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
DeleteEvents
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*ErrorStatsClient) ListEvents
func
(
c
*
ErrorStatsClient
)
ListEvents
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
ListEventsRequest
,
opts
...
gax
.
CallOption
)
*
ErrorEventIterator
ListEvents lists the specified events.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
"google.golang.org/api/iterator"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
// import "google.golang.org/api/iterator"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorStatsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
ListEventsRequest
{
// TODO: Fill request struct fields.
}
it
:=
c
.
ListEvents
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*ErrorStatsClient) ListGroupStats
func
(
c
*
ErrorStatsClient
)
ListGroupStats
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
ListGroupStatsRequest
,
opts
...
gax
.
CallOption
)
*
ErrorGroupStatsIterator
ListGroupStats lists the specified groups.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
"google.golang.org/api/iterator"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
// import "google.golang.org/api/iterator"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewErrorStatsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
ListGroupStatsRequest
{
// TODO: Fill request struct fields.
}
it
:=
c
.
ListGroupStats
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*ErrorStatsClient) SetGoogleClientInfo
func
(
esc
*
ErrorStatsClient
)
SetGoogleClientInfo
(
keyval
string
)
SetGoogleClientInfo sets the name and version of the application in
the x-goog-api-client
header passed on each request. Also passes any
provided key-value pairs. Intended for use by Google-written clients.
Internal use only.
ReportErrorsCallOptions
type
ReportErrorsCallOptions
struct
{
ReportErrorEvent
[]
gax
.
CallOption
}
ReportErrorsCallOptions contains the retry settings for each method of ReportErrorsClient.
ReportErrorsClient
type
ReportErrorsClient
struct
{
// The call options for this service.
CallOptions
*
ReportErrorsCallOptions
// contains filtered or unexported fields
}
ReportErrorsClient is a client for interacting with Cloud Error Reporting API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func NewReportErrorsClient
func
NewReportErrorsClient
(
ctx
context
.
Context
,
opts
...
option
.
ClientOption
)
(
*
ReportErrorsClient
,
error
)
NewReportErrorsClient creates a new report errors service client.
An API for reporting error events.
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewReportErrorsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use client.
_
=
c
}
func (*ReportErrorsClient) Close
func
(
c
*
ReportErrorsClient
)
Close
()
error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ReportErrorsClient) Connection
func
(
c
*
ReportErrorsClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ReportErrorsClient) ReportErrorEvent
func
(
c
*
ReportErrorsClient
)
ReportErrorEvent
(
ctx
context
.
Context
,
req
*
clouderrorreportingpb
.
ReportErrorEventRequest
,
opts
...
gax
.
CallOption
)
(
*
clouderrorreportingpb
.
ReportErrorEventResponse
,
error
)
ReportErrorEvent report an individual error event.
This endpoint accepts either an OAuth token, or an API key (at https://support.google.com/cloud/answer/6158862 ) for authentication. To use an API key, append it to the URL as the value of a key parameter. For example:
Example
package
main
import
(
"context"
errorreporting
"cloud.google.com/go/errorreporting/apiv1beta1"
clouderrorreportingpb
"google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
)
func
main
()
{
// import clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
ctx
:=
context
.
Background
()
c
,
err
:=
errorreporting
.
NewReportErrorsClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
req
:=
& clouderrorreportingpb
.
ReportErrorEventRequest
{
// TODO: Fill request struct fields.
}
resp
,
err
:=
c
.
ReportErrorEvent
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*ReportErrorsClient) SetGoogleClientInfo
func
(
rec
*
ReportErrorsClient
)
SetGoogleClientInfo
(
keyval
string
)
SetGoogleClientInfo sets the name and version of the application in
the x-goog-api-client
header passed on each request. Also passes any
provided key-value pairs. Intended for use by Google-written clients.
Internal use only.