Documentation ¶
Overview ¶
Package appstack is a generated GoMock package.
Index ¶
- Constants
- type AppStack
- func (c *AppStack) Delete() (err error)
- func (c *AppStack) GetAppName() string
- func (c *AppStack) GetContext() (ctx *appconf.Context)
- func (c *AppStack) GetData() (data map[string]string, err error)
- func (c *AppStack) GetName() string
- func (c *AppStack) GetOutputSecretName(compInstanceName string) string
- func (c *AppStack) GetSecretName() string
- func (c *AppStack) GetStack() (stack *ros.Stack, err error)
- func (c *AppStack) GetStatus() (value string, err error)
- func (c *AppStack) IsFailed() (failed bool, err error)
- func (c *AppStack) IsProgressing() (progressing bool, err error)
- func (c *AppStack) SaveOutputs(stack *ros.Stack)
- func (c *AppStack) SetError(e error) (err error)
- func (c *AppStack) SetIdAndTemplate(stackId string, templateBody string) (err error)
- func (c *AppStack) SetProgressing() (err error)
- func (c *AppStack) SetReady() (err error)
- func (c *AppStack) WaitUntilDone() (status string)
- type AppStackInfo
- type AppStackInterface
- type AppStackOption
- func WithAppConfFromContextGetter(getAppConfFromContext appconf.AppConfFromContextGetterFunc) AppStackOption
- func WithAppConfGetter(getAppConf appconf.AppConfGetterFunc) AppStackOption
- func WithProgressingAppStackInfosSecret(progressingAppStacksSecret k8s.SecretInterface) AppStackOption
- func WithSecret(secret k8s.SecretInterface) AppStackOption
- func WithSecretFactory(newSecret func(name string, opts ...k8s.SecretOption) k8s.SecretInterface) AppStackOption
- type MockAppStackInterface
- func (m *MockAppStackInterface) Delete() error
- func (m *MockAppStackInterface) EXPECT() *MockAppStackInterfaceMockRecorder
- func (m *MockAppStackInterface) GetData() (map[string]string, error)
- func (m *MockAppStackInterface) GetOutputSecretName(compInstanceName string) string
- func (m *MockAppStackInterface) GetSecretName() string
- func (m *MockAppStackInterface) GetStack() (*ros.Stack, error)
- func (m *MockAppStackInterface) GetStatus() (string, error)
- func (m *MockAppStackInterface) IsFailed() (bool, error)
- func (m *MockAppStackInterface) IsProgressing() (bool, error)
- func (m *MockAppStackInterface) SaveOutputs(stack *ros.Stack)
- func (m *MockAppStackInterface) SetError(e error) error
- func (m *MockAppStackInterface) SetIdAndTemplate(stackId, templateBody string) error
- func (m *MockAppStackInterface) SetProgressing() error
- func (m *MockAppStackInterface) SetReady() error
- type MockAppStackInterfaceMockRecorder
- func (mr *MockAppStackInterfaceMockRecorder) Delete() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) GetData() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) GetOutputSecretName(compInstanceName interface{}) *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) GetSecretName() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) GetStack() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) GetStatus() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) IsFailed() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) IsProgressing() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) SaveOutputs(stack interface{}) *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) SetError(e interface{}) *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) SetIdAndTemplate(stackId, templateBody interface{}) *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) SetProgressing() *gomock.Call
- func (mr *MockAppStackInterfaceMockRecorder) SetReady() *gomock.Call
- type MockAppStackOption
- type MockAppStackOptionMockRecorder
Constants ¶
const ( AppStackName = "AppStackName" AppStackStatus = "AppStackStatus" AppStackOutputSecretNames = "AppStackOutputSecretNames" ProgressingAppStackInfos = "ProgressingAppStackInfos" Message = "Message" TemplateBody = "TemplateBody" Init = "Init" Progressing = "Progressing" Ready = "Ready" Failed = "Failed" Deleted = "Deleted" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppStack ¶
type AppStack struct {
// contains filtered or unexported fields
}
AppStack implements AppStackInterface
func LoadProgressingAppStacks ¶
func LoadProgressingAppStacks( OamCrdClient *versioned.Clientset, RosCrdClient *roscrd.Clientset, opts ...AppStackOption) (appStacks []*AppStack, err error)
LoadProgressingAppStacks returns all app stacks in Progressing and an error if there is any.
func NewAppStack ¶
func NewAppStack(ctx *appconf.Context, opts ...AppStackOption) *AppStack
NewAppStack returns an app stack
func (*AppStack) GetAppName ¶
GetAppName returns name of app.
func (*AppStack) GetContext ¶
GetStatus returns the AppStackStatus of app stack, and an error, if there is any.
func (*AppStack) GetOutputSecretName ¶
GetOutputSecretName takes compInstanceName and returns the corresponding secret name.
func (*AppStack) GetSecretName ¶
GetSecretName returns secret name of app stack.
func (*AppStack) GetStatus ¶
GetStatus returns the AppStackStatus of app stack, and an error, if there is any.
func (*AppStack) IsFailed ¶
IsFailed returns whether app stack is Failed, and an error, if there is any.
func (*AppStack) IsProgressing ¶
IsProgressing returns whether app stack is Progressing, and an error, if there is any.
func (*AppStack) SaveOutputs ¶
SaveOutputs saves outputs of stack.
func (*AppStack) SetError ¶
SetError set AppStackStatus to Failed and error message. Returns an error if one occurs.
func (*AppStack) SetIdAndTemplate ¶
SetIdAndTemplate set stack ID and template body. Returns an error if one occurs.
func (*AppStack) SetProgressing ¶
SetProgressing set AppStackStatus to Progressing. Returns an error if one occurs.
func (*AppStack) WaitUntilDone ¶
WaitUntilDone waits app stack until done.
type AppStackInfo ¶
type AppStackInfo struct { AppConfNamespace string `json:"AppConfNamespace,omitempty"` AppConfName string `json:"AppConfName,omitempty"` RegionId string `json:"RegionId,omitempty"` AliUid string `json:"AliUid,omitempty"` }
AppStackInfo used for updating processing app stacks
type AppStackInterface ¶
type AppStackInterface interface { GetName() string GetAppName() string GetSecretName() string GetOutputSecretName(compInstanceName string) string GetData() (data map[string]string, err error) GetStack() (stack *ros.Stack, err error) GetStatus() (value string, err error) GetContext() (ctx *appconf.Context) SetIdAndTemplate(stackId string, templateBody string) (err error) SetError(e error) (err error) SetProgressing() (err error) SetReady() (err error) SaveOutputs(stack *ros.Stack) IsProgressing() (progressing bool, err error) IsFailed() (failed bool, err error) Delete() (err error) WaitUntilDone() (status string) }
AppStackInterface has methods to work with app stack resources.
type AppStackOption ¶
type AppStackOption interface {
// contains filtered or unexported methods
}
AppStackOption has methods to work with app stack option.
func WithAppConfFromContextGetter ¶
func WithAppConfFromContextGetter(getAppConfFromContext appconf.AppConfFromContextGetterFunc) AppStackOption
WithAppConfFromContextGetter sets GetAppConfFromContext in app stack option
func WithAppConfGetter ¶
func WithAppConfGetter(getAppConf appconf.AppConfGetterFunc) AppStackOption
WithAppConfGetter sets GetAppConfin app stack option
func WithProgressingAppStackInfosSecret ¶
func WithProgressingAppStackInfosSecret(progressingAppStacksSecret k8s.SecretInterface) AppStackOption
WithProgressingAppStackInfosSecret sets ProgressingAppStackInfosSecret in app stack option
func WithSecret ¶
func WithSecret(secret k8s.SecretInterface) AppStackOption
WithSecret sets secret in app stack option
func WithSecretFactory ¶
func WithSecretFactory(newSecret func(name string, opts ...k8s.SecretOption) k8s.SecretInterface) AppStackOption
WithSecretFactory sets NetSecret in app stack option
type MockAppStackInterface ¶
type MockAppStackInterface struct {
// contains filtered or unexported fields
}
MockAppStackInterface is a mock of AppStackInterface interface
func NewMockAppStackInterface ¶
func NewMockAppStackInterface(ctrl *gomock.Controller) *MockAppStackInterface
NewMockAppStackInterface creates a new mock instance
func (*MockAppStackInterface) Delete ¶
func (m *MockAppStackInterface) Delete() error
Delete mocks base method
func (*MockAppStackInterface) EXPECT ¶
func (m *MockAppStackInterface) EXPECT() *MockAppStackInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAppStackInterface) GetData ¶
func (m *MockAppStackInterface) GetData() (map[string]string, error)
GetData mocks base method
func (*MockAppStackInterface) GetOutputSecretName ¶
func (m *MockAppStackInterface) GetOutputSecretName(compInstanceName string) string
GetOutputSecretName mocks base method
func (*MockAppStackInterface) GetSecretName ¶
func (m *MockAppStackInterface) GetSecretName() string
GetSecretName mocks base method
func (*MockAppStackInterface) GetStack ¶
func (m *MockAppStackInterface) GetStack() (*ros.Stack, error)
GetStack mocks base method
func (*MockAppStackInterface) GetStatus ¶
func (m *MockAppStackInterface) GetStatus() (string, error)
GetStatus mocks base method
func (*MockAppStackInterface) IsFailed ¶
func (m *MockAppStackInterface) IsFailed() (bool, error)
IsFailed mocks base method
func (*MockAppStackInterface) IsProgressing ¶
func (m *MockAppStackInterface) IsProgressing() (bool, error)
IsProgressing mocks base method
func (*MockAppStackInterface) SaveOutputs ¶
func (m *MockAppStackInterface) SaveOutputs(stack *ros.Stack)
SaveOutputs mocks base method
func (*MockAppStackInterface) SetError ¶
func (m *MockAppStackInterface) SetError(e error) error
SetError mocks base method
func (*MockAppStackInterface) SetIdAndTemplate ¶
func (m *MockAppStackInterface) SetIdAndTemplate(stackId, templateBody string) error
SetIdAndTemplate mocks base method
func (*MockAppStackInterface) SetProgressing ¶
func (m *MockAppStackInterface) SetProgressing() error
SetProgressing mocks base method
func (*MockAppStackInterface) SetReady ¶
func (m *MockAppStackInterface) SetReady() error
SetReady mocks base method
type MockAppStackInterfaceMockRecorder ¶
type MockAppStackInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockAppStackInterfaceMockRecorder is the mock recorder for MockAppStackInterface
func (*MockAppStackInterfaceMockRecorder) Delete ¶
func (mr *MockAppStackInterfaceMockRecorder) Delete() *gomock.Call
Delete indicates an expected call of Delete
func (*MockAppStackInterfaceMockRecorder) GetData ¶
func (mr *MockAppStackInterfaceMockRecorder) GetData() *gomock.Call
GetData indicates an expected call of GetData
func (*MockAppStackInterfaceMockRecorder) GetOutputSecretName ¶
func (mr *MockAppStackInterfaceMockRecorder) GetOutputSecretName(compInstanceName interface{}) *gomock.Call
GetOutputSecretName indicates an expected call of GetOutputSecretName
func (*MockAppStackInterfaceMockRecorder) GetSecretName ¶
func (mr *MockAppStackInterfaceMockRecorder) GetSecretName() *gomock.Call
GetSecretName indicates an expected call of GetSecretName
func (*MockAppStackInterfaceMockRecorder) GetStack ¶
func (mr *MockAppStackInterfaceMockRecorder) GetStack() *gomock.Call
GetStack indicates an expected call of GetStack
func (*MockAppStackInterfaceMockRecorder) GetStatus ¶
func (mr *MockAppStackInterfaceMockRecorder) GetStatus() *gomock.Call
GetStatus indicates an expected call of GetStatus
func (*MockAppStackInterfaceMockRecorder) IsFailed ¶
func (mr *MockAppStackInterfaceMockRecorder) IsFailed() *gomock.Call
IsFailed indicates an expected call of IsFailed
func (*MockAppStackInterfaceMockRecorder) IsProgressing ¶
func (mr *MockAppStackInterfaceMockRecorder) IsProgressing() *gomock.Call
IsProgressing indicates an expected call of IsProgressing
func (*MockAppStackInterfaceMockRecorder) SaveOutputs ¶
func (mr *MockAppStackInterfaceMockRecorder) SaveOutputs(stack interface{}) *gomock.Call
SaveOutputs indicates an expected call of SaveOutputs
func (*MockAppStackInterfaceMockRecorder) SetError ¶
func (mr *MockAppStackInterfaceMockRecorder) SetError(e interface{}) *gomock.Call
SetError indicates an expected call of SetError
func (*MockAppStackInterfaceMockRecorder) SetIdAndTemplate ¶
func (mr *MockAppStackInterfaceMockRecorder) SetIdAndTemplate(stackId, templateBody interface{}) *gomock.Call
SetIdAndTemplate indicates an expected call of SetIdAndTemplate
func (*MockAppStackInterfaceMockRecorder) SetProgressing ¶
func (mr *MockAppStackInterfaceMockRecorder) SetProgressing() *gomock.Call
SetProgressing indicates an expected call of SetProgressing
func (*MockAppStackInterfaceMockRecorder) SetReady ¶
func (mr *MockAppStackInterfaceMockRecorder) SetReady() *gomock.Call
SetReady indicates an expected call of SetReady
type MockAppStackOption ¶
type MockAppStackOption struct {
// contains filtered or unexported fields
}
MockAppStackOption is a mock of AppStackOption interface
func NewMockAppStackOption ¶
func NewMockAppStackOption(ctrl *gomock.Controller) *MockAppStackOption
NewMockAppStackOption creates a new mock instance
func (*MockAppStackOption) EXPECT ¶
func (m *MockAppStackOption) EXPECT() *MockAppStackOptionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockAppStackOptionMockRecorder ¶
type MockAppStackOptionMockRecorder struct {
// contains filtered or unexported fields
}
MockAppStackOptionMockRecorder is the mock recorder for MockAppStackOption