example

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
}

type AccountRepo

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

func NewAccountRepo

func NewAccountRepo(pool *pgxpool.Pool) *AccountRepo

func (*AccountRepo) Find

func (r *AccountRepo) Find(ctx context.Context, id int) (*Account, error)

func (*AccountRepo) Save

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

type AccountService

type AccountService struct {
	// Embedding transactional behavior in your service
	tx.Transactor
	// contains filtered or unexported fields
}

func NewAccountService

func NewAccountService(transactor tx.Transactor, repo Repo) *AccountService

func (*AccountService) ProvisionAccount

func (s *AccountService) ProvisionAccount(ctx context.Context, r ProvisionAccountReq) error

type Conn

type Conn interface {
	Exec(ctx context.Context, sql string, arguments ...any) (commandTag pgconn.CommandTag, err error)
	Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
}

type ProvisionAccountReq

type ProvisionAccountReq struct {
}

type Repo

type Repo interface {
	Save(ctx context.Context, account Account) error
	Find(ctx context.Context, id int) (*Account, error)
}

Jump to

Keyboard shortcuts

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