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