gce

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

Endly Google Compute Engine Service

Provides ability to call operations on *compute.Service client

Service Id Action Description Request Response
gce call run gce operation CallRequest CallResponse

'call' action's service, method and paramters are proxied to GCE client

Documentation

Index

Constants

View Source
const (
	//ServiceID represents cce service id.
	ServiceID = "gce"
)

Variables

This section is empty.

Functions

func GetComputeService

func GetComputeService(client *compute.Service, service string) (interface{}, error)

GetComputeService returns specialised compute service for provided service name.

func New

func New() endly.Service

New creates a new NoOperation service.

func NewComputeService

func NewComputeService(credentialsFile string) (*compute.Service, netcontext.Context, error)

NewComputeService creates a new compute service.

Types

type CallRequest

type CallRequest struct {
	Credentials string `required:"true" description:"path to secret json file"` //path to secret json file.
	Service     string ``                                                       //field representing service on *compute.Service, for instance Instance field points to  *compute.InstancesService
	/* 142-byte string literal not displayed */
	Method     string        `required:"true" description:"method on cloud service, for instance, Get, Start"` //method on cloud service, for instance, Get, Start
	Parameters []interface{} `required:"true" description:"actual method parameters"`                          //actual method parameters
}

CallRequest represents GCE call request, it operates on *cloud.Service client (https://cloud.google.com/compute/docs/reference/latest/)

func (*CallRequest) Validate

func (r *CallRequest) Validate() error

Validate checks if request is valid

type CallResponse

type CallResponse interface{}

CallResponse represents GCE call response

Jump to

Keyboard shortcuts

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