Documentation ¶
Overview ¶
nolint: dupl
nolint: dupl
nolint: dupl
nolint: dupl
Index ¶
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeHealthzEndpoint(s service.Service) endpoint.Endpoint
- func MakeInfoEndpoint(s service.Service) endpoint.Endpoint
- func MakeOpenAPIEndpoint(s service.Service) endpoint.Endpoint
- func MakeReadyzEndpoint(s service.Service) endpoint.Endpoint
- func MakeRolesListEndpoint(s service.Service) endpoint.Endpoint
- func MakeTaskInfoEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMAddRoleEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMDeleteEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMDeployEndpoint(s service.Service, logger log.Logger) endpoint.Endpoint
- func MakeVMFindEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMInfoEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMListEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMRestoreFromSnapshotEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMRolesListEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMSnapshotCreateEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMSnapshotDeleteEndpoint(s service.Service) endpoint.Endpoint
- func MakeVMSnapshotsListEndpoint(s service.Service) endpoint.Endpoint
- type ComputerResources
- type Datastores
- type Endpoints
- type Failer
- type InfoResponse
- type OpenAPIResponse
- type RoleListRequest
- type RoleListResponse
- type TaskInfoRequest
- type TaskInfoResponse
- type VMAddRoleRequest
- type VMAddRoleResponse
- type VMDeleteRequest
- type VMDeleteResponse
- type VMDeployRequest
- type VMDeployResponse
- type VMFindRequest
- type VMFindResponse
- type VMInfoRequest
- type VMInfoResponse
- type VMListRequest
- type VMListResponse
- type VMRestoreFromSnapshotRequest
- type VMRolesListRequest
- type VMRolesListResponse
- type VMSRestoreFromSnapshotResponse
- type VMSnapshotCreateRequest
- type VMSnapshotCreateResponse
- type VMSnapshotDeleteRequest
- type VMSnapshotDeleteResponse
- type VMSnapshotsListRequest
- type VMSnapshotsListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any. This is a transport-domain logging
func MakeHealthzEndpoint ¶
MakeHealthzEndpoint returns an endpoint via the passed service
func MakeInfoEndpoint ¶
MakeInfoEndpoint returns an endpoint via the passed service
func MakeOpenAPIEndpoint ¶ added in v0.4.0
MakeOpenAPIEndpoint returns an endpoint via the passed service
func MakeReadyzEndpoint ¶
MakeReadyzEndpoint returns an endpoint via the passed service
func MakeRolesListEndpoint ¶
MakeRolesListEndpoint returns an endpoint via the passed service
func MakeTaskInfoEndpoint ¶
MakeTaskInfoEndpoint returns an endpoint via the passed service
func MakeVMAddRoleEndpoint ¶
MakeVMAddRoleEndpoint returns an endpoint via the passed service
func MakeVMDeleteEndpoint ¶ added in v0.3.0
MakeVMDeleteEndpoint deletes a Virtual Machine
func MakeVMDeployEndpoint ¶
MakeVMDeployEndpoint returns an endpoint via the passed service
func MakeVMFindEndpoint ¶
MakeVMFindEndpoint returns an endpoint via the passed service
func MakeVMInfoEndpoint ¶
MakeVMInfoEndpoint returns an endpoint via the passed service
func MakeVMListEndpoint ¶
MakeVMListEndpoint returns an endpoint via the passed service
func MakeVMRestoreFromSnapshotEndpoint ¶
MakeVMRestoreFromSnapshotEndpoint creates VM snapshot
func MakeVMRolesListEndpoint ¶
MakeVMRolesListEndpoint returns an endpoint via the passed service
func MakeVMSnapshotCreateEndpoint ¶
MakeVMSnapshotCreateEndpoint creates VM snapshot
func MakeVMSnapshotDeleteEndpoint ¶
MakeVMSnapshotDeleteEndpoint returns an endpoint via the passed service
Types ¶
type ComputerResources ¶
type Datastores ¶
type Endpoints ¶
type Endpoints struct { InfoEndpoint endpoint.Endpoint HealthzEndpoint endpoint.Endpoint ReadyzEndpoint endpoint.Endpoint VMListEndpoint endpoint.Endpoint VMInfoEndpoint endpoint.Endpoint VMDeleteEndpoint endpoint.Endpoint VMFindEndpoint endpoint.Endpoint VMDeployEndpoint endpoint.Endpoint VMSnapshotsListEndpoint endpoint.Endpoint VMSnapshotCreateEndpoint endpoint.Endpoint VMSnapshotDeleteEndpoint endpoint.Endpoint VMRestoreFromSnapshotEndpoint endpoint.Endpoint VMRolesListEndpoint endpoint.Endpoint VMAddRoleEndpoint endpoint.Endpoint RoleListEndpoint endpoint.Endpoint TaskInfoEndpoint endpoint.Endpoint OpenAPIEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints that compose the Service.
type Failer ¶
type Failer interface {
Failed() error
}
Failer is an interface that should be implemented by response types. Response encoders can check if responses are Failer, and if so they've failed, and if so encode them using a separate write path based on the error.
type InfoResponse ¶
InfoResponse is the Service build information
type OpenAPIResponse ¶ added in v0.4.0
OpenAPIResponse serves OpenAPI specification
func (OpenAPIResponse) Failed ¶ added in v0.4.0
func (r OpenAPIResponse) Failed() error
Failed implements Failer
type RoleListRequest ¶
type RoleListRequest struct{}
RoleListRequest collects the request parameters for the RoleList method
type RoleListResponse ¶
type RoleListResponse struct { Roles []types.Role `json:"roles"` Err error `json:"error,omitempty"` }
RoleListResponse collects the response values for the RoleList method
type TaskInfoRequest ¶
type TaskInfoRequest struct {
TaskID string
}
TaskInfoRequest collects the request parameters for the TaskInfo method
type TaskInfoResponse ¶
TaskInfoResponse collects the response values for the TaskInfo method
type VMAddRoleRequest ¶
type VMAddRoleRequest struct { UUID string Datacenter string `json:"datacenter"` Principal string `json:"principal"` RoleID int32 `json:"role_id"` }
VMAddRoleRequest collects the request parameters for the VMAddRole method
type VMAddRoleResponse ¶
type VMAddRoleResponse struct {
Err error `json:"error,omitempty"`
}
VMAddRoleResponse collects the response values for the VMAddRole method
func (VMAddRoleResponse) Failed ¶
func (r VMAddRoleResponse) Failed() error
Failed implements Failer
type VMDeleteRequest ¶ added in v0.3.0
VMDeleteRequest collects the request parameters for the VMDelete method
type VMDeleteResponse ¶ added in v0.3.0
type VMDeleteResponse struct {
Err error `json:"error,omitempty"`
}
VMDeleteResponse collects the response values for the VMDelete method
func (VMDeleteResponse) Failed ¶ added in v0.3.0
func (r VMDeleteResponse) Failed() error
Failed implements Failer
type VMDeployRequest ¶
type VMDeployRequest struct { Name string `json:"name"` OVAURL string `json:"ova_url"` Datacenter string `json:"datacenter,omitempty"` Folder string `json:"folder,omitempty"` Annotation string `json:"annotation"` Networks map[string]string `json:"networks,omitempty"` Datastores `json:"datastores"` ComputerResources `json:"computer_resources"` }
VMDeployRequest collects the request parameters for the VMDeploy method
func (*VMDeployRequest) String ¶
func (r *VMDeployRequest) String() string
type VMDeployResponse ¶
type VMDeployResponse struct { JID string `json:"task_id,omitempty"` Err error `json:"error,omitempty"` }
VMDeployResponse fields
type VMFindRequest ¶
VMFindRequest collects the request parameters for the VMFind method
type VMFindResponse ¶
VMFindResponse collects the response values for the VMFind method
type VMInfoRequest ¶
VMInfoRequest collects the request parameters for the VMInfo method
type VMInfoResponse ¶
type VMInfoResponse struct { Summary *types.VMSummary `json:"summary,omitempty"` Err error `json:"error,omitempty"` }
VMInfoResponse collects the response values for the VMInfo method
type VMListRequest ¶
VMListRequest collects the request parameters for the VMList method
type VMListResponse ¶
type VMListResponse struct { VMList map[string]string `json:"vm_list,omitempty"` Err error `json:"error,omitempty"` }
VMListResponse collects the response values for the VMList method
type VMRestoreFromSnapshotRequest ¶
type VMRestoreFromSnapshotRequest struct { UUID string Datacenter string `json:"datacenter"` SnapshotID int32 `json:"snapshot_id"` PowerOn bool `json:"power_on"` }
VMRestoreFromSnapshotRequest collects the request parameters for the VMRestoreFromSnapshot method
type VMRolesListRequest ¶
VMRolesListRequest collects the request parameters for the VMRolesList method
type VMRolesListResponse ¶
type VMRolesListResponse struct { VMRolesList []types.Role `json:"roles"` Err error `json:"error,omitempty"` }
VMRolesListResponse collects the response values for the VMRolesList method
func (VMRolesListResponse) Failed ¶
func (r VMRolesListResponse) Failed() error
Failed implements Failer
type VMSRestoreFromSnapshotResponse ¶
type VMSRestoreFromSnapshotResponse struct {
Err error `json:"error,omitempty"`
}
VMSRestoreFromSnapshotResponse collects the response values for the VMRestoreFromSnapshot method
func (VMSRestoreFromSnapshotResponse) Failed ¶
func (r VMSRestoreFromSnapshotResponse) Failed() error
Failed implements Failer
type VMSnapshotCreateRequest ¶
type VMSnapshotCreateRequest struct { UUID string Datacenter string `json:"datacenter"` Name string `json:"name"` Description string `json:"description"` Memory bool `json:"memory"` Quiesce bool `json:"quiesce"` }
VMSnapshotCreateRequest collects the request parameters for the VMSnapshotCreate method
type VMSnapshotCreateResponse ¶
type VMSnapshotCreateResponse struct { SnapshotID int32 `json:"snapshot_id,omitempty"` Err error `json:"error,omitempty"` }
VMSnapshotCreateResponse collects the response values for the VMSnapshotCreate method
func (VMSnapshotCreateResponse) Failed ¶
func (r VMSnapshotCreateResponse) Failed() error
Failed implements Failer
type VMSnapshotDeleteRequest ¶
type VMSnapshotDeleteRequest struct { UUID string SnapshotID int32 `json:"snapshot_id"` Datacenter string `json:"datacenter,omitempty"` }
VMSnapshotDeleteRequest collects the request parameters for the VMSnapshotDelete method
type VMSnapshotDeleteResponse ¶
type VMSnapshotDeleteResponse struct {
Err error `json:"error,omitempty"`
}
VMSnapshotDeleteResponse collects the response values for the VMSnapshotDelete method
func (VMSnapshotDeleteResponse) Failed ¶
func (r VMSnapshotDeleteResponse) Failed() error
Failed implements Failer
type VMSnapshotsListRequest ¶
VMSnapshotsListRequest collects the request parameters for the VMSnapshotsList method
type VMSnapshotsListResponse ¶
type VMSnapshotsListResponse struct { VMSnapshotsList []types.Snapshot `json:"snapshots"` Err error `json:"error,omitempty"` }
VMSnapshotsListResponse collects the response values for the VMSnapshotsList method
func (VMSnapshotsListResponse) Failed ¶
func (r VMSnapshotsListResponse) Failed() error
Failed implements Failer