user

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUserArgs

type AddUserArgs struct {
	UID   int64
	Name  string
	Phone string
}

AddUserArgs AddUser function params

type InfoResult

type InfoResult struct {
	UID        int64
	Name       string
	Phone      string
	CreateTime int64
	UpdateTime int64
}

InfoResult user info result

type Service

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

Service user service

func GetUserService

func GetUserService() *Service

GetUserService get UserService

func NewUserService

func NewUserService(uRepo *repo) *Service

NewUserService new UserService

func (*Service) AddUser

func (us *Service) AddUser(c *gin.Context, args *AddUserArgs) error

AddUser add user

func (*Service) DeleteUser

func (us *Service) DeleteUser(c *gin.Context, uid int64) error

DeleteUser delete user

func (*Service) SelectUser

func (us *Service) SelectUser(c *gin.Context, uid int64) (*InfoResult, error)

SelectUser select user info by uid

func (*Service) UpdateUser

func (us *Service) UpdateUser(c *gin.Context, uid int64, newName, newPhone string) error

UpdateUser update user

Jump to

Keyboard shortcuts

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