Documentation ¶
Index ¶
- type Addon
- func (s *Addon) FindAll(namespace internal.Namespace) ([]*internal.Addon, error)
- func (s *Addon) Get(namespace internal.Namespace, name internal.AddonName, ver semver.Version) (*internal.Addon, error)
- func (s *Addon) GetByID(namespace internal.Namespace, id internal.AddonID) (*internal.Addon, error)
- func (s *Addon) Remove(namespace internal.Namespace, name internal.AddonName, ver semver.Version) error
- func (s *Addon) RemoveAll(namespace internal.Namespace) error
- func (s *Addon) RemoveByID(namespace internal.Namespace, id internal.AddonID) error
- func (s *Addon) Upsert(namespace internal.Namespace, addon *internal.Addon) (replaced bool, err error)
- type BindOperation
- func (s *BindOperation) Get(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID) (*internal.BindOperation, error)
- func (s *BindOperation) GetAll(iID internal.InstanceID) ([]*internal.BindOperation, error)
- func (s *BindOperation) Insert(bo *internal.BindOperation) error
- func (s *BindOperation) Remove(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID) error
- func (s *BindOperation) UpdateState(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID, ...) error
- func (s *BindOperation) UpdateStateDesc(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID, ...) error
- func (s *BindOperation) WithTimeProvider(nowProvider func() time.Time) *BindOperation
- type Chart
- func (s *Chart) Get(namespace internal.Namespace, name internal.ChartName, ver semver.Version) (*chart.Chart, error)
- func (s *Chart) Remove(namespace internal.Namespace, name internal.ChartName, ver semver.Version) error
- func (s *Chart) Upsert(namespace internal.Namespace, c *chart.Chart) (replaced bool, err error)
- type Config
- type Instance
- func (s *Instance) Get(id internal.InstanceID) (*internal.Instance, error)
- func (s *Instance) GetAll() ([]*internal.Instance, error)
- func (s *Instance) Insert(i *internal.Instance) error
- func (s *Instance) Remove(id internal.InstanceID) error
- func (s *Instance) Upsert(i *internal.Instance) (replaced bool, err error)
- type InstanceBindData
- type InstanceOperation
- func (s *InstanceOperation) Get(iID internal.InstanceID, opID internal.OperationID) (*internal.InstanceOperation, error)
- func (s *InstanceOperation) GetAll(iID internal.InstanceID) ([]*internal.InstanceOperation, error)
- func (s *InstanceOperation) Insert(io *internal.InstanceOperation) error
- func (s *InstanceOperation) Remove(iID internal.InstanceID, opID internal.OperationID) error
- func (s *InstanceOperation) UpdateState(iID internal.InstanceID, opID internal.OperationID, ...) error
- func (s *InstanceOperation) UpdateStateDesc(iID internal.InstanceID, opID internal.OperationID, ...) error
- func (s *InstanceOperation) WithTimeProvider(nowProvider func() time.Time) *InstanceOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addon ¶
type Addon struct {
// contains filtered or unexported fields
}
Addon implements in-memory storage for Addon entities.
func (*Addon) Get ¶
func (s *Addon) Get(namespace internal.Namespace, name internal.AddonName, ver semver.Version) (*internal.Addon, error)
Get returns object from storage.
func (*Addon) Remove ¶
func (s *Addon) Remove(namespace internal.Namespace, name internal.AddonName, ver semver.Version) error
Remove removes object from storage.
func (*Addon) RemoveByID ¶
RemoveByID is removing object by primary ID from storage.
type BindOperation ¶ added in v1.1.0
type BindOperation struct {
// contains filtered or unexported fields
}
BindOperation implements in-memory storage BindOperation.
func NewBindOperation ¶ added in v1.1.0
func NewBindOperation() *BindOperation
NewBindOperation returns new instance of BindOperation storage.
func (*BindOperation) Get ¶ added in v1.1.0
func (s *BindOperation) Get(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID) (*internal.BindOperation, error)
Get returns object from storage.
func (*BindOperation) GetAll ¶ added in v1.1.0
func (s *BindOperation) GetAll(iID internal.InstanceID) ([]*internal.BindOperation, error)
GetAll returns all objects from storage.
func (*BindOperation) Insert ¶ added in v1.1.0
func (s *BindOperation) Insert(bo *internal.BindOperation) error
Insert inserts object into storage.
func (*BindOperation) Remove ¶ added in v1.1.0
func (s *BindOperation) Remove(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID) error
Remove removes object from storage.
func (*BindOperation) UpdateState ¶ added in v1.1.0
func (s *BindOperation) UpdateState(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID, state internal.OperationState) error
UpdateState modifies state on object in storage.
func (*BindOperation) UpdateStateDesc ¶ added in v1.1.0
func (s *BindOperation) UpdateStateDesc(iID internal.InstanceID, bID internal.BindingID, opID internal.OperationID, state internal.OperationState, desc *string) error
UpdateStateDesc updates both state and description for single operation. If desc is nil than description will be removed.
func (*BindOperation) WithTimeProvider ¶ added in v1.1.0
func (s *BindOperation) WithTimeProvider(nowProvider func() time.Time) *BindOperation
WithTimeProvider allows for passing custom time provider. Used mostly in testing.
type Chart ¶
type Chart struct {
// contains filtered or unexported fields
}
Chart entity
func (*Chart) Get ¶
func (s *Chart) Get(namespace internal.Namespace, name internal.ChartName, ver semver.Version) (*chart.Chart, error)
Get returns from memory Chart with given name and version
type Config ¶
type Config struct {
MaxKeys int64 `json:"max-keys"`
}
Config provide config for storage
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance implements in-memory storage for Instance entities.
func (*Instance) Remove ¶
func (s *Instance) Remove(id internal.InstanceID) error
Remove removing object from storage.
type InstanceBindData ¶
type InstanceBindData struct {
// contains filtered or unexported fields
}
InstanceBindData implements in-memory based storage for BindData.
func NewInstanceBindData ¶
func NewInstanceBindData() *InstanceBindData
NewInstanceBindData returns new instance of BindData storage.
func (*InstanceBindData) Get ¶
func (s *InstanceBindData) Get(iID internal.InstanceID) (*internal.InstanceBindData, error)
Get returns object from storage.
func (*InstanceBindData) Insert ¶
func (s *InstanceBindData) Insert(ibd *internal.InstanceBindData) error
Insert inserts object into storage.
func (*InstanceBindData) Remove ¶
func (s *InstanceBindData) Remove(iID internal.InstanceID) error
Remove removes object from storage.
type InstanceOperation ¶
type InstanceOperation struct {
// contains filtered or unexported fields
}
InstanceOperation implements in-memory storage InstanceOperation.
func NewInstanceOperation ¶
func NewInstanceOperation() *InstanceOperation
NewInstanceOperation returns new instance of InstanceOperation storage.
func (*InstanceOperation) Get ¶
func (s *InstanceOperation) Get(iID internal.InstanceID, opID internal.OperationID) (*internal.InstanceOperation, error)
Get returns object from storage.
func (*InstanceOperation) GetAll ¶
func (s *InstanceOperation) GetAll(iID internal.InstanceID) ([]*internal.InstanceOperation, error)
GetAll returns all objects from storage.
func (*InstanceOperation) Insert ¶
func (s *InstanceOperation) Insert(io *internal.InstanceOperation) error
Insert inserts object into storage.
func (*InstanceOperation) Remove ¶
func (s *InstanceOperation) Remove(iID internal.InstanceID, opID internal.OperationID) error
Remove removes object from storage.
func (*InstanceOperation) UpdateState ¶
func (s *InstanceOperation) UpdateState(iID internal.InstanceID, opID internal.OperationID, state internal.OperationState) error
UpdateState modifies state on object in storage.
func (*InstanceOperation) UpdateStateDesc ¶
func (s *InstanceOperation) UpdateStateDesc(iID internal.InstanceID, opID internal.OperationID, state internal.OperationState, desc *string) error
UpdateStateDesc updates both state and description for single operation. If desc is nil than description will be removed.
func (*InstanceOperation) WithTimeProvider ¶
func (s *InstanceOperation) WithTimeProvider(nowProvider func() time.Time) *InstanceOperation
WithTimeProvider allows for passing custom time provider. Used mostly in testing.