Documentation
¶
Index ¶
- func CopyDependencies(deps *typesv1.Dependencies) *typesv1.Dependencies
- func NewMemoryStateContainer() state.Container
- func NewMockBlueprintLoader(stubDiagnostics []*core.Diagnostic, clock commoncore.Clock, ...) container.Loader
- func NewMockBlueprintValidationStore(validations map[string]*manage.BlueprintValidation) manage.Validation
- func NewMockChangesetStore(validations map[string]*manage.Changeset) manage.Changesets
- func NewMockEventStore(events map[string]*manage.Event) manage.Events
- func SSEToManageEvent(event *sse.Event) *manage.Event
- type ChangeStagingEvent
- type DeployEventWrapper
- type FailingIDGenerator
- type MemoryStateContainer
- func (c *MemoryStateContainer) Children() state.ChildrenContainer
- func (c *MemoryStateContainer) Exports() state.ExportsContainer
- func (c *MemoryStateContainer) Instances() state.InstancesContainer
- func (c *MemoryStateContainer) Links() state.LinksContainer
- func (c *MemoryStateContainer) Metadata() state.MetadataContainer
- func (c *MemoryStateContainer) Resources() state.ResourcesContainer
- type MockBlueprintContainer
- func (m *MockBlueprintContainer) BlueprintSpec() speccore.BlueprintSpec
- func (m *MockBlueprintContainer) Deploy(ctx context.Context, input *container.DeployInput, ...) error
- func (m *MockBlueprintContainer) Destroy(ctx context.Context, input *container.DestroyInput, ...)
- func (m *MockBlueprintContainer) Diagnostics() []*core.Diagnostic
- func (m *MockBlueprintContainer) RefChainCollector() refgraph.RefChainCollector
- func (m *MockBlueprintContainer) ResourceTemplates() map[string]string
- func (m *MockBlueprintContainer) SpecLinkInfo() links.SpecLinkInfo
- func (m *MockBlueprintContainer) StageChanges(ctx context.Context, input *container.StageChangesInput, ...) error
- type MockBlueprintLoader
- func (m *MockBlueprintLoader) Load(ctx context.Context, blueprintSpecFile string, params core.BlueprintParams) (container.BlueprintContainer, error)
- func (m *MockBlueprintLoader) LoadFromSchema(ctx context.Context, blueprintSchema *schema.Blueprint, ...) (container.BlueprintContainer, error)
- func (m *MockBlueprintLoader) LoadString(ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, ...) (container.BlueprintContainer, error)
- func (m *MockBlueprintLoader) Validate(ctx context.Context, blueprintSpecFile string, params core.BlueprintParams) (*container.ValidationResult, error)
- func (m *MockBlueprintLoader) ValidateFromSchema(ctx context.Context, blueprintSchema *schema.Blueprint, ...) (*container.ValidationResult, error)
- func (m *MockBlueprintLoader) ValidateString(ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, ...) (*container.ValidationResult, error)
- type MockBlueprintLoaderOption
- type MockBlueprintResolver
- type MockBlueprintValidationStore
- func (s *MockBlueprintValidationStore) Cleanup(ctx context.Context, thresholdDate time.Time) error
- func (s *MockBlueprintValidationStore) Get(ctx context.Context, id string) (*manage.BlueprintValidation, error)
- func (s *MockBlueprintValidationStore) Save(ctx context.Context, blueprintValidation *manage.BlueprintValidation) error
- type MockChangesetStore
- type MockClock
- type MockEventStore
- func (s *MockEventStore) Cleanup(ctx context.Context, thresholdDate time.Time) error
- func (s *MockEventStore) Get(ctx context.Context, id string) (manage.Event, error)
- func (s *MockEventStore) Save(ctx context.Context, evt *manage.Event) error
- func (s *MockEventStore) Stream(ctx context.Context, params *manage.EventStreamParams, ...) (chan struct{}, error)
- type MockPluginConfigPreparer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDependencies ¶
func CopyDependencies(deps *typesv1.Dependencies) *typesv1.Dependencies
func NewMemoryStateContainer ¶
func NewMockBlueprintLoader ¶
func NewMockBlueprintLoader( stubDiagnostics []*core.Diagnostic, clock commoncore.Clock, instances state.InstancesContainer, deployEventSequence []container.DeployEvent, changeStagingEventSequence []ChangeStagingEvent, opts ...MockBlueprintLoaderOption, ) container.Loader
func NewMockBlueprintValidationStore ¶
func NewMockBlueprintValidationStore( validations map[string]*manage.BlueprintValidation, ) manage.Validation
func NewMockChangesetStore ¶
func NewMockChangesetStore( validations map[string]*manage.Changeset, ) manage.Changesets
Types ¶
type ChangeStagingEvent ¶
type ChangeStagingEvent struct {
ResourceChangesEvent *container.ResourceChangesMessage
ChildChangesEvent *container.ChildChangesMessage
LinkChangesEvent *container.LinkChangesMessage
FinalBlueprintChanges *changes.BlueprintChanges
Error error
}
type DeployEventWrapper ¶
type DeployEventWrapper struct {
DeployEvent *container.DeployEvent
DeployError error
}
type FailingIDGenerator ¶
type FailingIDGenerator struct{}
func (*FailingIDGenerator) GenerateID ¶
func (f *FailingIDGenerator) GenerateID() (string, error)
type MemoryStateContainer ¶
type MemoryStateContainer struct {
// contains filtered or unexported fields
}
func (*MemoryStateContainer) Children ¶
func (c *MemoryStateContainer) Children() state.ChildrenContainer
func (*MemoryStateContainer) Exports ¶
func (c *MemoryStateContainer) Exports() state.ExportsContainer
func (*MemoryStateContainer) Instances ¶
func (c *MemoryStateContainer) Instances() state.InstancesContainer
func (*MemoryStateContainer) Links ¶
func (c *MemoryStateContainer) Links() state.LinksContainer
func (*MemoryStateContainer) Metadata ¶
func (c *MemoryStateContainer) Metadata() state.MetadataContainer
func (*MemoryStateContainer) Resources ¶
func (c *MemoryStateContainer) Resources() state.ResourcesContainer
type MockBlueprintContainer ¶
type MockBlueprintContainer struct {
// contains filtered or unexported fields
}
func (*MockBlueprintContainer) BlueprintSpec ¶
func (m *MockBlueprintContainer) BlueprintSpec() speccore.BlueprintSpec
func (*MockBlueprintContainer) Deploy ¶
func (m *MockBlueprintContainer) Deploy( ctx context.Context, input *container.DeployInput, channels *container.DeployChannels, paramOverrides core.BlueprintParams, ) error
func (*MockBlueprintContainer) Destroy ¶
func (m *MockBlueprintContainer) Destroy( ctx context.Context, input *container.DestroyInput, channels *container.DeployChannels, paramOverrides core.BlueprintParams, )
func (*MockBlueprintContainer) Diagnostics ¶
func (m *MockBlueprintContainer) Diagnostics() []*core.Diagnostic
func (*MockBlueprintContainer) RefChainCollector ¶
func (m *MockBlueprintContainer) RefChainCollector() refgraph.RefChainCollector
func (*MockBlueprintContainer) ResourceTemplates ¶
func (m *MockBlueprintContainer) ResourceTemplates() map[string]string
func (*MockBlueprintContainer) SpecLinkInfo ¶
func (m *MockBlueprintContainer) SpecLinkInfo() links.SpecLinkInfo
func (*MockBlueprintContainer) StageChanges ¶
func (m *MockBlueprintContainer) StageChanges( ctx context.Context, input *container.StageChangesInput, channels *container.ChangeStagingChannels, paramOverrides core.BlueprintParams, ) error
type MockBlueprintLoader ¶
type MockBlueprintLoader struct {
// contains filtered or unexported fields
}
func (*MockBlueprintLoader) Load ¶
func (m *MockBlueprintLoader) Load( ctx context.Context, blueprintSpecFile string, params core.BlueprintParams, ) (container.BlueprintContainer, error)
func (*MockBlueprintLoader) LoadFromSchema ¶
func (m *MockBlueprintLoader) LoadFromSchema( ctx context.Context, blueprintSchema *schema.Blueprint, params core.BlueprintParams, ) (container.BlueprintContainer, error)
func (*MockBlueprintLoader) LoadString ¶
func (m *MockBlueprintLoader) LoadString( ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, params core.BlueprintParams, ) (container.BlueprintContainer, error)
func (*MockBlueprintLoader) Validate ¶
func (m *MockBlueprintLoader) Validate( ctx context.Context, blueprintSpecFile string, params core.BlueprintParams, ) (*container.ValidationResult, error)
func (*MockBlueprintLoader) ValidateFromSchema ¶
func (m *MockBlueprintLoader) ValidateFromSchema( ctx context.Context, blueprintSchema *schema.Blueprint, params core.BlueprintParams, ) (*container.ValidationResult, error)
func (*MockBlueprintLoader) ValidateString ¶
func (m *MockBlueprintLoader) ValidateString( ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, params core.BlueprintParams, ) (*container.ValidationResult, error)
type MockBlueprintLoaderOption ¶
type MockBlueprintLoaderOption func(*MockBlueprintLoader)
func WithMockBlueprintLoaderChangeStagingError ¶
func WithMockBlueprintLoaderChangeStagingError(err error) MockBlueprintLoaderOption
func WithMockBlueprintLoaderDeployError ¶
func WithMockBlueprintLoaderDeployError(err error) MockBlueprintLoaderOption
type MockBlueprintResolver ¶
type MockBlueprintResolver struct{}
func (*MockBlueprintResolver) Resolve ¶
func (m *MockBlueprintResolver) Resolve( ctx context.Context, includeName string, include *subengine.ResolvedInclude, params core.BlueprintParams, ) (*includes.ChildBlueprintInfo, error)
type MockBlueprintValidationStore ¶
type MockBlueprintValidationStore struct {
BlueprintValidations map[string]*manage.BlueprintValidation
// contains filtered or unexported fields
}
func (*MockBlueprintValidationStore) Get ¶
func (s *MockBlueprintValidationStore) Get( ctx context.Context, id string, ) (*manage.BlueprintValidation, error)
func (*MockBlueprintValidationStore) Save ¶
func (s *MockBlueprintValidationStore) Save( ctx context.Context, blueprintValidation *manage.BlueprintValidation, ) error
type MockChangesetStore ¶
type MockChangesetStore struct {
Changesets map[string]*manage.Changeset
// contains filtered or unexported fields
}
type MockEventStore ¶
type MockEventStore struct {
Events map[string]*manage.Event
EventPartitions map[string][]*manage.Event
// contains filtered or unexported fields
}
type MockPluginConfigPreparer ¶
type MockPluginConfigPreparer struct {
// Mapping of a config value to a list of diagnostics
// that should be returned when the given value is used.
Fixtures map[string][]*core.Diagnostic
}
func NewMockPluginConfigPreparer ¶
func NewMockPluginConfigPreparer( fixtures map[string][]*core.Diagnostic, ) *MockPluginConfigPreparer
func (*MockPluginConfigPreparer) Prepare ¶
func (p *MockPluginConfigPreparer) Prepare( ctx context.Context, blueprintOpConfig *types.BlueprintOperationConfig, validate bool, ) (*types.BlueprintOperationConfig, []*core.Diagnostic, error)
Click to show internal directories.
Click to hide internal directories.