Documentation ¶
Index ¶
- Constants
- func All(container *container.Container) (all []libweb.RequestHandler)
- type Client
- type EventHandler
- type Finder
- type NotFoundError
- type Param
- type Provider
- type ProviderClient
- func (r *ProviderClient) Find(resource interface{}, ref base.Ref) (err error)
- func (r *ProviderClient) Finder() Finder
- func (r *ProviderClient) Get(resource interface{}, id string) (err error)
- func (r *ProviderClient) HasReason(reason string) bool
- func (r *ProviderClient) Host(ref *base.Ref) (object interface{}, err error)
- func (r *ProviderClient) List(resource interface{}, param ...Param) (err error)
- func (r *ProviderClient) Network(ref *base.Ref) (object interface{}, err error)
- func (r *ProviderClient) Storage(ref *base.Ref) (object interface{}, err error)
- func (r *ProviderClient) VM(ref *base.Ref) (object interface{}, err error)
- func (r *ProviderClient) Watch(resource interface{}, h EventHandler) (w *Watch, err error)
- func (r *ProviderClient) Workload(ref *base.Ref) (object interface{}, err error)
- type ProviderHandler
- type ProviderNotReadyError
- type ProviderNotSupportedError
- type RefNotUniqueError
- type Watch
Constants ¶
View Source
const (
ProvidersRoot = "/providers"
)
Routes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NotFoundError ¶
type NotFoundError = base.NotFoundError
type ProviderClient ¶
type ProviderClient struct {
// contains filtered or unexported fields
}
Provider API client.
func (*ProviderClient) Find ¶
func (r *ProviderClient) Find(resource interface{}, ref base.Ref) (err error)
Find an object by ref. Returns:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr RefNotUniqueErr
func (*ProviderClient) Get ¶
func (r *ProviderClient) Get(resource interface{}, id string) (err error)
Get a resource. Returns:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr
func (*ProviderClient) HasReason ¶
func (r *ProviderClient) HasReason(reason string) bool
Match X-Reason reply header.
func (*ProviderClient) Host ¶
func (r *ProviderClient) Host(ref *base.Ref) (object interface{}, err error)
Find a Host by ref. Returns the matching resource and:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr RefNotUniqueErr
func (*ProviderClient) List ¶
func (r *ProviderClient) List(resource interface{}, param ...Param) (err error)
List a resource collection. Returns:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr
func (*ProviderClient) Network ¶
func (r *ProviderClient) Network(ref *base.Ref) (object interface{}, err error)
Find a network by ref. Returns the matching resource and:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr RefNotUniqueErr
func (*ProviderClient) Storage ¶
func (r *ProviderClient) Storage(ref *base.Ref) (object interface{}, err error)
Find a storage object by ref. Returns the matching resource and:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr RefNotUniqueErr
func (*ProviderClient) VM ¶
func (r *ProviderClient) VM(ref *base.Ref) (object interface{}, err error)
Find a VM by ref. Returns the matching resource and:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr RefNotUniqueErr
func (*ProviderClient) Watch ¶
func (r *ProviderClient) Watch(resource interface{}, h EventHandler) (w *Watch, err error)
Watch a resource. Returns:
ProviderNotSupportedErr ProviderNotReadyErr NotFoundErr
type ProviderHandler ¶
Provider handler.
func (*ProviderHandler) AddRoutes ¶
func (h *ProviderHandler) AddRoutes(e *gin.Engine)
Add routes to the `gin` router.
func (ProviderHandler) Get ¶
func (h ProviderHandler) Get(ctx *gin.Context)
Get a specific REST resource.
func (ProviderHandler) List ¶
func (h ProviderHandler) List(ctx *gin.Context)
List resources in a REST collection.
type ProviderNotReadyError ¶
Resource kind cannot be resolved.
func (ProviderNotReadyError) Error ¶
func (r ProviderNotReadyError) Error() string
type ProviderNotSupportedError ¶
Resource kind cannot be resolved.
func (ProviderNotSupportedError) Error ¶
func (r ProviderNotSupportedError) Error() string
type RefNotUniqueError ¶
type RefNotUniqueError = base.RefNotUniqueError
Click to show internal directories.
Click to hide internal directories.