Back to

Package user

Latest Go to latest

The latest major version is .

Published: Feb 24, 2020 | License: Apache-2.0 | Module:


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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier