Documentation ¶
Index ¶
- func Get[T Resource](dependentResourceId string, resources *Resources, id string) (T, error)
- func GetAllResources[T Resource](ctx MultyContext) []T
- func GetAllResourcesWithListRef[T Resource, T2 Resource](ctx MultyContext, refGetter func(T) []T2, ref T2) []T
- func GetAllResourcesWithRef[T Resource, T2 Resource](ctx MultyContext, refGetter func(T) T2, ref T2) []T
- func GetMainOutputId(r namedResource) (string, error)
- func GetMainOutputRef(r namedResource) (string, error)
- func GetOptional[T Resource](dependentResourceId string, resources *Resources, id string) (T, error)
- func NewError(err error, resourceId string, fieldName string) validate.ValidationError
- type ChildResourceWithId
- func (r *ChildResourceWithId[A, B]) GetCloud() commonpb.CloudProvider
- func (r *ChildResourceWithId[A, B]) GetCloudSpecificLocation() string
- func (r *ChildResourceWithId[A, B]) GetMetadata(m ResourceMetadatas) (ResourceMetadataInterface, error)
- func (r *ChildResourceWithId[A, B]) GetResourceId() string
- func (r *ChildResourceWithId[A, B]) NewValidationError(err error, field string) validate.ValidationError
- type CloudSpecificResource
- type CloudSpecificResourceTranslator
- type MultyConfig
- func (c *MultyConfig) CreateResource(args proto.Message) (Resource, error)
- func (c *MultyConfig) DeleteResource(resourceId string) (Resource, error)
- func (c *MultyConfig) ExportConfig() (*configpb.Config, error)
- func (c *MultyConfig) GetAffectedResources(resourceId string) []string
- func (c *MultyConfig) GetOriginalConfig(metadatas ResourceMetadatas) (*MultyConfig, error)
- func (c *MultyConfig) GetUserId() string
- func (c *MultyConfig) UpdateDeployedResourceList(deployedResources map[string][]string)
- func (c *MultyConfig) UpdateMultyResourceGroups()
- func (c *MultyConfig) UpdateResource(resourceId string, args proto.Message) (Resource, error)
- type MultyContext
- type MultyResourceGroup
- type Resource
- type ResourceExporter
- type ResourceMetadata
- func (m *ResourceMetadata[ArgsT, R, OutT]) Create(resourceId string, args proto.Message, resources *Resources) (Resource, error)
- func (m *ResourceMetadata[ArgsT, R, OutT]) Export(resource Resource, resources *Resources) (proto.Message, bool, error)
- func (m *ResourceMetadata[ArgsT, R, OutT]) GetAbbreviatedName() string
- func (m *ResourceMetadata[ArgsT, R, OutT]) GetCloudSpecificResource(r Resource) (CloudSpecificResourceTranslator, error)
- func (m *ResourceMetadata[ArgsT, R, OutT]) Import(resourceId string, args proto.Message, resources *Resources) error
- func (m *ResourceMetadata[ArgsT, R, OutT]) New() Resource
- func (m *ResourceMetadata[ArgsT, R, OutT]) ReadFromState(resource Resource, state *output.TfState) (proto.Message, error)
- func (m *ResourceMetadata[ArgsT, R, OutT]) Update(resource Resource, args proto.Message, resources *Resources) error
- type ResourceMetadataInterface
- type ResourceMetadatas
- type ResourceTranslator
- type ResourceWithId
- func (r *ResourceWithId[T]) GetCloud() commonpb.CloudProvider
- func (r *ResourceWithId[T]) GetCloudSpecificLocation() string
- func (r *ResourceWithId[T]) GetLocation() commonpb.Location
- func (r *ResourceWithId[T]) GetMetadata(m ResourceMetadatas) (ResourceMetadataInterface, error)
- func (r *ResourceWithId[T]) GetResourceGroupId() string
- func (r *ResourceWithId[T]) GetResourceId() string
- func (r *ResourceWithId[T]) NewValidationError(err error, field string) validate.ValidationError
- func (r *ResourceWithId[T]) Validate() (errs []validate.ValidationError)
- type Resources
- func (r *Resources) Add(resource Resource) error
- func (r *Resources) AddDependency(dependentResourceId string, id string)
- func (r *Resources) Delete(resourceId string)
- func (r *Resources) GetAll() []Resource
- func (r *Resources) GetMultyResourceGroups(existingGroupsByResource map[string]string) map[string]*MultyResourceGroup
- type WithChildCommonParams
- type WithCommonParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶ added in v0.1.18
Get finds the resource with the given id and adds a dependency between dependentResourceId and id.
func GetAllResources ¶
func GetAllResources[T Resource](ctx MultyContext) []T
func GetAllResourcesWithListRef ¶ added in v0.1.18
func GetAllResourcesWithListRef[T Resource, T2 Resource](ctx MultyContext, refGetter func(T) []T2, ref T2) []T
func GetAllResourcesWithRef ¶ added in v0.1.18
func GetAllResourcesWithRef[T Resource, T2 Resource](ctx MultyContext, refGetter func(T) T2, ref T2) []T
func GetMainOutputId ¶
func GetMainOutputRef ¶ added in v0.1.16
func GetOptional ¶ added in v0.1.18
Types ¶
type ChildResourceWithId ¶ added in v0.1.15
type ChildResourceWithId[ParentT Resource, ChildT WithChildCommonParams] struct { ResourceId string Args ChildT Parent ParentT Metadata ResourceMetadataInterface }
func NewChildResource ¶ added in v0.1.44
func NewChildResource[ParentT Resource, ChildT WithChildCommonParams](resourceId string, parent ParentT, args ChildT) ChildResourceWithId[ParentT, ChildT]
func (*ChildResourceWithId[A, B]) GetCloud ¶ added in v0.1.15
func (r *ChildResourceWithId[A, B]) GetCloud() commonpb.CloudProvider
func (*ChildResourceWithId[A, B]) GetCloudSpecificLocation ¶ added in v0.1.15
func (r *ChildResourceWithId[A, B]) GetCloudSpecificLocation() string
func (*ChildResourceWithId[A, B]) GetMetadata ¶ added in v0.1.44
func (r *ChildResourceWithId[A, B]) GetMetadata(m ResourceMetadatas) (ResourceMetadataInterface, error)
func (*ChildResourceWithId[A, B]) GetResourceId ¶ added in v0.1.15
func (r *ChildResourceWithId[A, B]) GetResourceId() string
func (*ChildResourceWithId[A, B]) NewValidationError ¶ added in v0.1.15
func (r *ChildResourceWithId[A, B]) NewValidationError(err error, field string) validate.ValidationError
type CloudSpecificResource ¶
type CloudSpecificResourceTranslator ¶ added in v0.1.44
type MultyConfig ¶ added in v0.1.36
type MultyConfig struct { Resources *Resources // contains filtered or unexported fields }
func LoadConfig ¶ added in v0.1.36
func LoadConfig(c *configpb.Config, metadatas ResourceMetadatas) (*MultyConfig, error)
func (*MultyConfig) CreateResource ¶ added in v0.1.36
func (c *MultyConfig) CreateResource(args proto.Message) (Resource, error)
func (*MultyConfig) DeleteResource ¶ added in v0.1.36
func (c *MultyConfig) DeleteResource(resourceId string) (Resource, error)
func (*MultyConfig) ExportConfig ¶ added in v0.1.36
func (c *MultyConfig) ExportConfig() (*configpb.Config, error)
func (*MultyConfig) GetAffectedResources ¶ added in v0.1.36
func (c *MultyConfig) GetAffectedResources(resourceId string) []string
func (*MultyConfig) GetOriginalConfig ¶ added in v0.1.38
func (c *MultyConfig) GetOriginalConfig(metadatas ResourceMetadatas) (*MultyConfig, error)
func (*MultyConfig) GetUserId ¶ added in v0.1.36
func (c *MultyConfig) GetUserId() string
func (*MultyConfig) UpdateDeployedResourceList ¶ added in v0.1.36
func (c *MultyConfig) UpdateDeployedResourceList(deployedResources map[string][]string)
func (*MultyConfig) UpdateMultyResourceGroups ¶ added in v0.1.36
func (c *MultyConfig) UpdateMultyResourceGroups()
func (*MultyConfig) UpdateResource ¶ added in v0.1.36
type MultyContext ¶
type MultyContext struct { Resources *Resources // contains filtered or unexported fields }
func NewMultyContext ¶ added in v0.1.18
func NewMultyContext(r *Resources) MultyContext
type MultyResourceGroup ¶ added in v0.1.18
type Resource ¶
type Resource interface { GetResourceId() string GetCloudSpecificLocation() string GetCloud() commonpb.CloudProvider Validate(ctx MultyContext) []validate.ValidationError GetMetadata(ResourceMetadatas) (ResourceMetadataInterface, error) }
type ResourceExporter ¶ added in v0.1.44
type ResourceMetadata ¶ added in v0.1.36
type ResourceMetadata[ArgsT proto.Message, R ResourceExporter[ArgsT], OutT proto.Message] struct { Translators map[commonpb.CloudProvider]func(R) ResourceTranslator[OutT] AbbreviatedName string // Used for error messages ResourceType string }
func (*ResourceMetadata[ArgsT, R, OutT]) GetAbbreviatedName ¶ added in v0.1.36
func (m *ResourceMetadata[ArgsT, R, OutT]) GetAbbreviatedName() string
func (*ResourceMetadata[ArgsT, R, OutT]) GetCloudSpecificResource ¶ added in v0.1.44
func (m *ResourceMetadata[ArgsT, R, OutT]) GetCloudSpecificResource(r Resource) (CloudSpecificResourceTranslator, error)
func (*ResourceMetadata[ArgsT, R, OutT]) New ¶ added in v0.1.48
func (m *ResourceMetadata[ArgsT, R, OutT]) New() Resource
func (*ResourceMetadata[ArgsT, R, OutT]) ReadFromState ¶ added in v0.1.36
type ResourceMetadataInterface ¶ added in v0.1.36
type ResourceMetadataInterface interface { New() Resource Create(string, proto.Message, *Resources) (Resource, error) Update(Resource, proto.Message, *Resources) error ReadFromState(Resource, *output.TfState) (proto.Message, error) Export(Resource, *Resources) (proto.Message, bool, error) Import(string, proto.Message, *Resources) error GetCloudSpecificResource(r Resource) (CloudSpecificResourceTranslator, error) GetAbbreviatedName() string }
type ResourceMetadatas ¶ added in v0.1.44
type ResourceMetadatas map[proto.Message]ResourceMetadataInterface
type ResourceTranslator ¶ added in v0.1.44
type ResourceWithId ¶ added in v0.1.15
type ResourceWithId[T WithCommonParams] struct { ResourceId string Args T }
func NewResource ¶ added in v0.1.44
func NewResource[T WithCommonParams](resourceId string, args T) ResourceWithId[T]
func (*ResourceWithId[T]) GetCloud ¶ added in v0.1.15
func (r *ResourceWithId[T]) GetCloud() commonpb.CloudProvider
func (*ResourceWithId[T]) GetCloudSpecificLocation ¶ added in v0.1.15
func (r *ResourceWithId[T]) GetCloudSpecificLocation() string
func (*ResourceWithId[T]) GetLocation ¶ added in v0.1.15
func (r *ResourceWithId[T]) GetLocation() commonpb.Location
func (*ResourceWithId[T]) GetMetadata ¶ added in v0.1.44
func (r *ResourceWithId[T]) GetMetadata(m ResourceMetadatas) (ResourceMetadataInterface, error)
func (*ResourceWithId[T]) GetResourceGroupId ¶ added in v0.1.36
func (r *ResourceWithId[T]) GetResourceGroupId() string
func (*ResourceWithId[T]) GetResourceId ¶ added in v0.1.15
func (r *ResourceWithId[T]) GetResourceId() string
func (*ResourceWithId[T]) NewValidationError ¶ added in v0.1.15
func (r *ResourceWithId[T]) NewValidationError(err error, field string) validate.ValidationError
func (*ResourceWithId[T]) Validate ¶ added in v0.1.15
func (r *ResourceWithId[T]) Validate() (errs []validate.ValidationError)
type Resources ¶ added in v0.1.15
func NewResources ¶ added in v0.1.18
func NewResources() *Resources
func (*Resources) AddDependency ¶ added in v0.1.18
func (*Resources) GetMultyResourceGroups ¶ added in v0.1.18
func (r *Resources) GetMultyResourceGroups(existingGroupsByResource map[string]string) map[string]*MultyResourceGroup
type WithChildCommonParams ¶ added in v0.1.15
type WithChildCommonParams interface { GetCommonParameters() *commonpb.ChildResourceCommonArgs proto.Message }
type WithCommonParams ¶ added in v0.1.15
type WithCommonParams interface { GetCommonParameters() *commonpb.ResourceCommonArgs proto.Message }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.