biz

package
v0.0.0-...-db98cbe Latest Latest
Warning

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

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

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID      int32
	Uid     int32
	Type    int32
	Balance string
	Tag     string
	DT      string
	Ctime   string
}

type AccountRepo

type AccountRepo interface {
	GetAccountList(context.Context, int32) ([]Account, error)
}

type AccountUseCase

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

func NewAccountUseCase

func NewAccountUseCase(account AccountRepo, logger log.Logger) *AccountUseCase

func (*AccountUseCase) GetAccounts

func (uc *AccountUseCase) GetAccounts(ctx context.Context, limit int32) ([]Account, error)

type AuthUseCase

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

func NewAuthUseCase

func NewAuthUseCase(user UserRepo, logger log.Logger) *AuthUseCase

func (*AuthUseCase) Register

func (uc *AuthUseCase) Register(ctx context.Context, username, email, password string) (*UserLogin, error)

Register 用户注册

type User

type User struct {
	ID           uint64
	Username     string
	Email        string
	Password     string
	Image        string
	PasswordHash string
}

type UserLogin

type UserLogin struct {
	Email    string
	Username string
	Token    string
	Bio      string
	Image    string
}

type UserRepo

type UserRepo interface {
	Login(ctx context.Context, user User) error
	CreateUser(ctx context.Context, user *User) (uint64, error)
	GetUserByUsername(ctx context.Context, username string) (*User, error)
}

Jump to

Keyboard shortcuts

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