repo

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewImpl)

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IRepo

type IRepo interface {
	// GetByID serve caller to get user information by id
	GetByID(ctx contextx.Contextx, id int64) (info *user.Profile, err error)

	// GetByToken serve caller to get user information by token
	GetByToken(ctx contextx.Contextx, token string) (info *user.Profile, err error)

	// GetByEmail serve caller to get user information by email
	GetByEmail(ctx contextx.Contextx, email string) (info *user.Profile, err error)

	// Register serve caller to create an account by email and password
	Register(ctx contextx.Contextx, newUser *user.Profile) (info *user.Profile, err error)

	// UpdateToken serve caller to update token by id
	UpdateToken(ctx contextx.Contextx, updated *user.Profile) (info *user.Profile, err error)
}

IRepo declare user repo function

func CreateRepo

func CreateRepo(path string) (IRepo, error)

CreateRepo serve caller to create an IRepo

func NewImpl

func NewImpl(logger *zap.Logger, rw *sqlx.DB) IRepo

NewImpl serve caller to create an IRepo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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