appstack

package
v0.0.0-...-e3522e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package appstack is a generated GoMock package.

Index

Constants

View Source
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) Delete

func (c *AppStack) Delete() (err error)

Delete deletes outputs and data. Returns an error if one occurs.

func (*AppStack) GetAppName

func (c *AppStack) GetAppName() string

GetAppName returns name of app.

func (*AppStack) GetContext

func (c *AppStack) GetContext() (ctx *appconf.Context)

GetStatus returns the AppStackStatus of app stack, and an error, if there is any.

func (*AppStack) GetData

func (c *AppStack) GetData() (data map[string]string, err error)

GetData returns the data of the secret, and an error, if there is any.

func (*AppStack) GetName

func (c *AppStack) GetName() string

GetName returns name of app stack.

func (*AppStack) GetOutputSecretName

func (c *AppStack) GetOutputSecretName(compInstanceName string) string

GetOutputSecretName takes compInstanceName and returns the corresponding secret name.

func (*AppStack) GetSecretName

func (c *AppStack) GetSecretName() string

GetSecretName returns secret name of app stack.

func (*AppStack) GetStack

func (c *AppStack) GetStack() (stack *ros.Stack, err error)

GetStack returns the stack, and an error, if there is any.

func (*AppStack) GetStatus

func (c *AppStack) GetStatus() (value string, err error)

GetStatus returns the AppStackStatus of app stack, and an error, if there is any.

func (*AppStack) IsFailed

func (c *AppStack) IsFailed() (failed bool, err error)

IsFailed returns whether app stack is Failed, and an error, if there is any.

func (*AppStack) IsProgressing

func (c *AppStack) IsProgressing() (progressing bool, err error)

IsProgressing returns whether app stack is Progressing, and an error, if there is any.

func (*AppStack) SaveOutputs

func (c *AppStack) SaveOutputs(stack *ros.Stack)

SaveOutputs saves outputs of stack.

func (*AppStack) SetError

func (c *AppStack) SetError(e error) (err error)

SetError set AppStackStatus to Failed and error message. Returns an error if one occurs.

func (*AppStack) SetIdAndTemplate

func (c *AppStack) SetIdAndTemplate(stackId string, templateBody string) (err error)

SetIdAndTemplate set stack ID and template body. Returns an error if one occurs.

func (*AppStack) SetProgressing

func (c *AppStack) SetProgressing() (err error)

SetProgressing set AppStackStatus to Progressing. Returns an error if one occurs.

func (*AppStack) SetReady

func (c *AppStack) SetReady() (err error)

SetReady set AppStackStatus to Ready. Returns an error if one occurs.

func (*AppStack) WaitUntilDone

func (c *AppStack) WaitUntilDone() (status string)

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

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

Delete indicates an expected call of Delete

func (*MockAppStackInterfaceMockRecorder) GetData

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

GetStack indicates an expected call of GetStack

func (*MockAppStackInterfaceMockRecorder) GetStatus

GetStatus indicates an expected call of GetStatus

func (*MockAppStackInterfaceMockRecorder) IsFailed

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL