Documentation ¶
Overview ¶
Package db is a generated protocol buffer package.
It is generated from these files:
token.proto
It has these top-level messages:
DB_TOKEN
Index ¶
- Variables
- func GetKeyAllocServer(nodeType uint32, account string) string
- type Account
- func (objAccount *Account) Delete() error
- func (objAccount *Account) DirtyData() (map[string]interface{}, error)
- func (objAccount *Account) Expire(v uint)
- func (objAccount *Account) GetPasswd() string
- func (objAccount *Account) HasKey() (int, error)
- func (objAccount *Account) IsLoad() bool
- func (objAccount *Account) Load() error
- func (objAccount *Account) Save() error
- func (objAccount *Account) Save2(dirtyData map[string]interface{}) error
- func (objAccount *Account) SetPasswd(value string)
- type AccountServer
- type DB_TOKEN
- func (*DB_TOKEN) Descriptor() ([]byte, []int)
- func (m *DB_TOKEN) GetAllocServers() map[uint32]*protocol.SERVER_ID
- func (m *DB_TOKEN) GetToken() string
- func (m *DB_TOKEN) Marshal() (dAtA []byte, err error)
- func (m *DB_TOKEN) MarshalTo(dAtA []byte) (int, error)
- func (*DB_TOKEN) ProtoMessage()
- func (m *DB_TOKEN) Reset()
- func (m *DB_TOKEN) Size() (n int)
- func (m *DB_TOKEN) String() string
- func (m *DB_TOKEN) Unmarshal(dAtA []byte) error
- type MgrServer
- func (objMgrServer *MgrServer) Delete() error
- func (objMgrServer *MgrServer) DirtyData() (map[string]interface{}, error)
- func (objMgrServer *MgrServer) Expire(v uint)
- func (objMgrServer *MgrServer) GetAddr() string
- func (objMgrServer *MgrServer) GetPort() int32
- func (objMgrServer *MgrServer) HasKey() (int, error)
- func (objMgrServer *MgrServer) IsLoad() bool
- func (objMgrServer *MgrServer) Load() error
- func (objMgrServer *MgrServer) Save() error
- func (objMgrServer *MgrServer) Save2(dirtyData map[string]interface{}) error
- func (objMgrServer *MgrServer) SetAddr(value string)
- func (objMgrServer *MgrServer) SetPort(value int32)
- type RedisAtomic
- type RoleName
- func (objRoleName *RoleName) Delete() error
- func (objRoleName *RoleName) DirtyData() (map[string]interface{}, error)
- func (objRoleName *RoleName) Expire(v uint)
- func (objRoleName *RoleName) GetAccount() string
- func (objRoleName *RoleName) HasKey() (int, error)
- func (objRoleName *RoleName) IsLoad() bool
- func (objRoleName *RoleName) Load() error
- func (objRoleName *RoleName) Save() error
- func (objRoleName *RoleName) Save2(dirtyData map[string]interface{}) error
- func (objRoleName *RoleName) SetAccount(value string)
- type Token
- func (objToken *Token) Delete() error
- func (objToken *Token) DirtyData() (map[string]interface{}, error)
- func (objToken *Token) Expire(v uint)
- func (objToken *Token) GetToken(mutable bool) *DB_TOKEN
- func (objToken *Token) HasKey() (int, error)
- func (objToken *Token) IsLoad() bool
- func (objToken *Token) Load() error
- func (objToken *Token) Save() error
- func (objToken *Token) Save2(dirtyData map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthToken = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowToken = fmt.Errorf("proto: integer overflow") )
Functions ¶
func GetKeyAllocServer ¶
GetKeyAllocServer : 账号对应的服务器资源的 KEY
Types ¶
type Account ¶
type Account struct { Key string // contains filtered or unexported fields }
Account : 代表 1 个 redis 对象
type AccountServer ¶
type AccountServer struct { ServerID *protocol.SERVER_ID Address string Port int32 Type config.NodeType }
AccountServer : 分配的服务资源信息(单个)
func (*AccountServer) Marshal ¶
func (accountserver *AccountServer) Marshal() (string, error)
Marshal : 序列化
func (*AccountServer) Unmarshal ¶
func (accountserver *AccountServer) Unmarshal(data string) error
Unmarshal : 反序列化
type DB_TOKEN ¶
type DB_TOKEN struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"` AllocServers map[uint32]*protocol.SERVER_ID `` /* 152-byte string literal not displayed */ }
func (*DB_TOKEN) Descriptor ¶
func (*DB_TOKEN) GetAllocServers ¶
func (*DB_TOKEN) ProtoMessage ¶
func (*DB_TOKEN) ProtoMessage()
type MgrServer ¶
type MgrServer struct { Key uint32 // contains filtered or unexported fields }
MgrServer : 代表 1 个 redis 对象
func NewMgrServer ¶
NewMgrServer : NewMgrServer 的构造函数
type RedisAtomic ¶
RedisAtomic : 自定义 Redis 原子操作
type RoleName ¶
type RoleName struct { Key string // contains filtered or unexported fields }
RoleName : 代表 1 个 redis 对象
func NewRoleName ¶
NewRoleName : NewRoleName 的构造函数
func (*RoleName) SetAccount ¶
SetAccount : 设置字段值
Click to show internal directories.
Click to hide internal directories.