Documentation ¶
Index ¶
- func IsConflictError(err error) bool
- func IsNotFoundError(err error) bool
- func IsValidationError(err error) bool
- type BindAppArgs
- type CacheManager
- type ConfigurationBlock
- type ConfigurationBlockHandler
- type ConflictError
- type CreateArgs
- type ExtraFileHandler
- type File
- type NotFoundError
- type PodStatus
- type PodStatusMap
- type PurgeCacheArgs
- type Route
- type RouteHandler
- type RpaasManager
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsConflictError ¶
func IsNotFoundError ¶
func IsValidationError ¶
Types ¶
type BindAppArgs ¶
type CacheManager ¶
type ConfigurationBlock ¶
type ConfigurationBlockHandler ¶
type ConfigurationBlockHandler interface { // DeleteBlock removes the configuration block named by blockName. It returns // a nil error meaning it was successful, otherwise a non-nil one which // describes the reached problem. DeleteBlock(ctx context.Context, instanceName, blockName string) error // ListBlocks returns all custom configuration blocks from instance (which // name is instanceName). It returns a nil error meaning it was successful, // otherwise a non-nil one which describes the reached problem. ListBlocks(ctx context.Context, instanceName string) ([]ConfigurationBlock, error) // UpdateBlock overwrites the older configuration block content with the one. // Whether the configuration block entry does not exist, it will already be // created with the new content. It returns a nil error meaning it was // successful, otherwise a non-nil one which describes the reached problem. UpdateBlock(ctx context.Context, instanceName string, block ConfigurationBlock) error }
ConfigurationBlockHandler defines some functions to handle the custom configuration blocks from an instance.
type ConflictError ¶
type ConflictError struct {
Msg string
}
func (ConflictError) Error ¶
func (e ConflictError) Error() string
func (ConflictError) IsConflict ¶
func (ConflictError) IsConflict() bool
type CreateArgs ¶
type CreateArgs struct { Name string `json:"name" form:"name"` Plan string `json:"plan" form:"plan"` Team string `json:"team" form:"team"` User string `json:"user" form:"user"` Tags []string `json:"tags" form:"tags"` EventID string `json:"eventid" form:"eventid"` Description string `json:"description" form:"description"` Flavor string `json:"flavor" form:"flavor"` IP string `json:"ip" form:"ip"` PlanOverride string `json:"plan-override" form:"plan-override"` }
type ExtraFileHandler ¶
type ExtraFileHandler interface { CreateExtraFiles(ctx context.Context, instanceName string, files ...File) error DeleteExtraFiles(ctx context.Context, instanceName string, filenames ...string) error GetExtraFiles(ctx context.Context, instanceName string) ([]File, error) UpdateExtraFiles(ctx context.Context, instanceName string, files ...File) error }
type File ¶
func (File) MarshalJSON ¶
type NotFoundError ¶
type NotFoundError struct {
Msg string
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
func (NotFoundError) IsNotFound ¶
func (NotFoundError) IsNotFound() bool
type PodStatusMap ¶
type PurgeCacheArgs ¶
type RouteHandler ¶
type RpaasManager ¶
type RpaasManager interface { ConfigurationBlockHandler ExtraFileHandler RouteHandler UpdateCertificate(ctx context.Context, instance, name string, cert tls.Certificate) error CreateInstance(ctx context.Context, args CreateArgs) error DeleteInstance(ctx context.Context, name string) error GetInstance(ctx context.Context, name string) (*v1alpha1.RpaasInstance, error) GetInstanceAddress(ctx context.Context, name string) (string, error) GetInstanceStatus(ctx context.Context, name string) (PodStatusMap, error) Scale(ctx context.Context, name string, replicas int32) error GetPlans(ctx context.Context) ([]v1alpha1.RpaasPlan, error) BindApp(ctx context.Context, instanceName string, args BindAppArgs) error UnbindApp(ctx context.Context, instanceName string) error PurgeCache(ctx context.Context, instanceName string, args PurgeCacheArgs) (int, error) }
type ValidationError ¶
type ValidationError struct {
Msg string
}
func (ValidationError) Error ¶
func (e ValidationError) Error() string
func (ValidationError) IsValidation ¶
func (ValidationError) IsValidation() bool
Click to show internal directories.
Click to hide internal directories.