Documentation
¶
Overview ¶
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Copyright 2019 Axetroy. All rights reserved. MIT license.
Index ¶
- Constants
- Variables
- type Address
- type AddressPure
- type AdminProfile
- type AdminProfilePure
- type AdminProfileWithToken
- type Banner
- type BannerPure
- type FileResponse
- type Help
- type HelpPure
- type Invite
- type InvitePure
- type List
- type LogLogin
- type LogLoginPure
- type Menu
- type MenuPure
- type Message
- type MessageAdmin
- type MessagePure
- type MessagePureAdmin
- type Meta
- type News
- type NewsPure
- type Notification
- type NotificationAdmin
- type NotificationPure
- type NotificationPureAdmin
- type Profile
- type ProfilePure
- type ProfileWithToken
- type Query
- type Report
- type ReportPure
- type Response
- type Role
- type RolePure
- type TransferLog
- type TransferLogPure
- type Wallet
- type WalletPure
Constants ¶
const ( StatusSuccess = 1 StatusFail = 0 )
Variables ¶
var ( DefaultLimit = 10 // 默认只获取 10 条数据 DefaultPage = 0 // 默认第 0 页 DefaultSort = "created_at DESC" // 默认按照创建时间排序, 只允许 MaxLimit = 100 )
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
AddressPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type AddressPure ¶
type AddressPure struct {
Id string `json:"id"` // 地址ID
Name string `json:"name"` // 收货人
Phone string `json:"phone"` // 收货人手机号
ProvinceCode string `json:"province_code"` // 省份代码
CityCode string `json:"city_code"` // 城市代码
AreaCode string `json:"area_code"` // 区域代码
Address string `json:"address"` // 详细的地址
IsDefault bool `json:"is_default"` // 是否是默认地址
}
type AdminProfile ¶
type AdminProfile struct {
AdminProfilePure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type AdminProfilePure ¶
type AdminProfileWithToken ¶
type AdminProfileWithToken struct {
AdminProfile
Token string `json:"token"`
}
type Banner ¶
type Banner struct {
BannerPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type BannerPure ¶
type BannerPure struct {
Id string `json:"id"` // 地址ID
Image string `json:"image"` // 图片 URL
Href string `json:"href"` // 点击图片跳转 URL
Platform model.BannerPlatform `json:"platform"` // 平台
Description *string `json:"description"` // 描述
Priority *string `json:"priority"` // 优先级,用于排序
Identifier *string `json:"identifier"` // APP 跳转标识符
FallbackUrl *string `json:"fallback_url"` // APP 跳转标识符的备选方案
}
type FileResponse ¶
type FileResponse struct {
Hash string `json:"hash"` // 文件 hash
Filename string `json:"filename"` // 存储在服务端的文件名
Origin string `json:"origin"` // 上传文件的原始名
Size int64 `json:"size"` // 文件大小
RawPath string `json:"raw_path"` // 纯文本的文件路径, 需要拼接上域名
DownloadPath string `json:"download_path"` // 下载的文件路径, 需要拼接上域名
}
type HelpPure ¶ added in v0.1.1
type HelpPure struct {
Id string `json:"id"` // 帮助文章ID
Title string `json:"title"` // 帮助文章标题
Content string `json:"content"` // 帮助文章内容
Tags []string `json:"tags"` // 帮助文章的标签
Status model.HelpStatus `json:"status"` // 帮助文章状态
Type model.HelpType `json:"type"` // 帮助文章的类型
ParentId *string `json:"parent_id"` // 父级 ID,如果有的话
}
type Invite ¶
type Invite struct {
InvitePure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type InvitePure ¶
type LogLogin ¶
type LogLogin struct {
LogLoginPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type LogLoginPure ¶
type Message ¶
type Message struct {
MessagePure
ReadAt *string `json:"read"` // 用户读取的时间
CreatedAt string `json:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at"` // 更新时间
}
type MessageAdmin ¶
type MessageAdmin struct {
MessagePureAdmin
ReadAt *string `json:"read"` // 用户读取的时间
CreatedAt string `json:"created_at"` // 创建时间
UpdatedAt string `json:"updated_at"` // 更新时间
}
type MessagePure ¶
type MessagePureAdmin ¶
type Notification ¶
type Notification struct {
NotificationPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type NotificationAdmin ¶
type NotificationAdmin struct {
NotificationPureAdmin
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type NotificationPure ¶
type NotificationPure struct {
Id string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Read bool `json:"read"` // 用户是否已读
ReadAt string `json:"read_at"` // 用户读取的时间
Note *string `json:"note"`
}
普通会员获取的接口
type NotificationPureAdmin ¶
type NotificationPureAdmin struct {
Id string `json:"id"`
Author string `json:"author"`
Title string `json:"title"`
Content string `json:"content"`
Note *string `json:"note"`
}
这是管理员获取的接口
type Profile ¶
type Profile struct {
ProfilePure
PayPassword bool `json:"pay_password"` // 是否已设置交易密码
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type ProfilePure ¶
type ProfilePure struct {
Id string `json:"id"`
Username string `json:"username"`
Nickname *string `json:"nickname"`
Email *string `json:"email"`
Phone *string `json:"phone"`
Status int32 `json:"status"`
Gender int `json:"gender"`
Avatar string `json:"avatar"`
Role []string `json:"role"`
Level int32 `json:"level"`
InviteCode string `json:"invite_code"`
}
type ProfileWithToken ¶
type Query ¶
type Report ¶
type Report struct {
ReportPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type ReportPure ¶
type ReportPure struct {
Id string `json:"id"`
Uid string `json:"uid"`
Title string `json:"title"`
Content string `json:"content"`
Type model.ReportType `json:"type"`
Status model.ReportStatus `json:"status"`
Screenshots []string `json:"screenshots"`
Locked bool `json:"locked"`
}
type TransferLog ¶
type TransferLog struct {
TransferLogPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type TransferLogPure ¶
type Wallet ¶
type Wallet struct {
WalletPure
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}