Documentation ¶
Index ¶
- func IDToPageToken(id int64) string
- func Int64SliceHas(sl []int64, v int64) bool
- func Int64SliceToInterface(s []int64) []interface{}
- func PageTokenToID(pageToken string) int64
- func PageTokenToTimestamp(pageToken string, defaultTime ...time.Time) int64
- func RandLabel() string
- func RandName() string
- func RandUID() string
- func SortStringsAndCheck(sl []string) (ok bool)
- func StrSliceToInterface(s []string) []interface{}
- func StringSliceHas(sl []string, v string) bool
- func StringToSlice(s string) []string
- func TimeToPageToken(t time.Time) string
- type ApplyRulesBody
- type BoolRes
- type CacheLabelsInfoRes
- type ErrorResponseType
- type GroupBody
- type GroupKindUID
- type GroupMember
- type GroupMembersRes
- type GroupMembersURL
- type GroupPaginationURL
- type GroupRes
- type GroupURL
- type GroupUpdateBody
- type GroupsBody
- type GroupsRes
- type GroupsURL
- type LabelBody
- type LabelGroupInfo
- type LabelGroupsInfoRes
- type LabelInfo
- type LabelInfoRes
- type LabelReleaseInfo
- type LabelReleaseInfoRes
- type LabelRuleBody
- type LabelRuleInfo
- type LabelRuleInfoRes
- type LabelRulesInfoRes
- type LabelUpdateBody
- type LabelUserInfo
- type LabelUsersInfoRes
- type LabelsInfoRes
- type ModuleRes
- type ModuleUpdateBody
- type ModulesRes
- type MyLabel
- type MyLabelsRes
- type MySetting
- type MySettingsQueryURL
- type MySettingsRes
- type NameDescBody
- type Pagination
- type ProductLabelGroupURL
- type ProductLabelHIDURL
- type ProductLabelUIDURL
- type ProductLabelURL
- type ProductModuleSettingGroupURL
- type ProductModuleSettingHIDURL
- type ProductModuleSettingUIDURL
- type ProductModuleSettingURL
- type ProductModuleURL
- type ProductPaginationURL
- type ProductRes
- type ProductStatistics
- type ProductStatisticsRes
- type ProductURL
- type ProductUpdateBody
- type ProductsRes
- type RecallBody
- type ResponseType
- type Search
- type SettingBody
- type SettingGroupInfo
- type SettingGroupsInfoRes
- type SettingInfo
- type SettingInfoRes
- type SettingReleaseInfo
- type SettingReleaseInfoRes
- type SettingRuleBody
- type SettingRuleInfo
- type SettingRuleInfoRes
- type SettingRulesInfoRes
- type SettingUpdateBody
- type SettingUserInfo
- type SettingUsersInfoRes
- type SettingsInfoRes
- type SuccessResponseType
- type UIDAndProductURL
- type UIDPaginationURL
- type UIDProductURL
- type UIDURL
- type UserRes
- type UsersBody
- type UsersGroupsBody
- type UsersGroupsBodyV2
- type UsersRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDToPageToken ¶ added in v1.1.0
IDToPageToken 把 int64 转换成 pageToken
func Int64SliceToInterface ¶ added in v1.4.0
func Int64SliceToInterface(s []int64) []interface{}
Int64SliceToInterface ...
func PageTokenToID ¶ added in v1.1.0
PageTokenToID 把 pageToken 转换为 int64
func PageTokenToTimestamp ¶ added in v1.4.0
PageTokenToTimestamp 把 pageToken 转换为 timestamp
func SortStringsAndCheck ¶ added in v1.2.0
SortStringsAndCheck sort string slice and check empty or duplicate value.
func StrSliceToInterface ¶ added in v1.4.0
func StrSliceToInterface(s []string) []interface{}
StrSliceToInterface ...
func StringSliceHas ¶ added in v1.2.0
StringSliceHas ...
func TimeToPageToken ¶ added in v1.1.0
TimeToPageToken 把 time 转换成 pageToken
Types ¶
type ApplyRulesBody ¶ added in v1.8.0
ApplyRulesBody ...
func (*ApplyRulesBody) Validate ¶ added in v1.8.0
func (t *ApplyRulesBody) Validate() error
Validate 实现 gear.BodyTemplate。
type CacheLabelsInfoRes ¶
type CacheLabelsInfoRes struct { SuccessResponseType Timestamp int64 `json:"timestamp"` // labels 数组生成时间 Result []schema.UserCacheLabel `json:"result"` // 空数组也保留 }
CacheLabelsInfoRes ...
type ErrorResponseType ¶ added in v1.1.0
ErrorResponseType 定义了标准的 API 接口错误时返回数据模型
type GroupBody ¶
type GroupBody struct { UID string `json:"uid"` Kind string `json:"kind"` Desc string `json:"desc"` }
GroupBody ...
type GroupKindUID ¶ added in v1.10.0
GroupKindUID ...
type GroupMember ¶
type GroupMember struct { ID int64 `json:"-" db:"id"` User string `json:"user" db:"uid"` CreatedAt time.Time `json:"createdAt" db:"created_at"` SyncAt int64 `json:"syncAt" db:"sync_at"` // 归属关系同步时间戳,1970 以来的秒数,应该与 group.sync_at 相等 }
GroupMember ...
type GroupMembersRes ¶
type GroupMembersRes struct { SuccessResponseType Result []GroupMember `json:"result"` }
GroupMembersRes ...
type GroupMembersURL ¶
type GroupMembersURL struct { Kind string `json:"kind" query:"kind"` UID string `json:"uid" param:"uid"` User string `json:"user" query:"user"` // 根据用户 uid 删除一个成员 SyncLt int64 `json:"syncLt" query:"syncLt"` // 或根据 sync_lt 删除同步时间小于指定值的所有成员 }
GroupMembersURL ...
func (*GroupMembersURL) Validate ¶
func (t *GroupMembersURL) Validate() error
Validate 实现 gear.BodyTemplate。
type GroupPaginationURL ¶ added in v1.10.0
type GroupPaginationURL struct { Pagination UID string `json:"uid" param:"uid"` Kind string `json:"kind" query:"kind"` }
GroupPaginationURL ...
func (*GroupPaginationURL) Validate ¶ added in v1.10.0
func (t *GroupPaginationURL) Validate() error
Validate 实现 gear.BodyTemplate。
type GroupRes ¶ added in v1.2.0
type GroupRes struct { SuccessResponseType Result schema.Group `json:"result"` }
GroupRes ...
type GroupUpdateBody ¶ added in v1.2.0
GroupUpdateBody ...
func (*GroupUpdateBody) ToMap ¶ added in v1.2.0
func (t *GroupUpdateBody) ToMap() map[string]interface{}
ToMap ...
func (*GroupUpdateBody) Validate ¶ added in v1.2.0
func (t *GroupUpdateBody) Validate() error
Validate 实现 gear.BodyTemplate。
type GroupsRes ¶
type GroupsRes struct { SuccessResponseType Result []schema.Group `json:"result"` }
GroupsRes ...
type GroupsURL ¶ added in v1.2.0
type GroupsURL struct { Pagination Kind string `json:"kind" query:"kind"` }
GroupsURL ...
type LabelBody ¶
type LabelBody struct { Name string `json:"name"` Desc string `json:"desc"` Channels *[]string `json:"channels"` Clients *[]string `json:"clients"` }
LabelBody ...
type LabelGroupInfo ¶ added in v1.3.0
type LabelGroupInfo struct { ID int64 `json:"-" db:"id"` LabelHID string `json:"labelHID"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` Release int64 `json:"release" db:"rls"` Group string `json:"group" db:"uid"` Kind string `json:"kind" db:"kind"` Desc string `json:"desc" db:"description"` Status int64 `json:"status" db:"status"` }
LabelGroupInfo ...
type LabelGroupsInfoRes ¶ added in v1.3.0
type LabelGroupsInfoRes struct { SuccessResponseType Result []LabelGroupInfo `json:"result"` }
LabelGroupsInfoRes ...
type LabelInfo ¶
type LabelInfo struct { ID int64 `json:"-"` HID string `json:"hid"` Product string `json:"product"` Name string `json:"name"` Desc string `json:"desc"` Channels []string `json:"channels"` Clients []string `json:"clients"` Status int64 `json:"status"` Release int64 `json:"release"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` OfflineAt *time.Time `json:"offlineAt"` }
LabelInfo ...
func LabelInfoFrom ¶ added in v1.1.0
LabelInfoFrom create a LabelInfo from schema.Label
type LabelInfoRes ¶ added in v1.1.0
type LabelInfoRes struct { SuccessResponseType Result LabelInfo `json:"result"` // 空数组也保留 }
LabelInfoRes ...
type LabelReleaseInfo ¶ added in v1.3.0
type LabelReleaseInfo struct { Release int64 `json:"release"` Users []string `json:"users"` Groups []string `json:"groups"` }
LabelReleaseInfo ...
type LabelReleaseInfoRes ¶ added in v1.3.0
type LabelReleaseInfoRes struct { SuccessResponseType Result LabelReleaseInfo `json:"result"` // 空数组也保留 }
LabelReleaseInfoRes ...
type LabelRuleBody ¶ added in v1.3.0
type LabelRuleBody struct {
schema.PercentRule
}
LabelRuleBody ...
type LabelRuleInfo ¶ added in v1.3.0
type LabelRuleInfo struct { ID int64 `json:"-"` HID string `json:"hid"` LabelHID string `json:"labelHID"` Kind string `json:"kind"` Rule interface{} `json:"rule"` Release int64 `json:"release"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
LabelRuleInfo ...
func LabelRuleInfoFrom ¶ added in v1.3.0
func LabelRuleInfoFrom(labelRule schema.LabelRule) LabelRuleInfo
LabelRuleInfoFrom ...
func LabelRulesInfoFrom ¶ added in v1.3.0
func LabelRulesInfoFrom(labelRules []schema.LabelRule) []LabelRuleInfo
LabelRulesInfoFrom ...
type LabelRuleInfoRes ¶ added in v1.3.0
type LabelRuleInfoRes struct { SuccessResponseType Result LabelRuleInfo `json:"result"` // 空数组也保留 }
LabelRuleInfoRes ...
type LabelRulesInfoRes ¶ added in v1.3.0
type LabelRulesInfoRes struct { SuccessResponseType Result []LabelRuleInfo `json:"result"` // 空数组也保留 }
LabelRulesInfoRes ...
type LabelUpdateBody ¶ added in v1.2.0
type LabelUpdateBody struct { Desc *string `json:"desc"` Channels *[]string `json:"channels"` Clients *[]string `json:"clients"` }
LabelUpdateBody ...
func (*LabelUpdateBody) ToMap ¶ added in v1.2.0
func (t *LabelUpdateBody) ToMap() map[string]interface{}
ToMap ...
func (*LabelUpdateBody) Validate ¶ added in v1.2.0
func (t *LabelUpdateBody) Validate() error
Validate 实现 gear.BodyTemplate。
type LabelUserInfo ¶ added in v1.3.0
type LabelUserInfo struct { ID int64 `json:"-" db:"id"` LabelHID string `json:"labelHID"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` Release int64 `json:"release" db:"rls"` User string `json:"user" db:"uid"` }
LabelUserInfo ...
type LabelUsersInfoRes ¶ added in v1.3.0
type LabelUsersInfoRes struct { SuccessResponseType Result []LabelUserInfo `json:"result"` }
LabelUsersInfoRes ...
type LabelsInfoRes ¶
type LabelsInfoRes struct { SuccessResponseType Result []LabelInfo `json:"result"` // 空数组也保留 }
LabelsInfoRes ...
type ModuleRes ¶
type ModuleRes struct { SuccessResponseType Result schema.Module `json:"result"` // 空数组也保留 }
ModuleRes ...
type ModuleUpdateBody ¶ added in v1.2.0
type ModuleUpdateBody struct {
Desc *string `json:"desc"`
}
ModuleUpdateBody ...
func (*ModuleUpdateBody) ToMap ¶ added in v1.2.0
func (t *ModuleUpdateBody) ToMap() map[string]interface{}
ToMap ...
func (*ModuleUpdateBody) Validate ¶ added in v1.2.0
func (t *ModuleUpdateBody) Validate() error
Validate 实现 gear.BodyTemplate。
type ModulesRes ¶
type ModulesRes struct { SuccessResponseType Result []schema.Module `json:"result"` // 空数组也保留 }
ModulesRes ...
type MyLabel ¶ added in v1.3.0
type MyLabel struct { ID int64 `json:"-" db:"id"` HID string `json:"hid"` Product string `json:"product" db:"product"` Name string `json:"name" db:"name"` Desc string `json:"desc" db:"description"` Release int64 `json:"release" db:"rls"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` }
MyLabel ...
type MyLabelsRes ¶ added in v1.3.0
type MyLabelsRes struct { SuccessResponseType Result []MyLabel `json:"result"` // 空数组也保留 }
MyLabelsRes ...
type MySetting ¶ added in v1.2.0
type MySetting struct { ID int64 `json:"-" db:"id"` HID string `json:"hid"` Product string `json:"product" db:"product"` Module string `json:"module" db:"module"` Name string `json:"name" db:"name"` Desc string `json:"desc" db:"description"` Value string `json:"value" db:"value"` LastValue string `json:"lastValue" db:"last_value"` Release int64 `json:"release" db:"rls"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` Channels string `json:"-" db:"channels"` Clients string `json:"-" db:"clients"` }
MySetting ...
type MySettingsQueryURL ¶ added in v1.2.0
type MySettingsQueryURL struct { Pagination Kind string `json:"kind" query:"kind"` UID string `json:"uid" param:"uid"` Product string `json:"product" query:"product"` Module string `json:"module" query:"module"` Setting string `json:"setting" query:"setting"` Channel string `json:"channel" query:"channel"` Client string `json:"client" query:"client"` }
MySettingsQueryURL ...
func (*MySettingsQueryURL) Validate ¶ added in v1.2.0
func (t *MySettingsQueryURL) Validate() error
Validate 实现 gear.BodyTemplate。
type MySettingsRes ¶ added in v1.2.0
type MySettingsRes struct { SuccessResponseType Result []MySetting `json:"result"` // 空数组也保留 }
MySettingsRes ...
type NameDescBody ¶
NameDescBody ...
func (*NameDescBody) Validate ¶
func (t *NameDescBody) Validate() error
Validate 实现 gear.BodyTemplate。
type Pagination ¶ added in v1.1.0
type Pagination struct { Search PageToken string `json:"pageToken" query:"pageToken"` PageSize int `json:"pageSize,omitempty" query:"pageSize"` Skip int `json:"skip,omitempty" query:"skip"` }
Pagination 分页
func (*Pagination) TokenToID ¶ added in v1.1.0
func (pg *Pagination) TokenToID() int64
TokenToID 把 pageToken 转换为 int64
func (*Pagination) TokenToTimestamp ¶ added in v1.4.0
func (pg *Pagination) TokenToTimestamp(defaultTime ...time.Time) int64
TokenToTimestamp 把 pageToken 转换为 timestamp (ms)
type ProductLabelGroupURL ¶ added in v1.10.0
type ProductLabelGroupURL struct { ProductLabelURL Kind string `json:"kind" query:"kind"` UID string `json:"uid" param:"uid"` }
ProductLabelGroupURL ...
func (*ProductLabelGroupURL) Validate ¶ added in v1.10.0
func (t *ProductLabelGroupURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductLabelHIDURL ¶ added in v1.3.0
type ProductLabelHIDURL struct { ProductLabelURL HID string `json:"hid" param:"hid"` }
ProductLabelHIDURL ...
func (*ProductLabelHIDURL) Validate ¶ added in v1.3.0
func (t *ProductLabelHIDURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductLabelUIDURL ¶ added in v1.4.0
type ProductLabelUIDURL struct { ProductLabelURL UID string `json:"uid" param:"uid"` }
ProductLabelUIDURL ...
func (*ProductLabelUIDURL) Validate ¶ added in v1.4.0
func (t *ProductLabelUIDURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductLabelURL ¶
type ProductLabelURL struct { ProductPaginationURL Label string `json:"label" param:"label"` }
ProductLabelURL ...
func (*ProductLabelURL) Validate ¶
func (t *ProductLabelURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductModuleSettingGroupURL ¶ added in v1.10.0
type ProductModuleSettingGroupURL struct { ProductModuleSettingURL Kind string `json:"kind" query:"kind"` UID string `json:"uid" param:"uid"` }
ProductModuleSettingGroupURL ...
func (*ProductModuleSettingGroupURL) Validate ¶ added in v1.10.0
func (t *ProductModuleSettingGroupURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductModuleSettingHIDURL ¶ added in v1.3.0
type ProductModuleSettingHIDURL struct { ProductModuleSettingURL HID string `json:"hid" param:"hid"` }
ProductModuleSettingHIDURL ...
func (*ProductModuleSettingHIDURL) Validate ¶ added in v1.3.0
func (t *ProductModuleSettingHIDURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductModuleSettingUIDURL ¶ added in v1.4.0
type ProductModuleSettingUIDURL struct { ProductModuleSettingURL UID string `json:"uid" param:"uid"` }
ProductModuleSettingUIDURL ...
func (*ProductModuleSettingUIDURL) Validate ¶ added in v1.4.0
func (t *ProductModuleSettingUIDURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductModuleSettingURL ¶
type ProductModuleSettingURL struct { ProductModuleURL Setting string `json:"setting" param:"setting"` }
ProductModuleSettingURL ...
func (*ProductModuleSettingURL) Validate ¶
func (t *ProductModuleSettingURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductModuleURL ¶
type ProductModuleURL struct { ProductPaginationURL Module string `json:"module" param:"module"` }
ProductModuleURL ...
func (*ProductModuleURL) Validate ¶
func (t *ProductModuleURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductPaginationURL ¶ added in v1.1.0
type ProductPaginationURL struct { Pagination Product string `json:"product" param:"product"` }
ProductPaginationURL ...
func (*ProductPaginationURL) Validate ¶ added in v1.1.0
func (t *ProductPaginationURL) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductRes ¶
type ProductRes struct { SuccessResponseType Result schema.Product `json:"result"` }
ProductRes ...
type ProductStatistics ¶ added in v1.3.0
type ProductStatistics struct { Labels int64 `json:"labels" db:"labels"` Modules int64 `json:"modules" db:"modules"` Settings int64 `json:"settings" db:"settings"` Release int64 `json:"release" db:"release"` Status int64 `json:"status" db:"status"` }
ProductStatistics ...
type ProductStatisticsRes ¶ added in v1.3.0
type ProductStatisticsRes struct { SuccessResponseType Result ProductStatistics `json:"result"` }
ProductStatisticsRes ...
type ProductURL ¶
type ProductURL struct {
Product string `json:"product" param:"product"`
}
ProductURL ...
type ProductUpdateBody ¶ added in v1.2.0
type ProductUpdateBody struct {
Desc *string `json:"desc"`
}
ProductUpdateBody ...
func (*ProductUpdateBody) ToMap ¶ added in v1.2.0
func (t *ProductUpdateBody) ToMap() map[string]interface{}
ToMap ...
func (*ProductUpdateBody) Validate ¶ added in v1.2.0
func (t *ProductUpdateBody) Validate() error
Validate 实现 gear.BodyTemplate。
type ProductsRes ¶
type ProductsRes struct { SuccessResponseType Result []schema.Product `json:"result"` }
ProductsRes ...
type RecallBody ¶ added in v1.3.0
type RecallBody struct {
Release int64 `json:"release"`
}
RecallBody ...
func (*RecallBody) Validate ¶ added in v1.3.0
func (t *RecallBody) Validate() error
Validate 实现 gear.BodyTemplate。
type ResponseType ¶
type ResponseType struct { ErrorResponseType SuccessResponseType }
ResponseType ...
type SettingBody ¶ added in v1.3.2
type SettingBody struct { Name string `json:"name"` Desc string `json:"desc"` Channels *[]string `json:"channels"` Clients *[]string `json:"clients"` Values *[]string `json:"values"` }
SettingBody ...
func (*SettingBody) Validate ¶ added in v1.3.2
func (t *SettingBody) Validate() error
Validate 实现 gear.BodyTemplate。
type SettingGroupInfo ¶ added in v1.3.0
type SettingGroupInfo struct { ID int64 `json:"-" db:"id"` SettingHID string `json:"settingHID"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` Release int64 `json:"release" db:"rls"` Group string `json:"group" db:"uid"` Kind string `json:"kind" db:"kind"` Desc string `json:"desc" db:"description"` Status int64 `json:"status" db:"status"` Value string `json:"value" db:"value"` LastValue string `json:"lastValue" db:"last_value"` }
SettingGroupInfo ...
type SettingGroupsInfoRes ¶ added in v1.3.0
type SettingGroupsInfoRes struct { SuccessResponseType Result []SettingGroupInfo `json:"result"` }
SettingGroupsInfoRes ...
type SettingInfo ¶ added in v1.1.0
type SettingInfo struct { ID int64 `json:"-"` HID string `json:"hid"` Product string `json:"product"` Module string `json:"module"` Name string `json:"name"` Desc string `json:"desc"` Channels []string `json:"channels"` Clients []string `json:"clients"` Values []string `json:"values"` Status int64 `json:"status"` Release int64 `json:"release"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` OfflineAt *time.Time `json:"offlineAt"` }
SettingInfo ...
func SettingInfoFrom ¶ added in v1.1.0
func SettingInfoFrom(setting schema.Setting, product, module string) SettingInfo
SettingInfoFrom create a SettingInfo from schema.Setting
func SettingsInfoFrom ¶ added in v1.2.0
func SettingsInfoFrom(settings []schema.Setting, product, module string) []SettingInfo
SettingsInfoFrom create a slice of SettingInfo from a slice of schema.Setting
type SettingInfoRes ¶ added in v1.1.0
type SettingInfoRes struct { SuccessResponseType Result SettingInfo `json:"result"` // 空数组也保留 }
SettingInfoRes ...
type SettingReleaseInfo ¶ added in v1.3.0
type SettingReleaseInfo struct { Release int64 `json:"release"` Users []string `json:"users"` Groups []string `json:"groups"` Value string `json:"value"` }
SettingReleaseInfo ...
type SettingReleaseInfoRes ¶ added in v1.3.0
type SettingReleaseInfoRes struct { SuccessResponseType Result SettingReleaseInfo `json:"result"` // 空数组也保留 }
SettingReleaseInfoRes ...
type SettingRuleBody ¶ added in v1.3.0
type SettingRuleBody struct { schema.PercentRule Value string `json:"value"` }
SettingRuleBody ...
type SettingRuleInfo ¶ added in v1.3.0
type SettingRuleInfo struct { ID int64 `json:"-"` HID string `json:"hid"` SettingHID string `json:"settingHID"` Kind string `json:"kind"` Rule interface{} `json:"rule"` Value string `json:"value"` Release int64 `json:"release"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
SettingRuleInfo ...
func SettingRuleInfoFrom ¶ added in v1.3.0
func SettingRuleInfoFrom(settingRule schema.SettingRule) SettingRuleInfo
SettingRuleInfoFrom ...
func SettingRulesInfoFrom ¶ added in v1.3.0
func SettingRulesInfoFrom(settingRules []schema.SettingRule) []SettingRuleInfo
SettingRulesInfoFrom ...
type SettingRuleInfoRes ¶ added in v1.3.0
type SettingRuleInfoRes struct { SuccessResponseType Result SettingRuleInfo `json:"result"` // 空数组也保留 }
SettingRuleInfoRes ...
type SettingRulesInfoRes ¶ added in v1.3.0
type SettingRulesInfoRes struct { SuccessResponseType Result []SettingRuleInfo `json:"result"` // 空数组也保留 }
SettingRulesInfoRes ...
type SettingUpdateBody ¶ added in v1.2.0
type SettingUpdateBody struct { Desc *string `json:"desc"` Channels *[]string `json:"channels"` Clients *[]string `json:"clients"` Values *[]string `json:"values"` }
SettingUpdateBody ...
func (*SettingUpdateBody) ToMap ¶ added in v1.2.0
func (t *SettingUpdateBody) ToMap() map[string]interface{}
ToMap ...
func (*SettingUpdateBody) Validate ¶ added in v1.2.0
func (t *SettingUpdateBody) Validate() error
Validate 实现 gear.BodyTemplate。
type SettingUserInfo ¶ added in v1.3.0
type SettingUserInfo struct { ID int64 `json:"-" db:"id"` SettingHID string `json:"settingHID"` AssignedAt time.Time `json:"assignedAt" db:"assigned_at"` Release int64 `json:"release" db:"rls"` User string `json:"user" db:"uid"` Value string `json:"value" db:"value"` LastValue string `json:"lastValue" db:"last_value"` }
SettingUserInfo ...
type SettingUsersInfoRes ¶ added in v1.3.0
type SettingUsersInfoRes struct { SuccessResponseType Result []SettingUserInfo `json:"result"` }
SettingUsersInfoRes ...
type SettingsInfoRes ¶ added in v1.1.0
type SettingsInfoRes struct { SuccessResponseType Result []SettingInfo `json:"result"` // 空数组也保留 }
SettingsInfoRes ...
type SuccessResponseType ¶ added in v1.1.0
type SuccessResponseType struct { TotalSize int `json:"totalSize,omitempty"` NextPageToken string `json:"nextPageToken"` Result interface{} `json:"result"` }
SuccessResponseType 定义了标准的 API 接口成功时返回数据模型
type UIDAndProductURL ¶ added in v1.7.1
type UIDAndProductURL struct { UID string `json:"uid" param:"uid"` Product string `json:"product" query:"product"` }
UIDAndProductURL ...
func (*UIDAndProductURL) Validate ¶ added in v1.7.1
func (t *UIDAndProductURL) Validate() error
Validate 实现 gear.BodyTemplate。
type UIDPaginationURL ¶ added in v1.1.0
type UIDPaginationURL struct { Pagination UID string `json:"uid" param:"uid"` }
UIDPaginationURL ...
func (*UIDPaginationURL) Validate ¶ added in v1.1.0
func (t *UIDPaginationURL) Validate() error
Validate 实现 gear.BodyTemplate。
type UIDProductURL ¶ added in v1.2.0
type UIDProductURL struct { Pagination UID string `json:"uid" param:"uid"` Product string `json:"product" query:"product"` }
UIDProductURL ...
func (*UIDProductURL) Validate ¶ added in v1.2.0
func (t *UIDProductURL) Validate() error
Validate 实现 gear.BodyTemplate。
type UserRes ¶ added in v1.3.0
type UserRes struct { SuccessResponseType Result schema.User `json:"result"` }
UserRes ...
type UsersGroupsBody ¶
type UsersGroupsBody struct { Users []string `json:"users"` Groups []string `json:"groups"` Value string `json:"value"` }
UsersGroupsBody ...
func (*UsersGroupsBody) Validate ¶
func (t *UsersGroupsBody) Validate() error
Validate 实现 gear.BodyTemplate。
type UsersGroupsBodyV2 ¶ added in v1.10.0
type UsersGroupsBodyV2 struct { Users []string `json:"users"` Groups []*GroupKindUID `json:"groups"` Value string `json:"value"` }
UsersGroupsBodyV2 ...
func (*UsersGroupsBodyV2) Validate ¶ added in v1.10.0
func (t *UsersGroupsBodyV2) Validate() error
Validate 实现 gear.BodyTemplate。
type UsersRes ¶ added in v1.3.0
type UsersRes struct { SuccessResponseType Result []schema.User `json:"result"` }
UsersRes ...