irm

package
Version: v0.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

Types

type AnnotationIterator

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

AnnotationIterator manages a stream of *irmpb.Annotation.

func (*AnnotationIterator) Next

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

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

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

type ArtifactIterator

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

ArtifactIterator manages a stream of *irmpb.Artifact.

func (*ArtifactIterator) Next

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

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

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

type IncidentCallOptions

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
	LookupSignal                 []gax.CallOption
	GetSignal                    []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

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

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

NewIncidentClient creates a new incident service client.

The Incident API for Incident Response & Management.

Example
package main

import (
	"context"

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

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

func (*IncidentClient) CancelIncidentRoleHandover

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) Close

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

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) Connection

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

Connection returns a connection to the API service.

Deprecated.

func (*IncidentClient) CreateAnnotation

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateArtifact

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

CreateArtifact creates a new artifact.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateIncident

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

CreateIncident creates a new incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateIncidentRoleAssignment

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateSignal

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

CreateSignal creates a new signal.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateSubscription

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

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) CreateTag

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

CreateTag creates a tag on an existing incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) DeleteArtifact

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

DeleteArtifact deletes an existing artifact.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	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.
	}
}
Output:

func (*IncidentClient) DeleteIncidentRoleAssignment

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

DeleteIncidentRoleAssignment deletes an existing role assignment.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	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.
	}
}
Output:

func (*IncidentClient) DeleteSubscription

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

DeleteSubscription deletes an existing subscription.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	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.
	}
}
Output:

func (*IncidentClient) DeleteTag

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

DeleteTag deletes an existing tag.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	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.
	}
}
Output:

func (*IncidentClient) EscalateIncident

EscalateIncident escalates an incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) ForceIncidentRoleHandover

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) GetIncident

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

GetIncident returns an incident by name.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) GetSignal

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

GetSignal returns a signal by name.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) ListAnnotations

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

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) ListArtifacts

ListArtifacts returns a list of artifacts for an incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) ListIncidentRoleAssignments

ListIncidentRoleAssignments lists role assignments that are part of an incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) ListSubscriptions

ListSubscriptions returns a list of subscriptions for an incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) ListTags

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

ListTags lists tags that are part of an incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) LookupSignal

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

LookupSignal finds a signal by other unique IDs.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) RequestIncidentRoleHandover

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. Handover to an oncall ladder is not permitted. Use CreateIncidentRoleAssignment instead.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) SearchIncidents

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) SearchSignals

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. Note that search should not be relied on for critical functionality. It has lower availability guarantees and might fail to return valid results. Returned results might include stale or extraneous entries.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) SearchSimilarIncidents

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.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	"google.golang.org/api/iterator"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
	// import "google.golang.org/api/iterator"

	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
	}
}
Output:

func (*IncidentClient) SendShiftHandoff

SendShiftHandoff sends a summary of the shift for oncall handoff.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) UpdateArtifact

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

UpdateArtifact updates an existing artifact.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) UpdateIncident

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

UpdateIncident updates an existing incident.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) UpdateSignal

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).

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

func (*IncidentClient) UpdateSubscription

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

UpdateSubscription updates a subscription.

Example
package main

import (
	"context"

	irm "cloud.google.com/go/irm/apiv1alpha2"
	irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"
)

func main() {
	// import irmpb "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2"

	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
}
Output:

type IncidentIterator

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

IncidentIterator manages a stream of *irmpb.Incident.

func (*IncidentIterator) Next

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

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

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

type IncidentRoleAssignmentIterator

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

IncidentRoleAssignmentIterator manages a stream of *irmpb.IncidentRoleAssignment.

func (*IncidentRoleAssignmentIterator) Next

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

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

type SearchSimilarIncidentsResponse_ResultIterator

type SearchSimilarIncidentsResponse_ResultIterator 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 []*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

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

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

type SignalIterator

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

SignalIterator manages a stream of *irmpb.Signal.

func (*SignalIterator) Next

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

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

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

type SubscriptionIterator

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

SubscriptionIterator manages a stream of *irmpb.Subscription.

func (*SubscriptionIterator) Next

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

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

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

type TagIterator

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

TagIterator manages a stream of *irmpb.Tag.

func (*TagIterator) Next

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to