Documentation
¶
Index ¶
- Constants
- func IsDuplicateKeyError(err error) bool
- func IsNotFound(err error) bool
- func TR[T any](ctx context.Context, fn func(ctx context.Context, ss *bh.Store) (T, error)) (r T, err error)
- func TX(ctx context.Context, ...) (err error)
- func TXR[T any](ctx context.Context, ...) (r T, err error)
- type EdgeEnt
- type KVEnt
- type Oauth2ClientEnt
- type Oauth2TokenEnt
- type SequenceEnt
Constants ¶
View Source
const Name = "metabase"
Variables ¶
This section is empty.
Functions ¶
func IsDuplicateKeyError ¶
func IsNotFound ¶
Types ¶
type EdgeEnt ¶
type EdgeEnt struct {
// 节点编号
NodeID string `json:"node_id"`
// 机构编号
InstID string `json:"inst_id" badgerholdIndex:"InstId"`
// 机构名称
InstName string `json:"inst_name" badgerholdIndex:"InstName"`
// 节点地址
Address string `json:"address"`
// 节点说明
Describe string `json:"describe"`
// 节点证书
Certificate string `json:"certificate"`
// 状态
Status int32 `json:"status"`
// 乐观锁版本
Version int32 `json:"version"`
// 授权码
AuthCode string `json:"auth_code"`
// 补充信息
Extra string `json:"extra"`
// 过期时间
ExpireAt time.Time `json:"expire_at"`
// 创建时间
CreateAt time.Time `json:"create_at"`
// 更新时间
UpdateAt time.Time `json:"update_at"`
// 创建人
CreateBy string `json:"create_by"`
// 更新人
UpdateBy string `json:"update_by"`
// 联盟中心节点机构id-多个用逗号分割
Group string `json:"group"`
StaticIP string `json:"static_ip"`
PublicIP string `json:"public_ip"`
Requests int `json:"requests"`
}
type Oauth2ClientEnt ¶
type Oauth2TokenEnt ¶
type Oauth2TokenEnt struct {
// 授权码
Code string `json:"code"`
// 准入TOKEN
Access string `json:"access" badgerholdIndex:"Access"`
// 刷新TOKEN
Refresh string `json:"refresh" badgerholdIndex:"Refresh"`
// 补充数据
Data string `json:"data"`
// 创建时间
CreateAt time.Time `json:"create_at"`
// 过期时间
ExpireAt time.Time `json:"expire_at" badgerholdIndex:"ExpireAt"`
}
type SequenceEnt ¶
type SequenceEnt struct {
// 序列号类型
Kind string `json:"kind"`
// 当前范围最小值
Min int64 `json:"min"`
// 当前范围最大值
Max int64 `json:"max"`
// 每次取号段大小
Size int32 `json:"size"`
// 序列号长度不足补零
Length int32 `json:"length"`
// 状态
Status int32 `json:"status"`
// 乐观锁版本
Version int32 `json:"version"`
// 创建时间
CreateAt time.Time `json:"create_at"`
// 更新时间
UpdateAt time.Time `json:"update_at"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.