adapter

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountPsqlRepository

type AccountPsqlRepository struct {
	// contains filtered or unexported fields
}

func NewAccountRepositoryPsql

func NewAccountRepositoryPsql(conn *sql.DB) *AccountPsqlRepository

NewAccountRepository TODO

func (*AccountPsqlRepository) GetOneByID

func (r *AccountPsqlRepository) GetOneByID(ctx context.Context, id string) (*domain.Account, error)

GetOneByID returns an account by an ID.

func (*AccountPsqlRepository) GetOneByTgID

func (r *AccountPsqlRepository) GetOneByTgID(ctx context.Context, tgID domain.TelegramID) (*domain.Account, error)

GetOneByTgID returns an account by a TelegramID.

func (*AccountPsqlRepository) Save

func (r *AccountPsqlRepository) Save(ctx context.Context, account *domain.Account) error

Save create or update an account in the repository. Verify optimistic locking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL