Documentation
¶
Index ¶
- func Migrate(conf config.Database) (err error)
- func MigrateDown(engine, uri string) (err error)
- func MigrateDownTo(engine, uri string, p int64) (err error)
- func MigrateReset(engine, uri string) (err error)
- func MigrateStatus(engine, uri string) (err error)
- func MigrateUp(engine, uri string) (err error)
- func MigrateUpTo(engine, uri string, p int64) (err error)
- type DataReader
- type DataWriter
- type NoopDataReader
- type NoopDataWriter
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateDown ¶
MigrateDown undoes all database migrations, reverting the schema to the initial state.
func MigrateDownTo ¶
MigrateDownTo undoes database migrations down to a specific version.
func MigrateReset ¶
MigrateReset roll back all migrations.
func MigrateStatus ¶
MigrateStatus displays the status of all migrations.
func MigrateUp ¶
MigrateUp performs all available database migrations to update the schema to the latest version.
func MigrateUpTo ¶
MigrateUpTo performs database migrations up to a specific version.
Types ¶
type DataReader ¶
type DataReader interface { // ReadUsers - Read users from the storage. ReadUsers(ctx context.Context, pagination database.Pagination) (users []*basev1.User, err error) }
DataReader - Interface for reading Data from the storage.
func NewNoopDataReader ¶
func NewNoopDataReader() DataReader
type DataWriter ¶
func NewNoopDataWriter ¶
func NewNoopDataWriter() DataWriter
type NoopDataReader ¶
type NoopDataReader struct{}
func (*NoopDataReader) ReadUsers ¶
func (f *NoopDataReader) ReadUsers(_ context.Context, _ database.Pagination) ([]*basev1.User, error)
type NoopDataWriter ¶
type NoopDataWriter struct{}
Click to show internal directories.
Click to hide internal directories.