graphql-engine/cli/migrate/database/metadata.go

34 lines
615 B
Go
Raw Normal View History

2018-06-24 16:40:48 +03:00
package database
import (
"github.com/hasura/graphql-engine/cli/metadata/types"
"gopkg.in/yaml.v2"
)
2018-06-24 16:40:48 +03:00
type MetadataDriver interface {
SetMetadataPlugins(types.MetadataPlugins)
ExportMetadata() (map[string][]byte, error)
2018-06-24 16:40:48 +03:00
ResetMetadata() error
ReloadMetadata() error
GetInconsistentMetadata() (bool, []InconsistentMetadataInterface, error)
DropInconsistentMetadata() error
BuildMetadata() (yaml.MapSlice, error)
ApplyMetadata() error
2018-06-24 16:40:48 +03:00
Query(data interface{}) error
2018-06-24 16:40:48 +03:00
}
type InconsistentMetadataInterface interface {
GetType() string
GetName() string
GetDescription() string
GetReason() string
}