account

package
v0.0.0-...-bc17f5c Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repositer

type Repositer interface {
	FindMany(ctx context.Context) ([]*model.Account, error)
	FindByID(ctx context.Context, id int) (*model.Account, error)
	FindByUsername(ctx context.Context, username string) (*model.Account, error)
	Create(ctx context.Context, input *model.Account) (*model.Account, error)
	UpdateByID(ctx context.Context, id int, input *model.Account) (*model.Account, error)
	DeleteByID(ctx context.Context, id int) error
}

func New

func New(driver driver.Driver) Repositer

type Repository

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

func (*Repository) Create

func (r *Repository) Create(ctx context.Context, input *model.Account) (*model.Account, error)

func (*Repository) DeleteByID

func (r *Repository) DeleteByID(ctx context.Context, id int) error

func (*Repository) FindByID

func (r *Repository) FindByID(ctx context.Context, id int) (*model.Account, error)

func (*Repository) FindByUsername

func (r *Repository) FindByUsername(ctx context.Context, username string) (*model.Account, error)

func (*Repository) FindMany

func (r *Repository) FindMany(ctx context.Context) ([]*model.Account, error)

func (*Repository) UpdateByID

func (r *Repository) UpdateByID(ctx context.Context, id int, input *model.Account) (*model.Account, error)

Jump to

Keyboard shortcuts

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