Documentation ¶
Index ¶
- type MetadataObject
- func (o *MetadataObject) BaseDirectory() string
- func (o *MetadataObject) Build() (map[string]interface{}, error)
- func (o *MetadataObject) CreateFiles() error
- func (o *MetadataObject) Export(metadata map[string]yaml.Node) (map[string][]byte, error)
- func (o *MetadataObject) Filename() string
- func (o *MetadataObject) GetFiles() ([]string, error)
- func (o *MetadataObject) Key() string
- func (o *MetadataObject) Validate() error
- func (o *MetadataObject) WriteDiff(opts metadataobject.WriteDiffOpts) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataObject ¶
type MetadataObject struct { MetadataDir string // contains filtered or unexported fields }
func New ¶
func New(ec *cli.ExecutionContext, baseDir string) *MetadataObject
func (*MetadataObject) BaseDirectory ¶
func (o *MetadataObject) BaseDirectory() string
func (*MetadataObject) Build ¶
func (o *MetadataObject) Build() (map[string]interface{}, error)
func (*MetadataObject) CreateFiles ¶
func (o *MetadataObject) CreateFiles() error
func (*MetadataObject) Export ¶
func (o *MetadataObject) Export(metadata map[string]yaml.Node) (map[string][]byte, error)
Export implementation here can probably use metadataobject.DefaultExport the only thing stopping us from using it is the metadata API behaviour for this object. For other objects an empty value ([] or {}) depending on what type of object will "reset" it. ie If I wanted to clear all the cron triggers on the server I could send metadata JSON with "cron_triggers": []. Similarly, If I try to "clear" "graphql_schema_introspection" it'll not work
$ hasura metadata apply -o json --dry-run
{ // ....other objects skipped for brevity "graphql_schema_introspection": {} }
$ hasura md apply FATA[0001] error applying metadata
{ "path": "$.args.metadata.graphql_schema_introspection", "error": "the key 'disabled_for_roles' was not present", "code": "parse-failed" }
func (*MetadataObject) Filename ¶
func (o *MetadataObject) Filename() string
func (*MetadataObject) GetFiles ¶
func (o *MetadataObject) GetFiles() ([]string, error)
func (*MetadataObject) Key ¶
func (o *MetadataObject) Key() string
func (*MetadataObject) Validate ¶
func (o *MetadataObject) Validate() error
func (*MetadataObject) WriteDiff ¶
func (o *MetadataObject) WriteDiff(opts metadataobject.WriteDiffOpts) error
Click to show internal directories.
Click to hide internal directories.