api

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(region, secretID, accessKey string) error

func IsNotFound

func IsNotFound(err error) bool

Types

type Action

type Action int
const (
	Insert Action = iota
	Delete
	Add
	Remove
)

func (Action) String

func (i Action) String() string

type Caller

type Caller struct {
	Ctx        context.Context
	OperatorID string
}

func (*Caller) GetResource

func (c *Caller) GetResource(id string, fields string, getCalls []interface{}) (interface{}, error)
func (c *Caller) GetResourceSelfLink(id string, getCalls []interface{}) (*string, error)

func (*Caller) ListResources

func (c *Caller) ListResources(resourceService core.ResourceService, listCalls []interface{}) ([]string, error)

func (*Caller) RunFirstSuccessful

func (c *Caller) RunFirstSuccessful(logger logging.Logger, action Action, gceCall ...GceCall) (compOp *compute.Operation, err error)

type GceCall

type GceCall interface {
	Do(opts ...googleapi.CallOption) (*compute.Operation, error)
}

type Operation

type Operation struct {
	Logger       logging.Logger
	Action       Action
	ResourceType string
	ResourceName string
	GceCall      GceCall
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL