uic

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminChangePassword

func AdminChangePassword(c *gin.Context)

func AdminChangeUserProfile

func AdminChangeUserProfile(c *gin.Context)

func AdminUserDelete

func AdminUserDelete(c *gin.Context)

func AuthSession

func AuthSession(c *gin.Context)

func ChangePassword

func ChangePassword(c *gin.Context)

func ChangeRoleOfUser

func ChangeRoleOfUser(c *gin.Context)

func CreateRoot

func CreateRoot(c *gin.Context)

func CreateTeam

func CreateTeam(c *gin.Context)

every user can create a team

func CreateUser

func CreateUser(c *gin.Context)

func DeleteTeam

func DeleteTeam(c *gin.Context)

only admin or team creator can delete a team

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 GetUserByName

func GetUserByName(c *gin.Context)

func GetUserTeams added in v0.2.1

func GetUserTeams(c *gin.Context)

func IsUserInTeams

func IsUserInTeams(c *gin.Context)

func Login

func Login(c *gin.Context)

func Logout

func Logout(c *gin.Context)

func Routes

func Routes(r *gin.Engine)

func Teams

func Teams(c *gin.Context)

support root as admin

func UpdateCurrentUser

func UpdateCurrentUser(c *gin.Context)

update current user profile

func UpdateTeam

func UpdateTeam(c *gin.Context)

admin, team creator, team member can mangage the team

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 APIAdminChangeUserProfileInput

type APIAdminChangeUserProfileInput struct {
	UserID int    `json:"user_id" binding:"required"`
	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 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"`
	TeamCreator string     `json:"creator_name"`
}

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"`
}

type APIUpdateTeamInput

type APIUpdateTeamInput struct {
	ID      int    `json:"team_id" binding:"required"`
	Resume  string `json:"resume"`
	Name    string `json:"name"`
	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 CTeam

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

Jump to

Keyboard shortcuts

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