metadataobject

package
v0.0.0-...-0907076 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 Objects, v1MetadataOps hasura.CommonMetadataOperations, v2MetadataOps hasura.V2CommonMetadataOperations, logger *logrus.Logger) *Handler

func NewHandlerFromEC

func NewHandlerFromEC(ec *cli.ExecutionContext) *Handler

func (*Handler) BuildMetadata

func (h *Handler) BuildMetadata() (yaml.MapSlice, error)

func (*Handler) DropInconsistentMetadata

func (h *Handler) DropInconsistentMetadata() error

func (*Handler) ExportMetadata

func (h *Handler) ExportMetadata() (map[string][]byte, error)

func (*Handler) GetInconsistentMetadata

func (h *Handler) GetInconsistentMetadata() (bool, []InconsistentMetadataObject, error)

func (*Handler) MakeJSONMetadata

func (h *Handler) MakeJSONMetadata() ([]byte, error)

func (*Handler) ReloadMetadata

func (h *Handler) ReloadMetadata() error

ReloadMetadata - Reload Hasura GraphQL Engine metadata on the database

func (*Handler) ResetMetadata

func (h *Handler) ResetMetadata() error

func (*Handler) SetMetadataObjects

func (h *Handler) SetMetadataObjects(objects Objects)

func (*Handler) V1ApplyMetadata

func (h *Handler) V1ApplyMetadata() error

func (*Handler) V2ApplyMetadata

func (h *Handler) V2ApplyMetadata() (*hasura.V2ReplaceMetadataResponse, error)

func (*Handler) WriteMetadata

func (h *Handler) WriteMetadata(files map[string][]byte) error

WriteMetadata writes the files in the metadata folder

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 Object

type Object interface {
	Build(metadata *yaml.MapSlice) error
	Export(metadata yaml.MapSlice) (map[string][]byte, error)
	CreateFiles() error
	Name() string
}

type Objects

type Objects []Object

func GetMetadataObjectsWithDir

func GetMetadataObjectsWithDir(ec *cli.ExecutionContext, dir ...string) Objects

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL