ros

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 ros is a generated GoMock package.

Index

Constants

View Source
const (
	StackId     = "StackId"
	StackName   = "StackName"
	StackStatus = "StackStatus"
	OutputKey   = "OutputKey"
	OutputValue = "OutputValue"
)
View Source
const DryRunFakeStack = "DryRunFakeStack"

Variables

This section is empty.

Functions

func CodeOfError

func CodeOfError(error error) string

CodeOfError returns the Code for a particular error.

func IsStackNotFound

func IsStackNotFound(error error) bool

IsStackNotFound returns true if the stack not found.

func IsStackSame

func IsStackSame(error error) bool

IsStackSame returns true if the stack is completely same.

Types

type MockError

type MockError struct {
	// contains filtered or unexported fields
}

MockError is a mock of Error interface

func NewMockError

func NewMockError(ctrl *gomock.Controller) *MockError

NewMockError creates a new mock instance

func (*MockError) EXPECT

func (m *MockError) EXPECT() *MockErrorMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockError) Error

func (m *MockError) Error() string

Error mocks base method

func (*MockError) ErrorCode

func (m *MockError) ErrorCode() string

ErrorCode mocks base method

func (*MockError) HttpStatus

func (m *MockError) HttpStatus() int

HttpStatus mocks base method

func (*MockError) Message

func (m *MockError) Message() string

Message mocks base method

func (*MockError) OriginError

func (m *MockError) OriginError() error

OriginError mocks base method

type MockErrorMockRecorder

type MockErrorMockRecorder struct {
	// contains filtered or unexported fields
}

MockErrorMockRecorder is the mock recorder for MockError

func (*MockErrorMockRecorder) Error

func (mr *MockErrorMockRecorder) Error() *gomock.Call

Error indicates an expected call of Error

func (*MockErrorMockRecorder) ErrorCode

func (mr *MockErrorMockRecorder) ErrorCode() *gomock.Call

ErrorCode indicates an expected call of ErrorCode

func (*MockErrorMockRecorder) HttpStatus

func (mr *MockErrorMockRecorder) HttpStatus() *gomock.Call

HttpStatus indicates an expected call of HttpStatus

func (*MockErrorMockRecorder) Message

func (mr *MockErrorMockRecorder) Message() *gomock.Call

Message indicates an expected call of Message

func (*MockErrorMockRecorder) OriginError

func (mr *MockErrorMockRecorder) OriginError() *gomock.Call

OriginError indicates an expected call of OriginError

type Output

type Output struct {
	Description string      `json:"Description,omitempty"`
	Value       interface{} `json:"Value,omitempty"`
}

type Parameter

type Parameter struct {
	Name        string      `json:"-"`
	Type        string      `json:"Type"`
	Value       string      `json:"-"`
	Default     interface{} `json:"Default,omitempty"`
	Description string      `json:"Description,omitempty"`
}

type Resource

type Resource struct {
	Type           string                 `json:"Type"`
	Properties     map[string]interface{} `json:"Properties,omitempty"`
	DependsOn      []string               `json:"DependsOn,omitempty"`
	DeletionPolicy string                 `json:"DeletionPolicy,omitempty"`
}

type Stack

type Stack struct {
	Client       *rosapi.Client
	Id           string                   `json:"Id"`
	Name         string                   `json:"Name"`
	Status       string                   `json:"Status"`
	StatusReason string                   `json:"StatusReason"`
	Outputs      []map[string]interface{} `json:"Outputs"`
	// contains filtered or unexported fields
}

func NewStack

func NewStack(appContext *appconf.Context, stackName string, template *Template, opts ...StackOption) (stack *Stack, err error)

NewStack parses application configuration and creates a ROS stack

func (*Stack) Delete

func (s *Stack) Delete() error

func (*Stack) IsInDeleteStatus

func (s *Stack) IsInDeleteStatus() bool

func (*Stack) Refresh

func (s *Stack) Refresh() error

func (*Stack) Update

func (s *Stack) Update(template *Template) error

func (*Stack) WaitUntilDone

func (s *Stack) WaitUntilDone() (success bool, statusReason string)

type StackOption

type StackOption interface {
	// contains filtered or unexported methods
}

StackOption has methods to work with secret option.

func WithDryRunHandler

func WithDryRunHandler(dryRunHandler func(stack *Stack, request requests.AcsRequest) error) StackOption

WithDryRunHandler sets client set in secret option

type StackStatusType

type StackStatusType string
const (
	CreateInProgress         StackStatusType = "CREATE_IN_PROGRESS"
	CreateFailed             StackStatusType = "CREATE_FAILED"
	CreateComplete           StackStatusType = "CREATE_COMPLETE"
	UpdateInProgress         StackStatusType = "UPDATE_IN_PROGRESS"
	UpdateFailed             StackStatusType = "UPDATE_FAILED"
	UpdateComplete           StackStatusType = "UPDATE_COMPLETE"
	DeleteInProgress         StackStatusType = "DELETE_IN_PROGRESS"
	DeleteFailed             StackStatusType = "DELETE_FAILED"
	DeleteComplete           StackStatusType = "DELETE_COMPLETE"
	CreateRollbackInProgress StackStatusType = "CREATE_ROLLBACK_IN_PROGRESS"
	CreateRollbackFailed     StackStatusType = "CREATE_ROLLBACK_FAILED"
	CreateRollbackComplete   StackStatusType = "CREATE_ROLLBACK_COMPLETE"
	RollbackInProgress       StackStatusType = "ROLLBACK_IN_PROGRESS"
	RollbackFailed           StackStatusType = "ROLLBACK_FAILED"
	RollbackComplete         StackStatusType = "ROLLBACK_COMPLETE"
	CheckInProgress          StackStatusType = "CHECK_IN_PROGRESS"
	CheckFailed              StackStatusType = "CHECK_FAILED"
	CheckComplete            StackStatusType = "CHECK_COMPLETE"
	ReviewInProgress         StackStatusType = "REVIEW_IN_PROGRESS"
)

type Template

type Template struct {
	ROSTemplateFormatVersion string               `json:"ROSTemplateFormatVersion"`
	Description              string               `json:"Description,omitempty"`
	Parameters               map[string]Parameter `json:"Parameters,omitempty"`
	Resources                map[string]Resource  `json:"Resources,omitempty"`
	Outputs                  map[string]Output    `json:"Outputs,omitempty"`
}

func NewTemplate

func NewTemplate(appContext *appconf.Context, appConf *appconf.AppConf, opts ...TemplateOption) (*Template, error)

NewTemplate parses application configuration and returns ROS template

func (*Template) Marshal

func (t *Template) Marshal() ([]byte, error)

Marshal generates JSON string

type TemplateOption

type TemplateOption interface {
	// contains filtered or unexported methods
}

TemplateOption has methods to work with template option.

func WithCompSchematicGetter

func WithCompSchematicGetter(compSchematicGetter func(namespace, name string) (*v1alpha1.ComponentSchematic, error)) TemplateOption

WithCompSchematicGetter sets component getter in template option

Jump to

Keyboard shortcuts

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