Documentation
¶
Index ¶
- Constants
- Variables
- func AddPeopleToWorkShop(do, who int64, workshop int32, position int16) uint8
- func Authorized(who int64) bool
- func ChangeMemberPosition(workshop int32, do int64, who int64, to int16) uint8
- func ChangeWorkshop(do int64, workshop int32, headImage int64) uint8
- func ChangeWorkshopLevel(workshop int32, level int16) uint8
- func CheckAuthorized(id int64) bool
- func Follow(doer, doee int64) bool
- func GenPasswordInBack(pw string) string
- func LoadFollow(doer int64) ([]int64, error)
- func LoadUserDescription(userId int64) (*ComplexString.ComplexString, error)
- func MakePasswordInFront(password string) string
- func PrepareUserDir()
- func PrepareWorkshopDir()
- func RemovePeopleFromWorkshop(do, who int64, workshop int32) uint8
- func SaveUsersLongDescription(new *ComplexString.ComplexString, who int64) error
- func Unauthorized(who int64) bool
- type Designer
- type Email
- type Identity
- type Password
- type PhoneNumber
- type Public
- type School
- type Student
- type TimeJson
- type UserBase
- func (u *UserBase) ChangePassword(oldPassword, newPassword Password) bool
- func (u *UserBase) SignUp() uint8
- func (u *UserBase) ToMini() *UserMini
- func (u *UserBase) Update() uint8
- func (u *UserBase) UpdateIdentity() bool
- func (u *UserBase) UpdateInTransition(tx *sql.Tx) error
- func (u *UserBase) UserType() uint8
- type UserMini
- type Work
- type WorkShopBase
- type Workshop
- type WorkshopMember
Constants ¶
View Source
const ( StudentType = iota DesignerType PublicType )
View Source
const ( Success = iota E发起方不存在 E越权 E工作组不存在 E受邀者未受认证 E不得增加组长 E未知错误 = 255 )
View Source
const ( Normal = iota Manager Owner )
Variables ¶
View Source
var NoAccountError = errors.New("NO THIS ACCOUNT")
Functions ¶
func AddPeopleToWorkShop ¶
func Authorized ¶
func ChangeMemberPosition ¶
func ChangeWorkshopLevel ¶
just call from the control platform
func CheckAuthorized ¶
func GenPasswordInBack ¶
func LoadFollow ¶
func LoadUserDescription ¶
func LoadUserDescription(userId int64) (*ComplexString.ComplexString, error)
func MakePasswordInFront ¶
func PrepareUserDir ¶
func PrepareUserDir()
func PrepareWorkshopDir ¶
func PrepareWorkshopDir()
func SaveUsersLongDescription ¶
func SaveUsersLongDescription(new *ComplexString.ComplexString, who int64) error
func Unauthorized ¶
Types ¶
type PhoneNumber ¶
type PhoneNumber string
func (PhoneNumber) CheckRight ¶
func (p PhoneNumber) CheckRight() bool
type UserBase ¶
type UserBase struct { ID int64 `json:"id"` UserName string `json:"name"` Password Password Email Email `json:"email"` Coin uint64 `json:"coin"` FansNumber uint64 `json:"fans_number"` // 粉丝 FollowerNumber uint64 `json:"follow_number"` // 关注 PassageNumber uint64 `json:"passage_number"` // 文章总数 HeadImage int64 `json:"head_image"` BackImage int64 `json:"back_image"` Identity Identity `json:"identity"` }
func LoadUserBase ¶
func (*UserBase) ChangePassword ¶
func (*UserBase) UpdateIdentity ¶
type UserMini ¶
type UserMini struct { UserId int64 `json:"id"` UserName string `json:"name"` HeadImage int64 `json:"head_image"` Identity uint8 `json:"identity"` }
func GetOneUserMini ¶
func GetUserMini ¶
type WorkShopBase ¶
type Workshop ¶
type Workshop struct { *WorkShopBase LongDescription *ComplexString.ComplexString }
func LoadWorkshop ¶
func OpenWorkshop ¶
func OpenWorkshop(name string, headImage int64, longDescription *ComplexString.ComplexString, who int64) (*Workshop, error)
type WorkshopMember ¶
func ListWorkshopMember ¶
func ListWorkshopMember(id int64) ([]WorkshopMember, error)
Click to show internal directories.
Click to hide internal directories.