uic

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

README

Uic Controller

API List:
Login
  • 登入
Logout
  • 登出
SessionChecking
  • 檢查Session Token
CreateUser
  • 註冊
UpdateUser
  • 更新
PasswdChange
  • 更新密碼
UserList
  • 拿取使用者列表
AdminPasswdChange
  • 管理者管理使用者密碼
AdminUserDelete
  • 管理者刪除使用者
ChangeRuleOfUser
  • 管理者更改使用者權限

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminChangePassword

func AdminChangePassword(c *gin.Context)

admin usage

func AdminUserDelete

func AdminUserDelete(c *gin.Context)

admin usage

func AuthSession

func AuthSession(c *gin.Context)

func BossRedirectLogin

func BossRedirectLogin(c *gin.Context)

Deprecated

func ChangePassword

func ChangePassword(c *gin.Context)

func ChangeRuleOfUser

func ChangeRuleOfUser(c *gin.Context)

func CreateRoot

func CreateRoot(c *gin.Context)

func CreateTeam

func CreateTeam(c *gin.Context)

func CreateUser

func CreateUser(c *gin.Context)

func DeleteTeam

func DeleteTeam(c *gin.Context)

func ForwardToBossLoginPage

func ForwardToBossLoginPage(c *gin.Context)

Deprecated

func GetBossUserInfoByCookie

func GetBossUserInfoByCookie(c *gin.Context)

func GetTeam

func GetTeam(c *gin.Context)

func GetTeamByName

func GetTeamByName(c *gin.Context)

func GetUser

func GetUser(c *gin.Context)

anyone should get the user information

func Login

func Login(c *gin.Context)

func Logout

func Logout(c *gin.Context)

func RedirectToOriginalPage

func RedirectToOriginalPage(c *gin.Context)

Deprecated

func Routes

func Routes(r *gin.Engine)

func Teams

func Teams(c *gin.Context)

support root as admin

func UpdateTeam

func UpdateTeam(c *gin.Context)

func UpdateUser

func UpdateUser(c *gin.Context)

func UserInfo

func UserInfo(c *gin.Context)

func UserList

func UserList(c *gin.Context)

Types

type APIAdminChangePassword

type APIAdminChangePassword struct {
	UserID int    `json:"user_id" binding:"required"`
	Passwd string `json:"password" binding:"required"`
}

type APIAdminUserDeleteInput

type APIAdminUserDeleteInput struct {
	UserID int `json:"user_id" binding:"required"`
}

type APICgPassedInput

type APICgPassedInput struct {
	OldPassword string `json:"old_password" binding:"required"`
	NewPassword string `json:"new_password" binding:"required"`
}

type APICreateTeamInput

type APICreateTeamInput struct {
	Name    string  `json:"team_name" binding:"required"`
	Resume  string  `json:"resume"`
	UserIDs []int64 `json:"users"`
}

type APIDeleteTeamInput

type APIDeleteTeamInput struct {
	ID int64 `json:"team_id" binding:"required"`
}

type APIGetTeamOutput

type APIGetTeamOutput struct {
	uic.Team
	Users []uic.User `json:"users"`
}

type APILoginInput

type APILoginInput struct {
	Name     string `json:"name"  form:"name" binding:"required"`
	Password string `json:"password"  form:"password" binding:"required"`
}

type APIRoleUpdate

type APIRoleUpdate struct {
	UserID int64  `json:"user_id" binding:"required"`
	Admin  string `json:"admin" binding:"required"`
}

admin usage

type APITeamInputs

type APITeamInputs struct {
	Limit       int    `json:"limit" form:"limit"`
	Page        int    `json:"page" form:"page"`
	SkipMembers bool   `json:"skip_members" form:"skip_members"`
	Q           string `json:"q" form:"q"`
}

type APIUpdateTeamInput

type APIUpdateTeamInput struct {
	ID      int    `json:"team_id" binding:"required"`
	Name    string `json:"team_name"`
	Resume  string `json:"resume"`
	UserIDs []int  `json:"users"`
}

type APIUserInput

type APIUserInput struct {
	Name   string `json:"name" binding:"required"`
	Cnname string `json:"cnname" binding:"required"`
	Passwd string `json:"password" binding:"required"`
	Email  string `json:"email" binding:"required"`
	Phone  string `json:"phone"`
	IM     string `json:"im"`
	QQ     string `json:"qq"`
}

type APIUserUpdateInput

type APIUserUpdateInput struct {
	Cnname string `json:"cnname" binding:"required"`
	Email  string `json:"email" binding:"required"`
	Phone  string `json:"phone"`
	IM     string `json:"im"`
	QQ     string `json:"qq"`
}

type BossUserInfoOutputStruct

type BossUserInfoOutputStruct struct {
	Status int
	Info   string
	Data   struct {
		UserID       string        `json:"user_id"`
		UserName     string        `json:"username"`
		WeChat       string        `json:"wechat"`
		Cell         string        `json:"cell"`
		Email        string        `json:"email"`
		Telphone     string        `json:"telphone"`
		Realname     string        `json:"realname"`
		Position     string        `json:"position"`
		DepartmentID string        `json:"department_id"`
		TeamID       []interface{} `json:"team_id"`
		Roles        []string      `json:"roles"`
	}
}

type CTeam

type CTeam struct {
	Team        uic.Team
	TeamCreator string `json:"creator_name"`
	Useres      []uic.User
}

Jump to

Keyboard shortcuts

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