resource

package
v0.0.0-...-3750d73 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedTypes

func GetSupportedTypes() []string

func IsResourceTypeSupported

func IsResourceTypeSupported(ty string) bool

Types

type Deserializer

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

func NewDeserializer

func NewDeserializer(factory resource.ResourceFactory) *Deserializer

func (*Deserializer) Deserialize

func (s *Deserializer) Deserialize(ty string, rawList []cty.Value) ([]*resource.Resource, error)

func (*Deserializer) DeserializeOne

func (s *Deserializer) DeserializeOne(ty string, value cty.Value) (*resource.Resource, error)

type DriftctlResourceFactory

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

func NewDriftctlResourceFactory

func NewDriftctlResourceFactory(resourceSchemaRepository SchemaRepositoryInterface) *DriftctlResourceFactory

func (*DriftctlResourceFactory) CreateAbstractResource

func (r *DriftctlResourceFactory) CreateAbstractResource(ty, id string, data map[string]interface{}) *resource.Resource

type IaCSupplier

type IaCSupplier interface {
	resource.Supplier
	SourceCount() uint
}

IaCSupplier supply the list of resource.Resource, it's the main interface to retrieve state resources

type MockIaCSupplier

type MockIaCSupplier struct {
	mock.Mock
}

MockIaCSupplier is an autogenerated mock type for the IaCSupplier type

func NewMockIaCSupplier

func NewMockIaCSupplier(t mockConstructorTestingTNewMockIaCSupplier) *MockIaCSupplier

NewMockIaCSupplier creates a new instance of MockIaCSupplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockIaCSupplier) Resources

func (_m *MockIaCSupplier) Resources() ([]*enumerationresource.Resource, error)

Resources provides a mock function with given fields:

func (*MockIaCSupplier) SourceCount

func (_m *MockIaCSupplier) SourceCount() uint

SourceCount provides a mock function with given fields:

type MockResourceFactory

type MockResourceFactory struct {
	mock.Mock
}

MockResourceFactory is an autogenerated mock type for the ResourceFactory type

func NewMockResourceFactory

func NewMockResourceFactory(t mockConstructorTestingTNewMockResourceFactory) *MockResourceFactory

NewMockResourceFactory creates a new instance of MockResourceFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockResourceFactory) CreateAbstractResource

func (_m *MockResourceFactory) CreateAbstractResource(ty string, id string, data map[string]interface{}) *enumerationresource.Resource

CreateAbstractResource provides a mock function with given fields: ty, id, data

type MockSupplier

type MockSupplier struct {
	mock.Mock
}

MockSupplier is an autogenerated mock type for the Supplier type

func (*MockSupplier) Resources

func (_m *MockSupplier) Resources() ([]*resource.Resource, error)

Resources provides a mock function with given fields:

type ResourceFactory

type ResourceFactory interface {
	CreateAbstractResource(ty, id string, data map[string]interface{}) *resource.Resource
}

type ResourceType

type ResourceType string

func (ResourceType) String

func (ty ResourceType) String() string

type ResourceTypeMeta

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

func GetMeta

func GetMeta(ty ResourceType) ResourceTypeMeta

func (ResourceTypeMeta) GetChildrenTypes

func (ty ResourceTypeMeta) GetChildrenTypes() []ResourceType

type SchemaRepositoryInterface

type SchemaRepositoryInterface interface {
	GetSchema(resourceType string) (*resource.Schema, bool)
	SetFlags(typ string, flags ...resource.Flags)
	UpdateSchema(typ string, schemasMutators map[string]func(attributeSchema *resource.AttributeSchema))
	SetNormalizeFunc(typ string, normalizeFunc func(res *resource.Resource))
	SetHumanReadableAttributesFunc(typ string, humanReadableAttributesFunc func(res *resource.Resource) map[string]string)
	SetDiscriminantFunc(string, func(*resource.Resource, *resource.Resource) bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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