data

package
v0.0.0-...-c820190 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataFactory

type DataFactory interface {
	User() UserData
}

type User

type User struct {
	ID       int32     `json:"id"`
	Mobile   string    `json:"mobile"`
	NickName string    `json:"nick_name"`
	Birthday time.Time `gorm:"type:datetime"`
	Gender   string    `json:"gender"`
	Role     int32     `json:"role"`
	PassWord string    `json:"password"`
}

type UserData

type UserData interface {
	Create(ctx context.Context, user *User) (userInfo *v1.UserInfoResponse, err error)
	Update(ctx context.Context, user *User) error
	Get(ctx context.Context, userID int32) (*User, error)
	GetByMobile(ctx context.Context, mobile string) (*User, error)
	CheckPassWord(ctx context.Context, password, encryptedPwd string) (ok bool, err error)
}

type UserListDO

type UserListDO struct {
	TotalCount int64   `json:"totalCount,omitempty"`
	Items      []*User `json:"items"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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