Documentation ¶
Index ¶
- func GetMetadataObjectsWithDir(ec *cli.ExecutionContext, dir ...string) metadataobject.Objects
- func PrintContextRichDiffBetweenProjectDirectories(opts PrintContextRichDiffBetweenProjectDirectoriesOpts) error
- type Handler
- func (h *Handler) BuildJSONMetadata() ([]byte, error)
- func (h *Handler) BuildYAMLMetadata() ([]byte, error)
- func (h *Handler) DropInconsistentMetadata() error
- func (h *Handler) ExportMetadata() (map[string][]byte, error)
- func (h *Handler) GetInconsistentMetadata() (bool, []InconsistentMetadataObject, error)
- func (h *Handler) ReloadMetadata() (io.Reader, error)
- func (h *Handler) ResetMetadata() error
- func (h *Handler) SetMetadataObjects(objects metadataobject.Objects)
- func (h *Handler) V1ApplyMetadata() (io.Reader, error)
- func (h *Handler) V2ApplyMetadata() (*hasura.V2ReplaceMetadataResponse, error)
- func (h *Handler) WriteMetadata(files map[string][]byte) error
- type InconsistentMetadataObject
- type Metadata
- type PrintContextRichDiffBetweenProjectDirectoriesOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataObjectsWithDir ¶
func GetMetadataObjectsWithDir(ec *cli.ExecutionContext, dir ...string) metadataobject.Objects
func PrintContextRichDiffBetweenProjectDirectories ¶
func PrintContextRichDiffBetweenProjectDirectories(opts PrintContextRichDiffBetweenProjectDirectoriesOpts) error
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler will be responsible for interaction between a hasura instance and Objects
func NewHandler ¶
func NewHandler(objects metadataobject.Objects, v1MetadataOps hasura.CommonMetadataOperations, v2MetadataOps hasura.V2CommonMetadataOperations, logger *logrus.Logger) *Handler
func NewHandlerFromEC ¶
func NewHandlerFromEC(ec *cli.ExecutionContext) *Handler
func (*Handler) BuildJSONMetadata ¶ added in v2.5.1
func (*Handler) BuildYAMLMetadata ¶ added in v2.5.1
func (*Handler) DropInconsistentMetadata ¶
func (*Handler) GetInconsistentMetadata ¶
func (h *Handler) GetInconsistentMetadata() (bool, []InconsistentMetadataObject, error)
func (*Handler) ReloadMetadata ¶
ReloadMetadata - Reload Hasura GraphQL Engine metadata on the database
func (*Handler) ResetMetadata ¶
func (*Handler) SetMetadataObjects ¶
func (h *Handler) SetMetadataObjects(objects metadataobject.Objects)
func (*Handler) V2ApplyMetadata ¶
func (h *Handler) V2ApplyMetadata() (*hasura.V2ReplaceMetadataResponse, error)
type InconsistentMetadataObject ¶
type InconsistentMetadataObject struct { Definition interface{} `json:"definition" mapstructure:"definition"` Reason interface{} `json:"reason" mapstructure:"reason"` Type interface{} `json:"type" mapstructure:"type"` }
func (InconsistentMetadataObject) GetDescription ¶
func (obj InconsistentMetadataObject) GetDescription() string
func (InconsistentMetadataObject) GetName ¶
func (obj InconsistentMetadataObject) GetName() string
func (InconsistentMetadataObject) GetReason ¶
func (obj InconsistentMetadataObject) GetReason() string
func (InconsistentMetadataObject) GetType ¶
func (obj InconsistentMetadataObject) GetType() string
type Metadata ¶ added in v2.5.1
type Metadata struct { Version interface{} `yaml:"version" mapstructure:"version"` Sources interface{} `yaml:"sources,omitempty" mapstructure:"sources,omitempty"` Tables interface{} `yaml:"tables,omitempty" mapstructure:"tables,omitempty"` Functions interface{} `yaml:"functions,omitempty" mapstructure:"functions,omitempty"` Actions interface{} `yaml:"actions,omitempty" mapstructure:"actions,omitempty"` CustomTypes interface{} `yaml:"custom_types,omitempty" mapstructure:"custom_types,omitempty"` RemoteSchemas interface{} `yaml:"remote_schemas,omitempty" mapstructure:"remote_schemas,omitempty"` QueryCollections interface{} `yaml:"query_collections,omitempty" mapstructure:"query_collections,omitempty"` AllowList interface{} `yaml:"allowlist,omitempty" mapstructure:"allowlist,omitempty"` CronTriggers interface{} `yaml:"cron_triggers,omitempty" mapstructure:"cron_triggers,omitempty"` Network interface{} `yaml:"network,omitempty" mapstructure:"network,omitempty"` APILimits interface{} `yaml:"api_limits,omitempty" mapstructure:"api_limits,omitempty"` RestEndpoints interface{} `yaml:"rest_endpoints,omitempty" mapstructure:"rest_endpoints,omitempty"` InheritedRoles interface{} `yaml:"inherited_roles,omitempty" mapstructure:"inherited_roles,omitempty"` // HGE Pro GraphQLSchemaIntrospection interface{} `yaml:"graphql_schema_introspection,omitempty" mapstructure:"graphql_schema_introspection,omitempty"` }
Metadata does not strictly mirror the actual structure of server metadata this is evident in the struct below, because V3 metadata does not contain "tables" / "functions" key
this is rather a utility / helper struct which allow us to unmarshal / marshal metadata bytes in a specific order.
func GenMetadataFromMap ¶ added in v2.5.1
Click to show internal directories.
Click to hide internal directories.