Documentation ¶
Index ¶
- Constants
- func ParseInstanceID(is instanceObjectState) (string, error)
- func ParseInstanceMetadata(is instanceObjectState) ([]byte, error)
- func ParseInstanceProviderConnector(providerString string) (string, error)
- func ParseStateOutput(revision *model.ResourceRevision) ([]types.OutputValue, error)
- func ParseStateOutputRawMap(revision *model.ResourceRevision) (map[string]OutputState, error)
- func ParseStateProviders(s string) ([]string, error)
- type AbsProviderConfig
- type OutputState
- type Parser
- type Provider
Constants ¶
const ConnectorSeparator = "connector--"
ConnectorSeparator is used to separate the connector id and the instance name.
Variables ¶
This section is empty.
Functions ¶
func ParseInstanceID ¶
ParseInstanceID get the real instance id from the instance object state. The instance id is stored in the "name" attribute of application resource.
func ParseInstanceMetadata ¶
ParseInstanceMetadata get the metadata from the instance object state.
func ParseInstanceProviderConnector ¶
ParseInstanceProviderConnector get the provider connector from the provider instance string.
func ParseStateOutput ¶
func ParseStateOutput(revision *model.ResourceRevision) ([]types.OutputValue, error)
func ParseStateOutputRawMap ¶
func ParseStateOutputRawMap(revision *model.ResourceRevision) (map[string]OutputState, error)
func ParseStateProviders ¶
ParseStateProviders parse terraform state and get providers.
Types ¶
type AbsProviderConfig ¶
AbsProviderConfig is the absolute address of a provider configuration within a particular module instance.
func ParseAbsProviderConfig ¶
func ParseAbsProviderConfig(traversal hcl.Traversal) (*AbsProviderConfig, error)
ParseAbsProviderConfig parses the given traversal as an absolute provider configuration address.
func ParseAbsProviderString ¶
func ParseAbsProviderString(str string) (*AbsProviderConfig, error)
type OutputState ¶
type Parser ¶
type Parser struct{}
func (Parser) ParseResourceRevision ¶ added in v0.4.0
func (p Parser) ParseResourceRevision(revision *model.ResourceRevision) ( model.ResourceComponents, map[string][]string, error, )
ParseResourceRevision parse the service revision output(terraform state) to service resources, returns list must not be `nil` unless unexpected input or raising error, it can be used to clean stale items safety if got an empty list.
func (Parser) ParseState ¶
func (p Parser) ParseState( stateStr string, revision *model.ResourceRevision, ) ( resources model.ResourceComponents, dependencies map[string][]string, err error, )
ParseState parse the terraform state to service resources, returns list must not be `nil` unless unexpected input or raising error, it can be used to clean stale items safety if got an empty list.