domain

package
v0.0.0-...-0575462 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUsecase

type AuthUsecase interface {
	Register(ctx context.Context, user *User) (User, error)
	Login(ctx context.Context, account, password string) (User, error)
	Logout(ctx context.Context, account string) error
}

type User

type User struct {
	ID       int64
	Account  string
	Password string
	Name     string
	Avatar   string
	Token    string
}

type UserPostgreRepository

type UserPostgreRepository interface {
	InsertNewUser(ctx context.Context, user *User) error
	QueryByAccount(ctx context.Context, account string) (User, error)
}

type UserUsecase

type UserUsecase interface {
	IsUserExist(ctx context.Context, account string) (bool, error)
}

Jump to

Keyboard shortcuts

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