projectmetadata

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataObjectsWithDir

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

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) 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() (io.Reader, 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 metadataobject.Objects)

func (*Handler) V1ApplyMetadata

func (h *Handler) V1ApplyMetadata() (io.Reader, 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 PrintContextRichDiffBetweenProjectDirectoriesOpts

type PrintContextRichDiffBetweenProjectDirectoriesOpts struct {
	EC                         *cli.ExecutionContext
	MetadataHandler            *Handler
	FromDirectory, ToDirectory string
	Writer                     io.Writer
	DisableColor               bool
}

Jump to

Keyboard shortcuts

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