operations

package
v0.0.0-...-d2438c5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	api.DefaultService
	// contains filtered or unexported fields
}

API defines a operations API

func NewAPI

func NewAPI(name string, options ...Option) *API

NewAPI creates a API with sane defaults

func (*API) Get

func (a *API) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*API) Name

func (a *API) Name() string

Name returns the API name

type IdentityAPI

type IdentityAPI struct {
	api.DefaultService
	// contains filtered or unexported fields
}

IdentityAPI defines a operations/{id} API

func NewIdentityAPI

func NewIdentityAPI(name string, options ...Option) *IdentityAPI

NewIdentityAPI creates a API with sane defaults

func (*IdentityAPI) Delete

func (a *IdentityAPI) Delete(ctx context.Context, req *http.Request) api.Response

Delete defines a service for calling "DELETE" method and returns a response.

func (*IdentityAPI) Get

func (a *IdentityAPI) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*IdentityAPI) Name

func (a *IdentityAPI) Name() string

Name returns the IdentityAPI name

type Op

type Op struct {
	ID         string `json:"id" yaml:"id"`
	URL        string `json:"url" yaml:"url"`
	Class      string `json:"class" yaml:"class"`
	Status     string `json:"status" yaml:"status"`
	StatusCode int    `json:"status_code" yaml:"status_code"`
	Err        string `json:"err" yaml:"err"`
}

Op defines a very lightweight operation

type Operations

type Operations interface {

	// GetOp retrieves an op of the operation from the collection by id
	GetOp(string) (operations.Op, error)

	// Walk over a collection of operations
	Walk(func(operations.Op) error) error
}

Operations defines an interface for interacting with a series of operations

type Option

type Option func(*options)

Option to be passed to Connect to customize the resulting instance.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger on the option

type Status

type Status = operations.Status

Status represents operational status

type WaitAPI

type WaitAPI struct {
	api.DefaultService
	// contains filtered or unexported fields
}

WaitAPI defines a operations/{id} API

func NewWaitAPI

func NewWaitAPI(name string, options ...Option) *WaitAPI

NewWaitAPI creates a API with sane defaults

func (*WaitAPI) Get

func (a *WaitAPI) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*WaitAPI) Name

func (a *WaitAPI) Name() string

Name returns the WaitAPI name

Jump to

Keyboard shortcuts

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