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(disallowInconsistentMetadata bool) (*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( disallowInconsistentMetadata bool, ) (*hasura.V2ReplaceMetadataResponse, error)
type InconsistentMetadataObject ¶
type InconsistentMetadataObject struct {
Definition any `json:"definition" mapstructure:"definition"`
Reason any `json:"reason" mapstructure:"reason"`
Type any `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 any `mapstructure:"version" yaml:"version"`
Sources any `mapstructure:"sources,omitempty" yaml:"sources,omitempty"`
Tables any `mapstructure:"tables,omitempty" yaml:"tables,omitempty"`
Functions any `mapstructure:"functions,omitempty" yaml:"functions,omitempty"`
Actions any `mapstructure:"actions,omitempty" yaml:"actions,omitempty"`
CustomTypes any `mapstructure:"custom_types,omitempty" yaml:"custom_types,omitempty"`
RemoteSchemas any `mapstructure:"remote_schemas,omitempty" yaml:"remote_schemas,omitempty"`
QueryCollections any `mapstructure:"query_collections,omitempty" yaml:"query_collections,omitempty"`
AllowList any `mapstructure:"allowlist,omitempty" yaml:"allowlist,omitempty"`
CronTriggers any `mapstructure:"cron_triggers,omitempty" yaml:"cron_triggers,omitempty"`
Network any `mapstructure:"network,omitempty" yaml:"network,omitempty"`
APILimits any `mapstructure:"api_limits,omitempty" yaml:"api_limits,omitempty"`
RestEndpoints any `mapstructure:"rest_endpoints,omitempty" yaml:"rest_endpoints,omitempty"`
InheritedRoles any `mapstructure:"inherited_roles,omitempty" yaml:"inherited_roles,omitempty"`
Opentelemetry any `mapstructure:"opentelemetry,omitempty" yaml:"opentelemetry,omitempty"`
BackendConfig any `mapstructure:"backend_configs,omitempty" yaml:"backend_configs,omitempty"`
// HGE Pro
GraphQLSchemaIntrospection any `mapstructure:"graphql_schema_introspection,omitempty" yaml:"graphql_schema_introspection,omitempty"`
MetricsConfig any `mapstructure:"metrics_config,omitempty" yaml:"metrics_config,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.