biz

package
v0.0.0-...-31da580 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 6 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound is user not found.
	ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found")
)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       string `json:"id"`
	Username string `json:"username"`

	CreatedAt *timestamppb.Timestamp `json:"created_at,omitempty"`
	// 开始时间
	UpdatedAt *timestamppb.Timestamp `json:"updated_at,omitempty"`
}

Account is a Greeter model.

type AccountRepo

type AccountRepo interface {
	FindByID(context.Context, string) (*Account, error)
}

AccountRepo is an Account repo.

type AccountUseCase

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

AccountUseCase is an account useCase.

func NewAccountUseCase

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

NewAccountUseCase new a user Account useCase.

func (*AccountUseCase) FindByID

func (uc *AccountUseCase) FindByID(ctx context.Context, id string) (*Account, error)

FindByID find a User Account Info, and returns the new Account.

Jump to

Keyboard shortcuts

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