custom

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: BSD-3-Clause Imports: 13 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 {
	// contains filtered or unexported fields
}

API exposes the custom api handlers specific for this broker.

func NewAPI

func NewAPI(router *mux.Router, handler APISpec, username, password string, logger lager.Logger) *API

NewAPI registers the routes and middlewares.

func (API) APIDocs

func (a API) APIDocs(w http.ResponseWriter, req *http.Request)

APIDocs is not implemented

func (API) Backup

func (a API) Backup(w http.ResponseWriter, req *http.Request)

Backup is not implemented

func (API) CreateBackup

func (a API) CreateBackup(w http.ResponseWriter, req *http.Request)

CreateBackup is not implemented

func (API) CreateUpdateServiceDefinition

func (a API) CreateUpdateServiceDefinition(w http.ResponseWriter, req *http.Request)

CreateUpdateServiceDefinition is not implemented

func (API) DeleteBackup

func (a API) DeleteBackup(w http.ResponseWriter, req *http.Request)

DeleteBackup is not implemented

func (API) DeleteServiceDefinition

func (a API) DeleteServiceDefinition(w http.ResponseWriter, req *http.Request)

DeleteServiceDefinition is not implemented

func (API) Endpoints

func (a API) Endpoints(w http.ResponseWriter, req *http.Request)

Endpoints lists service endpoints

func (API) ListBackups

func (a API) ListBackups(w http.ResponseWriter, req *http.Request)

ListBackups is not implemented

func (API) RestoreBackup

func (a API) RestoreBackup(w http.ResponseWriter, req *http.Request)

RestoreBackup is not implemented

func (API) RestoreStatus

func (a API) RestoreStatus(w http.ResponseWriter, req *http.Request)

RestoreStatus is not implemented

func (API) ServiceUsage

func (a API) ServiceUsage(w http.ResponseWriter, req *http.Request)

ServiceUsage returns service usage

type APIHandler

type APIHandler struct {
	// contains filtered or unexported fields
}

APIHandler handles the actual implementations and implements APISpec

func NewAPIHandler

func NewAPIHandler(c *crossplane.Crossplane, log lager.Logger) *APIHandler

NewAPIHandler sets up a new instance.

func (APIHandler) APIDocs

func (h APIHandler) APIDocs(rctx *reqcontext.ReqContext, instanceID string) (string, error)

APIDocs is not implemented

func (APIHandler) Backup

func (h APIHandler) Backup(rctx *reqcontext.ReqContext, instanceID, backupID string) (*Backup, error)

Backup is not implemented

func (APIHandler) CreateBackup

func (h APIHandler) CreateBackup(rctx *reqcontext.ReqContext, instanceID string, b *BackupRequest) (*Backup, error)

CreateBackup is not implemented

func (APIHandler) CreateUpdateServiceDefinition

func (h APIHandler) CreateUpdateServiceDefinition(rctx *reqcontext.ReqContext, sd *ServiceDefinitionRequest) error

CreateUpdateServiceDefinition is not implemented

func (APIHandler) DeleteBackup

func (h APIHandler) DeleteBackup(rctx *reqcontext.ReqContext, instanceID, backupID string) (string, error)

DeleteBackup is not implemented

func (APIHandler) DeleteServiceDefinition

func (h APIHandler) DeleteServiceDefinition(rctx *reqcontext.ReqContext, id string) error

DeleteServiceDefinition is not implemented

func (APIHandler) Endpoints

func (h APIHandler) Endpoints(rctx *reqcontext.ReqContext, instanceID string) ([]Endpoint, error)

Endpoints retrieves the endpoints using the service binder.

func (APIHandler) ListBackups

func (h APIHandler) ListBackups(rctx *reqcontext.ReqContext, instanceID string) ([]Backup, error)

ListBackups is not implemented

func (APIHandler) RestoreBackup

func (h APIHandler) RestoreBackup(rctx *reqcontext.ReqContext, instanceID, backupID string, r *RestoreRequest) (*Restore, error)

RestoreBackup is not implemented

func (APIHandler) RestoreStatus

func (h APIHandler) RestoreStatus(rctx *reqcontext.ReqContext, instanceID, backupID, restoreID string) (*Restore, error)

RestoreStatus is not implemented

func (APIHandler) ServiceUsage

func (h APIHandler) ServiceUsage(rctx *reqcontext.ReqContext, instanceID string) (*ServiceUsage, error)

ServiceUsage is not implemented

type APISpec

type APISpec interface {
	// Endpoints lists service endpoints
	// GET /custom/service_instances/{service_instance_id}/endpoint
	Endpoints(rctx *reqcontext.ReqContext, instanceID string) ([]Endpoint, error)
	// ServiceUsage returns service usage
	// GET /custom/service_instances/{service_instance_id}/usage
	ServiceUsage(rctx *reqcontext.ReqContext, instanceID string) (*ServiceUsage, error)
	// CreateUpdateServiceDefinition is not implemented
	// POST /custom/admin/service-definition
	CreateUpdateServiceDefinition(rctx *reqcontext.ReqContext, sd *ServiceDefinitionRequest) error
	// DeleteServiceDefinition is not implemented
	// DELETE /custom/admin/service-definition/{id}
	DeleteServiceDefinition(rctx *reqcontext.ReqContext, id string) error
	// CreateBackup is not implemented
	// POST /custom/service_instances/{service_instance_id}/backups
	CreateBackup(rctx *reqcontext.ReqContext, instanceID string, b *BackupRequest) (*Backup, error)
	// DeleteBackup is not implemented
	// DELETE /custom/service_instances/{service_instance_id}/backups/{backup_id}
	DeleteBackup(rctx *reqcontext.ReqContext, instanceID, backupID string) (string, error)
	// Backup is not implemented
	// GET /custom/service_instances/{service_instance_id}/backups/{backup_id}
	Backup(rctx *reqcontext.ReqContext, instanceID, backupID string) (*Backup, error)
	// ListBackups is not implemented
	// GET /custom/service_instances/{service_instance_id}/backups
	ListBackups(rctx *reqcontext.ReqContext, instanceID string) ([]Backup, error)
	// RestoreBackup is not implemented
	// POST /custom/service_instances/{service_instance_id}/backups/{backup_id}/restores
	RestoreBackup(rctx *reqcontext.ReqContext, instanceID, backupID string, r *RestoreRequest) (*Restore, error)
	// RestoreStatus is not implemented
	// GET /custom/service_instances/{service_instance_id}/backups/{backup_id}/restores/{restore_id}
	RestoreStatus(rctx *reqcontext.ReqContext, instanceID, backupID, restoreID string) (*Restore, error)
	// APIDocs is not implemented
	// GET /custom/service_instances/{service_instance_id}/api-docs
	APIDocs(rctx *reqcontext.ReqContext, instanceID string) (string, error)
}

APISpec describes the service broker endpoints not defined by the open service broker API spec.

type Backup

type Backup struct{}

Backup is a placeholder

type BackupRequest

type BackupRequest struct{}

BackupRequest is a placeholder

type Endpoint

type Endpoint struct {
	Destination string `json:"destination"`
	Ports       string `json:"ports"`
	Protocol    string `json:"protocol"`
}

Endpoint describes available service endpoints.

type Restore

type Restore struct{}

Restore is a placeholder

type RestoreRequest

type RestoreRequest struct{}

RestoreRequest is a placeholder

type ServiceDefinitionRequest

type ServiceDefinitionRequest struct{}

ServiceDefinitionRequest is a placeholder

type ServiceUsage

type ServiceUsage struct{}

ServiceUsage is a placeholder

Jump to

Keyboard shortcuts

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