api

package
v0.0.0-...-1dea177 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserAuthRouter

func AddUserAuthRouter(g *gin.RouterGroup, srvi UserAuth)

func AddUserInfoRouter

func AddUserInfoRouter(g *gin.RouterGroup, srvi UserInfo)

Types

type UserAuth

type UserAuth interface {
	Register(username, password string) (token string, err error)
	Login(username, password string) (token string, err error)
}

type UserInfo

type UserInfo interface {
	UploadAvatar(userId string, avatar *os.File) error
	AddProfile(userId string, profile *models.Profile) error
	Profile(userId string) (*models.Profile, error)
	UserStatistics() (userTotalCount, userDailyCount uint64, err error)
}

Jump to

Keyboard shortcuts

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