Documentation ¶
Index ¶
- func CopyMigrationState(src, dest MigrationsStateStore, srcdatabase, destdatabase string) error
- func CopySettingsState(src, dest SettingsStateStore) error
- type CLICatalogState
- type CLIState
- func (c *CLIState) GetMigrations() *MigrationsState
- func (c *CLIState) GetMigrationsByDatabase(database string) map[string]bool
- func (c *CLIState) GetSetting(key string) string
- func (c *CLIState) GetSettings() map[string]string
- func (c *CLIState) Init()
- func (c *CLIState) SetMigration(database, key string, value bool)
- func (c *CLIState) SetSetting(key, value string)
- func (c *CLIState) UnsetMigration(database, key string)
- type MigrationsState
- type MigrationsStateStore
- type SettingsStateStore
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyMigrationState ¶
func CopyMigrationState(src, dest MigrationsStateStore, srcdatabase, destdatabase string) error
func CopySettingsState ¶
func CopySettingsState(src, dest SettingsStateStore) error
Types ¶
type CLICatalogState ¶
type CLICatalogState struct {
// contains filtered or unexported fields
}
func NewCLICatalogState ¶
func NewCLICatalogState(client hasura.CatalogStateOperations) *CLICatalogState
func (*CLICatalogState) Get ¶
func (c *CLICatalogState) Get() (*CLIState, error)
type CLIState ¶
type CLIState struct { Migrations MigrationsState `json:"migrations,omitempty" mapstructure:"migrations,omitempty"` Settings map[string]string `json:"settings" mapstructure:"settings"` // IsStateCopyCompleted is a utility variable // pre config v3 state was stored in users database connected to hasura in `hdb_catalog.*` tables // this variable is set to true when state copy happens from hdb_catalog.* tables // this process is carried out during a scripts update-project-v3 command or an implicit state copy // introduced in https://github.com/hasura/graphql-engine-mono/pull/1298 IsStateCopyCompleted bool `json:"isStateCopyCompleted" mapstructure:"isStateCopyCompleted"` }
func (*CLIState) GetMigrations ¶
func (c *CLIState) GetMigrations() *MigrationsState
func (*CLIState) GetMigrationsByDatabase ¶
func (*CLIState) GetSetting ¶
func (*CLIState) GetSettings ¶
func (*CLIState) SetMigration ¶
func (*CLIState) SetSetting ¶
func (*CLIState) UnsetMigration ¶
type MigrationsStateStore ¶
type MigrationsStateStore interface { InsertVersion(database string, version int64) error RemoveVersion(database string, version int64) error SetVersion(database string, version int64, dirty bool) error GetVersions(database string) (map[uint64]bool, error) SetVersions(database string, versions []Version) error PrepareMigrationsStateStore(database string) error }
Abstraction for the storage layer for migration state
Click to show internal directories.
Click to hide internal directories.