Documentation
¶
Index ¶
- Variables
- type DB
- func (d *DB) Get(ctx context.Context, id string) (*MetadataEntity, error)
- func (d *DB) GetMany(ctx context.Context) ([]*MetadataEntity, error)
- func (d *DB) GetUser(ctx context.Context, login string) (*UserEntity, error)
- func (d *DB) Register(ctx context.Context, in model.UserCredentials) (model.UserID, error)
- func (d *DB) Save(ctx context.Context, data model.Save) (string, error)
- type DBPool
- type MetadataEntity
- type UserEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserExists is returned when the user already exists. ErrUserExists = errors.New("user already exists") // ErrUserNotFound is returned when the requested user is not found. ErrUserNotFound = errors.New("user not found") // ErrMetadataNotFound is returned when the requested ID is not found. ErrMetadataNotFound = errors.New("metadata not found") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { *DBPool // contains filtered or unexported fields }
DB provides methods for interacting with the database. It encapsulates the database connection pool and configuration settings.
type DBPool ¶
type DBPool struct {
// contains filtered or unexported fields
}
DBPool wraps a pool of connections and manages communication with the database.
type MetadataEntity ¶
type UserEntity ¶
UserEntity describes user database entity.
Click to show internal directories.
Click to hide internal directories.