Documentation
¶
Overview ¶
Package postgres contains the database implementation of clients repository layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migration ¶
func Migration() *migrate.MemoryMigrationSource
Types ¶
type Repository ¶
type Repository interface { mgclients.Repository // Save persists the client account. A non-nil error is returned to indicate // operation failure. Save(ctx context.Context, client ...mgclients.Client) ([]mgclients.Client, error) // RetrieveBySecret retrieves a client based on the secret (key). RetrieveBySecret(ctx context.Context, key string) (mgclients.Client, error) // Delete deletes client with given id Delete(ctx context.Context, id string) error }
Repository is the interface that wraps the basic methods for a client repository.
func NewRepository ¶
func NewRepository(db postgres.Database) Repository
NewRepository instantiates a PostgreSQL implementation of Clients repository.
Click to show internal directories.
Click to hide internal directories.