resource

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedTypes added in v0.37.0

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 added in v0.37.0

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

func NewDriftctlResourceFactory added in v0.37.0

func NewDriftctlResourceFactory(resourceSchemaRepository SchemaRepositoryInterface) *DriftctlResourceFactory

func (*DriftctlResourceFactory) CreateAbstractResource added in v0.37.0

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

type IaCSupplier added in v0.20.0

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 added in v0.20.0

type MockIaCSupplier struct {
	mock.Mock
}

MockIaCSupplier is an autogenerated mock type for the IaCSupplier type

func (*MockIaCSupplier) Resources added in v0.20.0

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

Resources provides a mock function with given fields:

func (*MockIaCSupplier) SourceCount added in v0.20.0

func (_m *MockIaCSupplier) SourceCount() uint

SourceCount provides a mock function with given fields:

type MockResourceFactory added in v0.37.0

type MockResourceFactory struct {
	mock.Mock
}

MockResourceFactory is an autogenerated mock type for the ResourceFactory type

func (*MockResourceFactory) CreateAbstractResource added in v0.37.0

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

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

func (*MockResourceFactory) CreateResource added in v0.37.0

func (_m *MockResourceFactory) CreateResource(data interface{}, ty string) (*cty.Value, error)

CreateResource provides a mock function with given fields: data, ty

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