Documentation
¶
Index ¶
- type App
- type AppMeta
- type Apps
- type Change
- type ChangeImpl
- type ChangeMeta
- type LabeledApp
- func (a *LabeledApp) BeginChange(ChangeMeta) (Change, error)
- func (a *LabeledApp) Changes() ([]Change, error)
- func (a *LabeledApp) CreateOrUpdate(labels map[string]string) error
- func (a *LabeledApp) Delete() error
- func (a *LabeledApp) Exists() (bool, error)
- func (a *LabeledApp) LabelSelector() (labels.Selector, error)
- func (a *LabeledApp) LastChange() (Change, error)
- func (a *LabeledApp) Meta() (AppMeta, error)
- func (a *LabeledApp) Name() string
- type NoopChange
- type Preparation
- type PrepareResourcesOpts
- type RecordedApp
- func (a *RecordedApp) BeginChange(meta ChangeMeta) (Change, error)
- func (a *RecordedApp) Changes() ([]Change, error)
- func (a *RecordedApp) CreateOrUpdate(labels map[string]string) error
- func (a *RecordedApp) Delete() error
- func (a *RecordedApp) Exists() (bool, error)
- func (a *RecordedApp) LabelSelector() (labels.Selector, error)
- func (a *RecordedApp) LastChange() (Change, error)
- func (a *RecordedApp) Meta() (AppMeta, error)
- func (a *RecordedApp) Name() string
- type RecordedAppChanges
- type Touch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMeta ¶
type AppMeta struct { LabelKey string `json:"labelKey"` LabelValue string `json:"labelValue"` LastChangeName string `json:"lastChangeName,omitempty"` LastChange ChangeMeta `json:"lastChange,omitempty"` }
func NewAppMetaFromData ¶
func NewAppMetaFromString ¶
type Change ¶
type Change interface { Name() string Meta() ChangeMeta Fail() error Succeed() error }
type ChangeImpl ¶
type ChangeImpl struct {
// contains filtered or unexported fields
}
func (*ChangeImpl) Fail ¶
func (c *ChangeImpl) Fail() error
func (*ChangeImpl) Meta ¶
func (c *ChangeImpl) Meta() ChangeMeta
func (*ChangeImpl) Name ¶
func (c *ChangeImpl) Name() string
func (*ChangeImpl) Succeed ¶
func (c *ChangeImpl) Succeed() error
type ChangeMeta ¶
type ChangeMeta struct { StartedAt time.Time `json:"startedAt"` FinishedAt time.Time `json:"finishedAt,omitempty"` Successful *bool `json:"successful,omitempty"` Description string `json:"description,omitempty"` Namespaces []string `json:"namespaces,omitempty"` }
func NewChangeMetaFromData ¶
func NewChangeMetaFromData(data map[string]string) ChangeMeta
func NewChangeMetaFromString ¶
func NewChangeMetaFromString(data string) ChangeMeta
func (ChangeMeta) AsData ¶
func (m ChangeMeta) AsData() map[string]string
func (ChangeMeta) AsString ¶
func (m ChangeMeta) AsString() string
type LabeledApp ¶
type LabeledApp struct {
// contains filtered or unexported fields
}
func (*LabeledApp) BeginChange ¶
func (a *LabeledApp) BeginChange(ChangeMeta) (Change, error)
func (*LabeledApp) Changes ¶
func (a *LabeledApp) Changes() ([]Change, error)
func (*LabeledApp) CreateOrUpdate ¶
func (a *LabeledApp) CreateOrUpdate(labels map[string]string) error
func (*LabeledApp) Delete ¶
func (a *LabeledApp) Delete() error
func (*LabeledApp) Exists ¶
func (a *LabeledApp) Exists() (bool, error)
func (*LabeledApp) LabelSelector ¶
func (a *LabeledApp) LabelSelector() (labels.Selector, error)
func (*LabeledApp) LastChange ¶
func (a *LabeledApp) LastChange() (Change, error)
func (*LabeledApp) Meta ¶
func (a *LabeledApp) Meta() (AppMeta, error)
func (*LabeledApp) Name ¶
func (a *LabeledApp) Name() string
type NoopChange ¶
type NoopChange struct{}
func (NoopChange) Fail ¶
func (NoopChange) Fail() error
func (NoopChange) Meta ¶
func (NoopChange) Meta() ChangeMeta
func (NoopChange) Name ¶
func (NoopChange) Name() string
func (NoopChange) Succeed ¶
func (NoopChange) Succeed() error
type Preparation ¶
type Preparation struct {
// contains filtered or unexported fields
}
func NewPreparation ¶
func NewPreparation(coreClient kubernetes.Interface, dynamicClient dynamic.Interface) Preparation
func (Preparation) PrepareResources ¶
func (a Preparation) PrepareResources(resources []ctlres.Resource, opts PrepareResourcesOpts) ([]ctlres.Resource, error)
func (Preparation) ValidateResources ¶
func (a Preparation) ValidateResources(resources []ctlres.Resource, opts PrepareResourcesOpts) error
type PrepareResourcesOpts ¶
type PrepareResourcesOpts struct { AllowCheck bool AllowedNamespaces []string AllowAllNamespaces bool AllowCluster bool IntoNamespace string // this ns is allowed automatically MapNamespaces []string // this ns is allowed automatically DefaultNamespace string // this ns is allowed automatically }
func (PrepareResourcesOpts) InAllowedNamespaces ¶
func (o PrepareResourcesOpts) InAllowedNamespaces(ns string) bool
type RecordedApp ¶
type RecordedApp struct {
// contains filtered or unexported fields
}
func (*RecordedApp) BeginChange ¶
func (a *RecordedApp) BeginChange(meta ChangeMeta) (Change, error)
func (*RecordedApp) Changes ¶
func (a *RecordedApp) Changes() ([]Change, error)
func (*RecordedApp) CreateOrUpdate ¶
func (a *RecordedApp) CreateOrUpdate(labels map[string]string) error
func (*RecordedApp) Delete ¶
func (a *RecordedApp) Delete() error
func (*RecordedApp) Exists ¶
func (a *RecordedApp) Exists() (bool, error)
func (*RecordedApp) LabelSelector ¶
func (a *RecordedApp) LabelSelector() (labels.Selector, error)
func (*RecordedApp) LastChange ¶
func (a *RecordedApp) LastChange() (Change, error)
func (*RecordedApp) Meta ¶
func (a *RecordedApp) Meta() (AppMeta, error)
func (*RecordedApp) Name ¶
func (a *RecordedApp) Name() string
type RecordedAppChanges ¶
type RecordedAppChanges struct {
// contains filtered or unexported fields
}
func NewRecordedAppChanges ¶
func NewRecordedAppChanges(nsName, appName string, coreClient kubernetes.Interface) RecordedAppChanges
func (RecordedAppChanges) Begin ¶
func (a RecordedAppChanges) Begin(meta ChangeMeta) (*ChangeImpl, error)
func (RecordedAppChanges) DeleteAll ¶
func (a RecordedAppChanges) DeleteAll() error
func (RecordedAppChanges) List ¶
func (a RecordedAppChanges) List() ([]Change, error)
Click to show internal directories.
Click to hide internal directories.