Documentation ¶
Index ¶
- type OwnerStorage
- func (r *OwnerStorage) AddOwner(ctx context.Context, owner entities.Owner) (entities.Owner, error)
- func (r *OwnerStorage) DeleteOwnerByID(ctx context.Context, id int64) error
- func (s *OwnerStorage) GetOwnerById(ctx context.Context, id int64) (entities.Owner, error)
- func (s *OwnerStorage) GetOwnerByTelegramId(ctx context.Context, id int64) (entities.Owner, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OwnerStorage ¶
type OwnerStorage struct {
// contains filtered or unexported fields
}
OwnerStorage represents a PostgreSQL implementation of the storage for owners.
func New ¶
func New(db *sqlx.DB) *OwnerStorage
New creates a new instance of OwnerStorage with the given database connection.
func (*OwnerStorage) AddOwner ¶
AddOwner adds a new owner to the database and returns the newly created owner.
func (*OwnerStorage) DeleteOwnerByID ¶
func (r *OwnerStorage) DeleteOwnerByID(ctx context.Context, id int64) error
DeleteOwnerByID deletes an owner by their ID.
func (*OwnerStorage) GetOwnerById ¶
GetOwnerById retrieves an owner by their ID.
func (*OwnerStorage) GetOwnerByTelegramId ¶
GetOwnerByTelegramId retrieves an owner by their Telegram ID.
Click to show internal directories.
Click to hide internal directories.