Documentation
¶
Index ¶
- Constants
- Variables
- func RandomUUID(prefix string) string
- type App
- type BBSOptions
- type Build
- type DialMVCCOption
- func WithBBSOptions(options BBSOptions) DialMVCCOption
- func WithDialRetries(retries int) DialMVCCOption
- func WithDialRetryInterval(interval time.Duration) DialMVCCOption
- func WithPermOptions(options PermOptions) DialMVCCOption
- func WithPort(port int) DialMVCCOption
- func WithUAAOptions(options UAAOptions) DialMVCCOption
- type ErrUnexpectedStatusCode
- type MVCC
- func (cc *MVCC) Delete(path string, authToken string) (*http.Response, error)
- func (cc *MVCC) Do(verb string, path string, authToken string, body interface{}, ...) (*http.Response, error)
- func (cc *MVCC) Get(path string, authToken string, respData interface{}) (*http.Response, error)
- func (cc *MVCC) Kill() error
- func (cc *MVCC) Post(path string, authToken string, body interface{}, respData interface{}) (*http.Response, error)
- func (cc *MVCC) Put(path string, authToken string, body interface{}, respData interface{}) (*http.Response, error)
- func (cc *MVCC) V2DeleteOrganization(authToken, uuid string) error
- func (cc *MVCC) V2SetFeatureFlag(authToken string, flag string, enabled bool) error
- func (cc *MVCC) V3CreateApp(authToken string, parentSpace Space) (App, error)
- func (cc *MVCC) V3CreateBuild(authToken string, parentPackage Package) (Build, error)
- func (cc *MVCC) V3CreateOrganization(authToken string) (Organization, error)
- func (cc *MVCC) V3CreatePackage(authToken string, parentApp App) (Package, error)
- func (cc *MVCC) V3CreateSpace(authToken string, parentOrg Organization) (Space, error)
- func (cc *MVCC) V3CreateTask(authToken string, parentApp App, dropletUUID string) (Task, error)
- func (cc *MVCC) V3GetBuild(authToken string, uuid string) (Build, error)
- func (cc *MVCC) V3GetPackage(authToken string, uuid string) (Package, error)
- func (cc *MVCC) V3GetTask(authToken string, taskUUID string) (Task, error)
- func (cc *MVCC) V3ListTasks(authToken string) ([]Task, error)
- type Organization
- type Package
- type PackageType
- type PermOptions
- type Space
- type Task
- type UAAOptions
- type User
- type V2OrganizationRequest
- type V2OrganizationResponse
- type V2SpaceRequest
- type V2SpaceResponse
- type V3Error
- type V3ErrorResponse
Constants ¶
View Source
const ( // By default, retry every 200ms for up to 1m DefaultDialRetries = 100 DefaultDialInterval = 200 * time.Millisecond DefaultHost = "localhost" )
Variables ¶
View Source
var ( ErrFailedToStart = errors.New("failed to start") ErrCCBinaryPathNotSet = errors.New("the filepath to the CC binary must be set") ErrCCConfigPathNotSet = errors.New("the filepath to the CC config file must be set") ErrPermServerBinaryPathNotSet = errors.New("the filepath to the perm binary must be set") ErrPermServerCertsPathNotSet = errors.New("the filepath to the perm TLS certificates must be set") ErrBadRequest = errors.New("bad request") ErrUnauthenticated = errors.New("unauthenticated") ErrForbidden = errors.New("forbidden") ErrNotFound = errors.New("not found") ErrUnprocessableEntity = errors.New("unprocessable entity") ErrInternalServer = errors.New("internal server error") ErrBadGateway = errors.New("bad gateway") )
Functions ¶
func RandomUUID ¶
Types ¶
type BBSOptions ¶
type BBSOptions struct {
Port int
}
type DialMVCCOption ¶
type DialMVCCOption func(*dialMVCCOpts)
func WithBBSOptions ¶
func WithBBSOptions(options BBSOptions) DialMVCCOption
func WithDialRetries ¶
func WithDialRetries(retries int) DialMVCCOption
func WithDialRetryInterval ¶
func WithDialRetryInterval(interval time.Duration) DialMVCCOption
func WithPermOptions ¶
func WithPermOptions(options PermOptions) DialMVCCOption
func WithPort ¶
func WithPort(port int) DialMVCCOption
func WithUAAOptions ¶
func WithUAAOptions(options UAAOptions) DialMVCCOption
type ErrUnexpectedStatusCode ¶
type ErrUnexpectedStatusCode struct {
StatusCode int
}
func (*ErrUnexpectedStatusCode) Error ¶
func (e *ErrUnexpectedStatusCode) Error() string
type MVCC ¶
type MVCC struct {
// contains filtered or unexported fields
}
func DialMVCC ¶
func DialMVCC(dialOptions ...DialMVCCOption) (*MVCC, error)
func (*MVCC) V2DeleteOrganization ¶
func (*MVCC) V2SetFeatureFlag ¶
func (*MVCC) V3CreateApp ¶
func (*MVCC) V3CreateBuild ¶
func (*MVCC) V3CreateOrganization ¶
func (cc *MVCC) V3CreateOrganization(authToken string) (Organization, error)
func (*MVCC) V3CreatePackage ¶
func (*MVCC) V3CreateSpace ¶
func (cc *MVCC) V3CreateSpace(authToken string, parentOrg Organization) (Space, error)
func (*MVCC) V3CreateTask ¶
func (*MVCC) V3GetPackage ¶
type Organization ¶
type Package ¶
type Package struct {
UUID string
Type PackageType
State string
}
type PackageType ¶
type PackageType string
const ( BitsType PackageType = "bits" DockerType PackageType = "docker" )
type PermOptions ¶
type UAAOptions ¶
type UAAOptions struct {
Port int
}
type V2OrganizationRequest ¶
type V2OrganizationRequest struct {
Status string `json:"status"`
}
type V2OrganizationResponse ¶
type V2SpaceRequest ¶
type V2SpaceResponse ¶
type V3ErrorResponse ¶
type V3ErrorResponse struct {
Errors []V3Error `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.