Documentation ¶
Overview ¶
Package common is a generated protocol buffer package.
It is generated from these files:
common.proto
It has these top-level messages:
Empty AccessPerms Result SimpleResp
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EMPTY = &Empty{}
EMPTY is a global instance for commn.Empty
View Source
var E_ApiPrefix = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.ServiceOptions)(nil), ExtensionType: (*string)(nil), Field: 50001, Name: "common.api_prefix", Tag: "bytes,50001,opt,name=api_prefix,json=apiPrefix", Filename: "common.proto", }
View Source
var E_ApiVersion = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.ServiceOptions)(nil), ExtensionType: (*string)(nil), Field: 50002, Name: "common.api_version", Tag: "bytes,50002,opt,name=api_version,json=apiVersion", Filename: "common.proto", }
View Source
var E_FieldRequired = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 52001, Name: "common.field_required", Tag: "varint,52001,opt,name=field_required,json=fieldRequired", Filename: "common.proto", }
View Source
var E_GrantPerm = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.MethodOptions)(nil), ExtensionType: (*Perm)(nil), Field: 51002, Name: "common.grant_perm", Tag: "varint,51002,opt,name=grant_perm,json=grantPerm,enum=common.Perm", Filename: "common.proto", }
View Source
var E_GrantScope = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.MethodOptions)(nil), ExtensionType: (*string)(nil), Field: 51001, Name: "common.grant_scope", Tag: "bytes,51001,opt,name=grant_scope,json=grantScope", Filename: "common.proto", }
View Source
var OK = NewResult(int32(http.StatusOK), "")
OK represents ok result
View Source
var Perm_name = map[int32]string{
0: "NONE",
1: "READ",
2: "WRITE",
3: "BOTH",
}
View Source
var Perm_value = map[string]int32{
"NONE": 0,
"READ": 1,
"WRITE": 2,
"BOTH": 3,
}
View Source
var SimpleOK = &SimpleResp{ Res: OK, }
SimpleOK represents a ok simple respsonse
Functions ¶
This section is empty.
Types ¶
type AccessPerms ¶
type AccessPerms struct { // 账号 id AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` // client id AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId" json:"app_id,omitempty"` // 权限信息 Perms map[string]Perm `` /* 148-byte string literal not displayed */ }
func (*AccessPerms) Descriptor ¶
func (*AccessPerms) Descriptor() ([]byte, []int)
func (*AccessPerms) GetAccountId ¶
func (m *AccessPerms) GetAccountId() string
func (*AccessPerms) GetAppId ¶
func (m *AccessPerms) GetAppId() string
func (*AccessPerms) GetPerms ¶
func (m *AccessPerms) GetPerms() map[string]Perm
func (*AccessPerms) ProtoMessage ¶
func (*AccessPerms) ProtoMessage()
func (*AccessPerms) Reset ¶
func (m *AccessPerms) Reset()
func (*AccessPerms) String ¶
func (m *AccessPerms) String() string
type Empty ¶
type Empty struct { }
空结构
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type Result ¶
type Result struct { // 返回码 Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` // 返回信息 Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"` }
API 请求结果
func (*Result) Descriptor ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type SimpleResp ¶
type SimpleResp struct {
Res *Result `protobuf:"bytes,1,opt,name=res" json:"res,omitempty"`
}
仅包含 API 请求结果的简单 Response
func (*SimpleResp) Descriptor ¶
func (*SimpleResp) Descriptor() ([]byte, []int)
func (*SimpleResp) GetRes ¶
func (m *SimpleResp) GetRes() *Result
func (*SimpleResp) ProtoMessage ¶
func (*SimpleResp) ProtoMessage()
func (*SimpleResp) Reset ¶
func (m *SimpleResp) Reset()
func (*SimpleResp) String ¶
func (m *SimpleResp) String() string
Click to show internal directories.
Click to hide internal directories.