Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Marshal returns the Atlas HCL encoding of v. Marshal = schemaspec.MarshalerFunc(New().MarshalSpec) )
View Source
var ( // Unmarshal parses the Atlas HCL-encoded data and stores the result in the target. Unmarshal = schemaspec.UnmarshalerFunc(New().UnmarshalSpec) )
Functions ¶
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
// contains filtered or unexported fields
}
Config configures an unmarshaling.
type Option ¶ added in v0.2.0
type Option func(*Config)
Option configures a Config.
func WithScopedEnums ¶ added in v0.3.4
WithScopedEnums configured a list of allowed ENUMs to be used in the given context, block or attribute. For example, the following option allows setting HASH or BTREE to the "using" attribute in "index" block.
WithScopedEnums("table.index.type", "HASH", "BTREE") table "t" { ... index "i" { type = HASH // Allowed. type = INVALID // Not Allowed. } }
func WithTypes ¶ added in v0.2.0
func WithTypes(typeSpecs []*schemaspec.TypeSpec) Option
WithTypes configures the list of given types as identifiers in the unmarshaling context.
Click to show internal directories.
Click to hide internal directories.