db

package
v0.0.0-...-b77c001 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUID_TYPE_ACCOUNT = "account"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Key string
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(dbName string, key string) *Account

func (*Account) Delete

func (this *Account) Delete() error

func (*Account) Expire

func (this *Account) Expire(v uint)

func (*Account) GetPswd

func (this *Account) GetPswd() string

func (*Account) GetUid

func (this *Account) GetUid() uint64

func (*Account) HasKey

func (this *Account) HasKey() (int, error)

若访问数据库失败返回-1;若 key 存在返回 1 ,否则返回 0 。

func (*Account) IsLoad

func (this *Account) IsLoad() bool

func (*Account) Load

func (this *Account) Load() error

func (*Account) Save

func (this *Account) Save() error

func (*Account) SetPswd

func (this *Account) SetPswd(value string)

func (*Account) SetUid

func (this *Account) SetUid(value uint64)

type SUID

type SUID struct {
	Cli go_redis_orm.IClient
}

Server Unique Identifier

func (*SUID) New

func (this *SUID) New(typ string) (uint64, error)

type Token

type Token struct {
	Key string
	// contains filtered or unexported fields
}

func NewToken

func NewToken(dbName string, key string) *Token

func (*Token) Delete

func (this *Token) Delete() error

func (*Token) Expire

func (this *Token) Expire(v uint)

func (*Token) GetToken

func (this *Token) GetToken() string

func (*Token) GetUid

func (this *Token) GetUid() uint64

func (*Token) HasKey

func (this *Token) HasKey() (int, error)

若访问数据库失败返回-1;若 key 存在返回 1 ,否则返回 0 。

func (*Token) IsLoad

func (this *Token) IsLoad() bool

func (*Token) Load

func (this *Token) Load() error

func (*Token) Save

func (this *Token) Save() error

func (*Token) SetToken

func (this *Token) SetToken(value string)

func (*Token) SetUid

func (this *Token) SetUid(value uint64)

type UIDServer

type UIDServer struct {
	Key uint64
	// contains filtered or unexported fields
}

func NewUIDServer

func NewUIDServer(dbName string, key uint64) *UIDServer

func (*UIDServer) Delete

func (this *UIDServer) Delete() error

func (*UIDServer) Expire

func (this *UIDServer) Expire(v uint)

func (*UIDServer) GetGateway

func (this *UIDServer) GetGateway() uint32

func (*UIDServer) HasKey

func (this *UIDServer) HasKey() (int, error)

若访问数据库失败返回-1;若 key 存在返回 1 ,否则返回 0 。

func (*UIDServer) IsLoad

func (this *UIDServer) IsLoad() bool

func (*UIDServer) Load

func (this *UIDServer) Load() error

func (*UIDServer) Save

func (this *UIDServer) Save() error

func (*UIDServer) SetGateway

func (this *UIDServer) SetGateway(value uint32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL