Documentation ¶
Index ¶
- type AccessKey
- type AccessKeyResponseDto
- type AccessTokenClaims
- type Action
- type ActionDto
- type AddAccessKeyDto
- type AddAppDto
- type AddUserDto
- type App
- type AppConfig
- type AppUser
- type AppUserCreateDto
- type AppUserDeleteDto
- type AppUserQuery
- type AppUserUpdateDto
- type Department
- type DepartmentDto
- type DepartmentUser
- type GetAppResponseDto
- type GetAppUserResponseDto
- type GetUserResponseDto
- type ListAccessKeyDto
- type ListActionDto
- type ListAppDto
- type ListAppUserDto
- type ListDepartmentDto
- type ListDepartmentUserDto
- type ListOrganizationDto
- type ListOrganizationUserDto
- type ListResourceDto
- type ListRoleDto
- type ListWxUserDto
- type MiniProgram
- type OIDCTokenResponse
- type Organization
- type OrganizationDto
- type OrganizationUser
- type OrganizationUserDto
- type PhoneCodeLoginDto
- type PhoneCodeRegisterDto
- type PhoneCodeRequestDtto
- type PhonePasswordLoginDto
- type ResetAccessSecretDto
- type Resource
- type ResourceDto
- type Role
- type RoleDto
- type SocialBindDto
- type SocialBindRespDto
- type SocialLoginCallbackDto
- type SocialLoginDto
- type SocialLoginRespDto
- type SocialUnBindDto
- type SocialWxOfficeTemplateMsgDto
- type UpdateAccessKeyDto
- type UpdateAppDto
- type UpdatePasswordDto
- type UpdatePhoneDto
- type UpdateUserDto
- type UpdateUserProfileDto
- type User
- type UserListDto
- type UserProfile
- type UsernameLoginDto
- type UsernameLoginResult
- type UsernameRegisterDto
- type VerifyActionDto
- type WxUser
- type WxUserQueryDto
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKeyResponseDto ¶
type AccessKeyResponseDto struct { common.BaseResponse Data AccessKey `json:"data,omitempty"` }
type AccessTokenClaims ¶
type AccessTokenClaims struct {
jwt.StandardClaims
}
type Action ¶
type Action struct { ID uint `json:"id"` Code string `json:"code"` Description string `json:"description"` ResourceCode string `json:"resource_code"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` Resource Resource `json:"resource"` }
资源操作模型
type ActionDto ¶
type ActionDto struct { Data Action common.BaseResponse }
type AddAccessKeyDto ¶
type AddAccessKeyDto struct {
Comment string `json:"comment,omitempty"`
}
type AddUserDto ¶
type AppUserCreateDto ¶
type AppUserDeleteDto ¶
type AppUserQuery ¶
type AppUserUpdateDto ¶
type AppUserUpdateDto AppUserCreateDto
type Department ¶
type Department struct { ID uint `json:"id"` OrganizationID uint `json:"organization_id"` Name string `json:"name"` Description string `json:"description"` Status bool `json:"status"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` Organization Organization `json:"organization"` Users []User `json:"users"` }
部门模型
type DepartmentDto ¶
type DepartmentDto struct { Data Department common.BaseResponse }
type DepartmentUser ¶
type DepartmentUser struct { ID uint `json:"id"` DepartmentID uint `json:"department_id"` UserUID string `json:"user_uid"` IsManager bool `json:"is_manager"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` User User `json:"user"` Department Department `json:"department"` }
组织用户模型
type GetAppResponseDto ¶
type GetAppResponseDto struct { common.BaseResponse Data App }
type GetAppUserResponseDto ¶
type GetAppUserResponseDto struct { common.BaseResponse Data AppUser }
type GetUserResponseDto ¶
type GetUserResponseDto struct { common.BaseResponse Data User }
type ListAccessKeyDto ¶
type ListAccessKeyDto struct { common.BaseResponse Data []AccessKey `json:"data,omitempty"` }
type ListActionDto ¶
type ListActionDto struct { Data []Action common.BaseListResponse }
type ListAppDto ¶
type ListAppDto struct { Data []App common.BaseResponse }
type ListAppUserDto ¶
type ListAppUserDto struct { Data []AppUser common.BaseResponse }
type ListDepartmentDto ¶
type ListDepartmentDto struct { Data []Department common.BaseListResponse }
type ListDepartmentUserDto ¶
type ListDepartmentUserDto struct { Data []DepartmentUser common.BaseListResponse }
type ListOrganizationDto ¶
type ListOrganizationDto struct { Data []Organization common.BaseListResponse }
type ListOrganizationUserDto ¶
type ListOrganizationUserDto struct { Data []OrganizationUser common.BaseListResponse }
type ListResourceDto ¶
type ListResourceDto struct { Data []Resource common.BaseListResponse }
type ListRoleDto ¶
type ListRoleDto struct { Data []Role common.BaseListResponse }
type ListWxUserDto ¶
type ListWxUserDto struct { common.BaseResponse Data []WxUser `json:"data,omitempty"` }
type MiniProgram ¶
type OIDCTokenResponse ¶
type OIDCTokenResponse struct { AccessToken string `json:"access_token,omitempty"` IDToken string `json:"id_token,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` //可选 ExpiresIn uint64 `json:"expires_in,omitempty"` TokenType string `json:"token_type,omitempty"` Error string `json:"error,omitempty"` ErrorDescription string `json:"error_description,omitempty"` }
type Organization ¶
type Organization struct { ID uint `json:"id"` CreatorUID string `json:"creator_uid"` Name string `json:"name"` Email string `json:"email"` Country string `json:"country"` City string `json:"city"` Category string `json:"category"` Description string `json:"description"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` Departments []Department `json:"departments"` Users []User `json:"users"` }
组织模型
type OrganizationDto ¶
type OrganizationDto struct { Data Organization common.BaseResponse }
type OrganizationUser ¶
type OrganizationUser struct { ID uint `json:"id"` OrganizationID uint `json:"organization_id"` UserUID string `json:"user_uid"` IsManager bool `json:"is_manager"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` User User `json:"user"` Organization Organization `json:"organization"` }
组织用户模型
type OrganizationUserDto ¶
type OrganizationUserDto struct { Data []User common.BaseResponse }
获取指定组织下所有用户信息
type PhoneCodeLoginDto ¶
type PhoneCodeRegisterDto ¶
type PhoneCodeRequestDtto ¶
type PhoneCodeRequestDtto struct {
Phone string `json:"phone"`
}
type PhonePasswordLoginDto ¶
type ResetAccessSecretDto ¶
type ResetAccessSecretDto struct { Data string `json:"data,omitempty"` common.BaseResponse }
type Resource ¶
type Resource struct { ID uint `json:"id"` Code string `json:"code"` Type string `json:"status"` Description string `json:"description"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` Actions []Action `json:"actions"` ActionArr []string `json:"action_arr"` // [map[data1:[read write] data2:[read]]] }
资源模型
type ResourceDto ¶
type ResourceDto struct { Data Resource common.BaseResponse }
type Role ¶
type Role struct { ID uint `json:"id"` Code string `json:"code"` Description string `json:"description"` Status bool `json:"status"` Createdat string `json:"createdat"` Updatedat string `json:"updatedat"` ActionArr []map[string][]string `json:"action_arr"` // [map[data1:[read write] data2:[read]]] }
type RoleDto ¶
type RoleDto struct { Data Role common.BaseResponse }
type SocialBindDto ¶
type SocialBindRespDto ¶
type SocialBindRespDto struct { common.BaseResponse Data struct { // 微信公众号绑定返回的字段 AuthCodeURL string `json:"auth_code_url,omitempty"` // 通过该URL获取用户授权code } `json:"data,omitempty"` }
type SocialLoginCallbackDto ¶
type SocialLoginCallbackDto struct { // 微信小程序登录无需传入字段 // 微信公众号授权登陆后循环回调需要传入的字段 Ticket string `json:"ticket,omitempty"` // 通过唯一的ticket确认是否是同一个用户,获取该用户是否授权成功,成功后返回该用户登陆信息 // 微信开放平台登录时需要传入的字段 Code string `json:"code,omitempty"` // 通过 code 换取网页授权 access_token. State string `json:"state,omitempty"` // 即identifier }
type SocialLoginDto ¶
type SocialLoginRespDto ¶
type SocialLoginRespDto struct { common.BaseResponse Data struct { // 微信小程序授权登陆返回的字段 User // 微信公众号授权登陆返回的字段 Ticket string `json:"ticket,omitempty"` RedirectURI string `json:"redirect_uri,omitempty"` // 前端通过该URI寻回回调地址 QrcodepicURI string `json:"qrcodepic_uri,omitempty"` // 二维码图片地址 // 微信开放平台返回的字段 AuthCodeURL string `json:"auth_code_url,omitempty"` // 通过该URL获取用户授权code } `json:"data,omitempty"` }
type SocialUnBindDto ¶
type SocialWxOfficeTemplateMsgDto ¶
type SocialWxOfficeTemplateMsgDto struct { ToUser string `json:"touser"` // 必须, 接受者OpenID TemplateId string `json:"template_id"` // 必须, 模版ID URL string `json:"url,omitempty"` // 可选, 用户点击后跳转的URL, 该URL必须处于开发者在公众平台网站中设置的域中 MiniProgram *MiniProgram `json:"miniprogram,omitempty"` // 可选, 跳小程序所需数据,不需跳小程序可不用传该数据 Data json.RawMessage `json:"data"` // 必须, 模板数据, JSON 格式的 []byte, 满足特定的模板需求 }
微信公众号模板消息
type UpdateAccessKeyDto ¶
type UpdateAppDto ¶
type UpdatePasswordDto ¶
type UpdatePhoneDto ¶
type UpdatePhoneDto struct { Phone string `form:"phone" json:"phone"` Code int `form:"code" json:"code" binding:"min=1111,max=9999"` NewPhone string `form:"new_phone" json:"new_phone" binding:"required"` NewCode int `form:"new_code" json:"new_code" binding:"required,min=1111,max=9999"` }
UpdatePhoneDto 用户修改手机表单
type UpdateUserDto ¶
type UpdateUserDto struct { UserName string `json:"username,omitempty"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Password string `json:"password,omitempty"` Nickname string `json:"nickname,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Language string `json:"language,omitempty"` Birthdate string `json:"birthdate,omitempty"` Gender string `json:"gender,omitempty"` //'M' | 'F' | 'U' Picture string `json:"picture,omitempty"` Timezone string `json:"timezone,omitempty"` Locale string `json:"locale,omitempty"` }
type UpdateUserProfileDto ¶
type UpdateUserProfileDto struct {
UserProfile
}
type User ¶
type User struct { UID string `json:"uid,omitempty"` IsSuper bool `json:"issuper,omitempty"` UserName string `json:"username,omitempty"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` AccessToken string `json:"access_token,omitempty"` UpdatedAt string `json:"updatedat,omitempty"` CrateddAt string `json:"createdat,omitempty"` SourceType string `json:"source_type,omitempty"` // adminCreated=超级管理员创建, orgManagerCreated= 组织管理员创建, selfRegister=自注册 CreatorUID string `json:"creator_uid,omitempty"` // 创建者UID AccountStatus int `json:"account_status,omitempty"` // 1=正常,2=封禁 WxUsers []WxUser `json:"wxUsers,omitempty"` Roles []string `json:"roles,omitempty"` OrganizationIDs []uint `json:"organization_ids,omitempty"` UserProfile }
type UserListDto ¶
type UserListDto struct { Data []User common.BaseResponse }
type UserProfile ¶
type UserProfile struct { Nickname string `json:"nickname,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Language string `json:"language,omitempty"` Birthdate string `json:"birthdate,omitempty"` Gender string `json:"gender,omitempty"` //'M' | 'F' | 'U' Picture string `json:"picture,omitempty"` Timezone string `json:"timezone,omitempty"` Locale string `json:"locale,omitempty"` UnionId string `json:"unionId,omitempty"` OpenId string `json:"openId,omitempty"` }
type UsernameLoginDto ¶
type UsernameLoginResult ¶
type UsernameLoginResult struct { User AccessTokenClaims }
type UsernameRegisterDto ¶
type VerifyActionDto ¶
type VerifyActionDto struct { Data struct { HasPermission bool `json:"hasPermission"` } `json:"data"` common.BaseResponse }
type WxUser ¶
type WxUser struct { ID string `json:"id"` Name string `json:"name"` OpenID string `json:"openid"` UnionID string `json:"unionid"` Phone string `json:"phone"` UID string `json:"uid"` SocialID string `json:"socialid"` UpdatedAt string `json:"updatedAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"` }
WxUser 微信用户结构定义
type WxUserQueryDto ¶
type WxUserQueryDto struct { Phone string `json:"phone" binding:"omitempty"` OpenID string `json:"openid" binding:"omitempty"` UnionID string `json:"unionid" binding:"omitempty"` }
WxUserQueryDto 微信用户查询表单
Click to show internal directories.
Click to hide internal directories.