go: cloud.google.com/go/irm/apiv1alpha2 Index | Examples | Files

package irm

import "cloud.google.com/go/irm/apiv1alpha2"

Package irm is an auto-generated package for the Stackdriver Incident Response & Management API.

NOTE: This package is in alpha. It is not stable, and is likely to change.

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 godoc.org/cloud.google.com/go.

Index

Examples

Package Files

doc.go incident_client.go

func DefaultAuthScopes Uses

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

type AnnotationIterator Uses

type AnnotationIterator struct {

    // 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 []*irmpb.Annotation, nextPageToken string, err error)
    // contains filtered or unexported fields
}

AnnotationIterator manages a stream of *irmpb.Annotation.

func (*AnnotationIterator) Next Uses

func (it *AnnotationIterator) Next() (*irmpb.Annotation, 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 (*AnnotationIterator) PageInfo Uses

func (it *AnnotationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ArtifactIterator Uses

type ArtifactIterator struct {

    // 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 []*irmpb.Artifact, nextPageToken string, err error)
    // contains filtered or unexported fields
}

ArtifactIterator manages a stream of *irmpb.Artifact.

func (*ArtifactIterator) Next Uses

func (it *ArtifactIterator) Next() (*irmpb.Artifact, 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 (*ArtifactIterator) PageInfo Uses

func (it *ArtifactIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type IncidentCallOptions Uses

type IncidentCallOptions struct {
    CreateIncident               []gax.CallOption
    GetIncident                  []gax.CallOption
    SearchIncidents              []gax.CallOption
    UpdateIncident               []gax.CallOption
    SearchSimilarIncidents       []gax.CallOption
    CreateAnnotation             []gax.CallOption
    ListAnnotations              []gax.CallOption
    CreateTag                    []gax.CallOption
    DeleteTag                    []gax.CallOption
    ListTags                     []gax.CallOption
    CreateSignal                 []gax.CallOption
    SearchSignals                []gax.CallOption
    GetSignal                    []gax.CallOption
    LookupSignal                 []gax.CallOption
    UpdateSignal                 []gax.CallOption
    EscalateIncident             []gax.CallOption
    CreateArtifact               []gax.CallOption
    ListArtifacts                []gax.CallOption
    UpdateArtifact               []gax.CallOption
    DeleteArtifact               []gax.CallOption
    SendShiftHandoff             []gax.CallOption
    CreateSubscription           []gax.CallOption
    UpdateSubscription           []gax.CallOption
    ListSubscriptions            []gax.CallOption
    DeleteSubscription           []gax.CallOption
    CreateIncidentRoleAssignment []gax.CallOption
    DeleteIncidentRoleAssignment []gax.CallOption
    ListIncidentRoleAssignments  []gax.CallOption
    RequestIncidentRoleHandover  []gax.CallOption
    ConfirmIncidentRoleHandover  []gax.CallOption
    ForceIncidentRoleHandover    []gax.CallOption
    CancelIncidentRoleHandover   []gax.CallOption
}

IncidentCallOptions contains the retry settings for each method of IncidentClient.

type IncidentClient Uses

type IncidentClient struct {

    // The call options for this service.
    CallOptions *IncidentCallOptions
    // contains filtered or unexported fields
}

IncidentClient is a client for interacting with Stackdriver Incident Response & Management API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewIncidentClient Uses

func NewIncidentClient(ctx context.Context, opts ...option.ClientOption) (*IncidentClient, error)

NewIncidentClient creates a new incident service client.

The Incident API for Incident Response & Management.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use client.
_ = c

func (*IncidentClient) CancelIncidentRoleHandover Uses

func (c *IncidentClient) CancelIncidentRoleHandover(ctx context.Context, req *irmpb.CancelIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)

CancelIncidentRoleHandover cancels a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CancelIncidentRoleHandoverRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CancelIncidentRoleHandover(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) Close Uses

func (c *IncidentClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*IncidentClient) ConfirmIncidentRoleHandover Uses

func (c *IncidentClient) ConfirmIncidentRoleHandover(ctx context.Context, req *irmpb.ConfirmIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)

ConfirmIncidentRoleHandover confirms a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request. If the caller is not the new_assignee, ForceIncidentRoleHandover should be used instead.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ConfirmIncidentRoleHandoverRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.ConfirmIncidentRoleHandover(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) Connection Uses

func (c *IncidentClient) Connection() *grpc.ClientConn

Connection returns the client's connection to the API service.

func (*IncidentClient) CreateAnnotation Uses

func (c *IncidentClient) CreateAnnotation(ctx context.Context, req *irmpb.CreateAnnotationRequest, opts ...gax.CallOption) (*irmpb.Annotation, error)

CreateAnnotation creates an annotation on an existing incident. Only 'text/plain' and 'text/markdown' annotations can be created via this method.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateAnnotationRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateAnnotation(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateArtifact Uses

func (c *IncidentClient) CreateArtifact(ctx context.Context, req *irmpb.CreateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)

CreateArtifact creates a new artifact.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateArtifactRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateArtifact(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateIncident Uses

func (c *IncidentClient) CreateIncident(ctx context.Context, req *irmpb.CreateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)

CreateIncident creates a new incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateIncidentRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateIncident(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateIncidentRoleAssignment Uses

func (c *IncidentClient) CreateIncidentRoleAssignment(ctx context.Context, req *irmpb.CreateIncidentRoleAssignmentRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)

CreateIncidentRoleAssignment creates a role assignment on an existing incident. Normally, the user field will be set when assigning a role to oneself, and the next field will be set when proposing another user as the assignee. Setting the next field directly to a user other than oneself is equivalent to proposing and force-assigning the role to the user.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateIncidentRoleAssignmentRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateIncidentRoleAssignment(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateSignal Uses

func (c *IncidentClient) CreateSignal(ctx context.Context, req *irmpb.CreateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)

CreateSignal creates a new signal.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateSignalRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateSignal(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateSubscription Uses

func (c *IncidentClient) CreateSubscription(ctx context.Context, req *irmpb.CreateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)

CreateSubscription creates a new subscription. This will fail if: a. there are too many (50) subscriptions in the incident already b. a subscription using the given channel already exists

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateSubscriptionRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateSubscription(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) CreateTag Uses

func (c *IncidentClient) CreateTag(ctx context.Context, req *irmpb.CreateTagRequest, opts ...gax.CallOption) (*irmpb.Tag, error)

CreateTag creates a tag on an existing incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.CreateTagRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateTag(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) DeleteArtifact Uses

func (c *IncidentClient) DeleteArtifact(ctx context.Context, req *irmpb.DeleteArtifactRequest, opts ...gax.CallOption) error

DeleteArtifact deletes an existing artifact.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.DeleteArtifactRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteArtifact(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*IncidentClient) DeleteIncidentRoleAssignment Uses

func (c *IncidentClient) DeleteIncidentRoleAssignment(ctx context.Context, req *irmpb.DeleteIncidentRoleAssignmentRequest, opts ...gax.CallOption) error

DeleteIncidentRoleAssignment deletes an existing role assignment.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.DeleteIncidentRoleAssignmentRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteIncidentRoleAssignment(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*IncidentClient) DeleteSubscription Uses

func (c *IncidentClient) DeleteSubscription(ctx context.Context, req *irmpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error

DeleteSubscription deletes an existing subscription.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.DeleteSubscriptionRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteSubscription(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*IncidentClient) DeleteTag Uses

func (c *IncidentClient) DeleteTag(ctx context.Context, req *irmpb.DeleteTagRequest, opts ...gax.CallOption) error

DeleteTag deletes an existing tag.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.DeleteTagRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteTag(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*IncidentClient) EscalateIncident Uses

func (c *IncidentClient) EscalateIncident(ctx context.Context, req *irmpb.EscalateIncidentRequest, opts ...gax.CallOption) (*irmpb.EscalateIncidentResponse, error)

EscalateIncident escalates an incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.EscalateIncidentRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.EscalateIncident(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) ForceIncidentRoleHandover Uses

func (c *IncidentClient) ForceIncidentRoleHandover(ctx context.Context, req *irmpb.ForceIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)

ForceIncidentRoleHandover forces a role handover. This will fail if the 'proposed_assignee' field of the IncidentRoleAssignment is not equal to the 'new_assignee' field of the request. If the caller is the new_assignee, ConfirmIncidentRoleHandover should be used instead.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ForceIncidentRoleHandoverRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.ForceIncidentRoleHandover(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) GetIncident Uses

func (c *IncidentClient) GetIncident(ctx context.Context, req *irmpb.GetIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)

GetIncident returns an incident by name.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.GetIncidentRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetIncident(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) GetSignal Uses

func (c *IncidentClient) GetSignal(ctx context.Context, req *irmpb.GetSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)

GetSignal returns a signal by name.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.GetSignalRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetSignal(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) ListAnnotations Uses

func (c *IncidentClient) ListAnnotations(ctx context.Context, req *irmpb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator

ListAnnotations lists annotations that are part of an incident. No assumptions should be made on the content-type of the annotation returned.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ListAnnotationsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListAnnotations(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) ListArtifacts Uses

func (c *IncidentClient) ListArtifacts(ctx context.Context, req *irmpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator

ListArtifacts returns a list of artifacts for an incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ListArtifactsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListArtifacts(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) ListIncidentRoleAssignments Uses

func (c *IncidentClient) ListIncidentRoleAssignments(ctx context.Context, req *irmpb.ListIncidentRoleAssignmentsRequest, opts ...gax.CallOption) *IncidentRoleAssignmentIterator

ListIncidentRoleAssignments lists role assignments that are part of an incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ListIncidentRoleAssignmentsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListIncidentRoleAssignments(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) ListSubscriptions Uses

func (c *IncidentClient) ListSubscriptions(ctx context.Context, req *irmpb.ListSubscriptionsRequest, opts ...gax.CallOption) *SubscriptionIterator

ListSubscriptions returns a list of subscriptions for an incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ListSubscriptionsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListSubscriptions(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) ListTags Uses

func (c *IncidentClient) ListTags(ctx context.Context, req *irmpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator

ListTags lists tags that are part of an incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.ListTagsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListTags(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) LookupSignal Uses

func (c *IncidentClient) LookupSignal(ctx context.Context, req *irmpb.LookupSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)

LookupSignal finds a signal by other unique IDs.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.LookupSignalRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.LookupSignal(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) RequestIncidentRoleHandover Uses

func (c *IncidentClient) RequestIncidentRoleHandover(ctx context.Context, req *irmpb.RequestIncidentRoleHandoverRequest, opts ...gax.CallOption) (*irmpb.IncidentRoleAssignment, error)

RequestIncidentRoleHandover starts a role handover. The proposed assignee will receive an email notifying them of the assignment. This will fail if a role handover is already pending.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.RequestIncidentRoleHandoverRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.RequestIncidentRoleHandover(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) SearchIncidents Uses

func (c *IncidentClient) SearchIncidents(ctx context.Context, req *irmpb.SearchIncidentsRequest, opts ...gax.CallOption) *IncidentIterator

SearchIncidents returns a list of incidents. Incidents are ordered by start time, with the most recent incidents first.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.SearchIncidentsRequest{
    // TODO: Fill request struct fields.
}
it := c.SearchIncidents(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) SearchSignals Uses

func (c *IncidentClient) SearchSignals(ctx context.Context, req *irmpb.SearchSignalsRequest, opts ...gax.CallOption) *SignalIterator

SearchSignals lists signals that are part of an incident. Signals are returned in reverse chronological order.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.SearchSignalsRequest{
    // TODO: Fill request struct fields.
}
it := c.SearchSignals(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) SearchSimilarIncidents Uses

func (c *IncidentClient) SearchSimilarIncidents(ctx context.Context, req *irmpb.SearchSimilarIncidentsRequest, opts ...gax.CallOption) *SearchSimilarIncidentsResponse_ResultIterator

SearchSimilarIncidents returns a list of incidents that are "similar" to the specified incident or signal. This functionality is provided on a best-effort basis and the definition of "similar" is subject to change.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.SearchSimilarIncidentsRequest{
    // TODO: Fill request struct fields.
}
it := c.SearchSimilarIncidents(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*IncidentClient) SendShiftHandoff Uses

func (c *IncidentClient) SendShiftHandoff(ctx context.Context, req *irmpb.SendShiftHandoffRequest, opts ...gax.CallOption) (*irmpb.SendShiftHandoffResponse, error)

SendShiftHandoff sends a summary of the shift for oncall handoff.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.SendShiftHandoffRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.SendShiftHandoff(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) UpdateArtifact Uses

func (c *IncidentClient) UpdateArtifact(ctx context.Context, req *irmpb.UpdateArtifactRequest, opts ...gax.CallOption) (*irmpb.Artifact, error)

UpdateArtifact updates an existing artifact.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.UpdateArtifactRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateArtifact(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) UpdateIncident Uses

func (c *IncidentClient) UpdateIncident(ctx context.Context, req *irmpb.UpdateIncidentRequest, opts ...gax.CallOption) (*irmpb.Incident, error)

UpdateIncident updates an existing incident.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.UpdateIncidentRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateIncident(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) UpdateSignal Uses

func (c *IncidentClient) UpdateSignal(ctx context.Context, req *irmpb.UpdateSignalRequest, opts ...gax.CallOption) (*irmpb.Signal, error)

UpdateSignal updates an existing signal (for example, to assign/unassign it to an incident).

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.UpdateSignalRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateSignal(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*IncidentClient) UpdateSubscription Uses

func (c *IncidentClient) UpdateSubscription(ctx context.Context, req *irmpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*irmpb.Subscription, error)

UpdateSubscription updates a subscription.

Code:

ctx := context.Background()
c, err := irm.NewIncidentClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &irmpb.UpdateSubscriptionRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateSubscription(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

type IncidentIterator Uses

type IncidentIterator struct {

    // 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 []*irmpb.Incident, nextPageToken string, err error)
    // contains filtered or unexported fields
}

IncidentIterator manages a stream of *irmpb.Incident.

func (*IncidentIterator) Next Uses

func (it *IncidentIterator) Next() (*irmpb.Incident, 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 (*IncidentIterator) PageInfo Uses

func (it *IncidentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type IncidentRoleAssignmentIterator Uses

type IncidentRoleAssignmentIterator struct {

    // 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 []*irmpb.IncidentRoleAssignment, nextPageToken string, err error)
    // contains filtered or unexported fields
}

IncidentRoleAssignmentIterator manages a stream of *irmpb.IncidentRoleAssignment.

func (*IncidentRoleAssignmentIterator) Next Uses

func (it *IncidentRoleAssignmentIterator) Next() (*irmpb.IncidentRoleAssignment, 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 (*IncidentRoleAssignmentIterator) PageInfo Uses

func (it *IncidentRoleAssignmentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SearchSimilarIncidentsResponse_ResultIterator Uses

type SearchSimilarIncidentsResponse_ResultIterator struct {

    // 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 []*irmpb.SearchSimilarIncidentsResponse_Result, nextPageToken string, err error)
    // contains filtered or unexported fields
}

SearchSimilarIncidentsResponse_ResultIterator manages a stream of *irmpb.SearchSimilarIncidentsResponse_Result.

func (*SearchSimilarIncidentsResponse_ResultIterator) Next Uses

func (it *SearchSimilarIncidentsResponse_ResultIterator) Next() (*irmpb.SearchSimilarIncidentsResponse_Result, 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 (*SearchSimilarIncidentsResponse_ResultIterator) PageInfo Uses

func (it *SearchSimilarIncidentsResponse_ResultIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SignalIterator Uses

type SignalIterator struct {

    // 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 []*irmpb.Signal, nextPageToken string, err error)
    // contains filtered or unexported fields
}

SignalIterator manages a stream of *irmpb.Signal.

func (*SignalIterator) Next Uses

func (it *SignalIterator) Next() (*irmpb.Signal, 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 (*SignalIterator) PageInfo Uses

func (it *SignalIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SubscriptionIterator Uses

type SubscriptionIterator struct {

    // 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 []*irmpb.Subscription, nextPageToken string, err error)
    // contains filtered or unexported fields
}

SubscriptionIterator manages a stream of *irmpb.Subscription.

func (*SubscriptionIterator) Next Uses

func (it *SubscriptionIterator) Next() (*irmpb.Subscription, 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 (*SubscriptionIterator) PageInfo Uses

func (it *SubscriptionIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type TagIterator Uses

type TagIterator struct {

    // 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 []*irmpb.Tag, nextPageToken string, err error)
    // contains filtered or unexported fields
}

TagIterator manages a stream of *irmpb.Tag.

func (*TagIterator) Next Uses

func (it *TagIterator) Next() (*irmpb.Tag, 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 (*TagIterator) PageInfo Uses

func (it *TagIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Package irm imports 17 packages (graph). Updated 2019-12-14. Refresh now. Tools for package owners.