Documentation
¶
Overview ¶
Package migrate provides the functionality to take action on specific schema fields that are consumed by the translation package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeChangeSet ¶
type AttributeChangeSet struct {
// contains filtered or unexported fields
}
AttributeChangeSet represents an unscoped entry that can be applied.
The listed changes are duplicated twice to allow for simplified means of transition to or from a revision.
func NewAttributeChangeSet ¶
func NewAttributeChangeSet(mappings ast.AttributeMap) *AttributeChangeSet
NewAttributeChangeSet allows for typed strings to be used as part of the invocation that will be converted into the default string type.
type AttributeChangeSetSlice ¶
type AttributeChangeSetSlice []*AttributeChangeSet
AttributeChangeSetSlice allows for `AttributeChangeSet` to be chained together as they are defined within the schema and be applied sequentially to ensure deterministic behavior.
func NewAttributeChangeSetSlice ¶
func NewAttributeChangeSetSlice(changes ...*AttributeChangeSet) *AttributeChangeSetSlice
NewAttributeChangeSetSlice combines all the provided `AttributeChangeSets` and allows them to be executed in the provided order.
type ConditionalAttributeSet ¶
type ConditionalAttributeSet struct {
// contains filtered or unexported fields
}
func NewConditionalAttributeSet ¶
func NewConditionalAttributeSet[Match ValueMatch](mappings ast.AttributeMap, matches ...Match) *ConditionalAttributeSet
type ConditionalAttributeSetSlice ¶
type ConditionalAttributeSetSlice []*ConditionalAttributeSet
func NewConditionalAttributeSetSlice ¶
func NewConditionalAttributeSetSlice(conditions ...*ConditionalAttributeSet) *ConditionalAttributeSetSlice
type SignalNameChange ¶
type SignalNameChange struct {
// contains filtered or unexported fields
}
SignalNameChange allows for migrating types that implement the `alias.Signal` interface.
func NewSignalNameChange ¶
func NewSignalNameChange[Key SignalType, Value SignalType](mappings map[Key]Value) *SignalNameChange
NewSignalNameChange will create a `Signal` that will check the provided mappings if it can update a `alias.Signal` and if no values are provided for `matches`, then all values will be updated.
func (*SignalNameChange) Apply ¶
func (s *SignalNameChange) Apply(signal alias.NamedSignal)
func (*SignalNameChange) Rollback ¶
func (s *SignalNameChange) Rollback(signal alias.NamedSignal)
type SignalNameChangeSlice ¶
type SignalNameChangeSlice []*SignalNameChange
func NewSignalNameChangeSlice ¶
func NewSignalNameChangeSlice(changes ...*SignalNameChange) *SignalNameChangeSlice
func (*SignalNameChangeSlice) Apply ¶
func (slice *SignalNameChangeSlice) Apply(signal alias.NamedSignal)
func (*SignalNameChangeSlice) Rollback ¶
func (slice *SignalNameChangeSlice) Rollback(signal alias.NamedSignal)
type SignalType ¶
type SignalType interface { ~string }
SignalType allows for type constraints in order to apply to potential type defined strings.
type StateSelector ¶
type StateSelector int
const ( StateSelectorApply StateSelector StateSelectorRollback )
type ValueMatch ¶
type ValueMatch interface { ~string }
ValueMatch defines the expected match type that is used on creation of `ConditionalAttributeSet`