Documentation ¶
Overview ¶
使用LUA脚本返回配置参数
Index ¶
- Constants
- Variables
- func B2S(bs []int8) string
- func ByteToString(p []byte) string
- func Decrypt(ciphertext, key []byte) ([]byte, error)
- func DoGet(url string) (a []byte, e error)
- func DoLog(c string, cate string)
- func DoPost(url string, payload interface{}) (a []byte, e error)
- func DotUnitToFloat(am int64) float64
- func DotUnitToInt(am float64) int64
- func Encrypt(plantText, key []byte) ([]byte, error)
- func Error(name string, code int, message string) gin.H
- func FUNCTION() string
- func GetBytes(key interface{}) ([]byte, error)
- func GetConfig(section, key string) string
- func IsPhone(phone string) bool
- func MakeRandomStr(l int) string
- func MakeRandomStrLower(l int) string
- func Md5(text string) string
- func NewRedisPool() *redis.Pool
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(plantText []byte, blockSize int) []byte
- func Success() gin.H
- func WxError(msg string) gin.H
- func WxGetSessionKey(code string) (sessionKey, openId string)
- func WxPKCS7UnPadding(plantText []byte) []byte
- type EosInstance
- func (e *EosInstance) CreateAccount(accountName string) (string, string, error)
- func (e *EosInstance) CreateTask(owner, approver, contributor, desc string, bounty int64) (string, error)
- func (e *EosInstance) CreateWallet(walletName string) (string, error)
- func (e *EosInstance) GetAccountTransaction(id string) (eos.Action, error)
- func (e *EosInstance) GetAccountTransactionsRaw(accountName string, startNum, count int) (interface{}, error)
- func (e *EosInstance) IssueDot(to, memo string, quantity float64) (string, error)
- func (e *EosInstance) TransferDot(from, to, memo, walletName string, quantity float64) (string, error)
- func (e *EosInstance) WalletImport(privKey string) error
- func (e *EosInstance) WalletLock(name string) error
- func (e *EosInstance) WalletUnlock(name, secret string) error
- type Logger
- type NewTask
- type RedisClient
- func (r *RedisClient) Close()
- func (r *RedisClient) DEL(key string) error
- func (r *RedisClient) EXPIRE(key string, expireSeconds int) error
- func (r *RedisClient) GET(key string) string
- func (r *RedisClient) HDEL(key, field string) error
- func (r *RedisClient) HEXISTS(key, field string) (bool, error)
- func (r *RedisClient) HGET(key, field string) (string, error)
- func (r *RedisClient) HGETALL(key string) (map[string]string, error)
- func (r *RedisClient) HLEN(key string) (int, error)
- func (r *RedisClient) HSCAN(key string, cursor interface{}, optionArgs ...interface{}) (uint64, map[string]string, error)
- func (r *RedisClient) HSET(key, field, val string) error
- func (r *RedisClient) INCR(key string) (int64, error)
- func (r *RedisClient) SET(key string, val interface{}) error
- func (r *RedisClient) SETEX(key string, expireSeconds int, val interface{}) error
- func (r *RedisClient) WithPrefix(p string) *RedisClient
- func (r *RedisClient) ZADD(key string, score, member interface{}, optionArgs ...interface{}) error
- func (r *RedisClient) ZINCRBY(key string, increment, member interface{}) error
- type WxBizDataCrypt
- type WxSessionData
Constants ¶
View Source
const ( WALLET_NAME = "daoone" CREATOR = "daoone" BOUNTY_CONTRACT = "bounty" DOT_CONTRACT = "daoone.token" //TOKEN_SYM = "DOT" //DOT_CONTRACT = "eosio.token" TOKEN_SYM = "DOT" )
Variables ¶
View Source
var (
KeyPrefix = ""
)
Functions ¶
func ByteToString ¶
func DotUnitToFloat ¶
func DotUnitToInt ¶
func MakeRandomStr ¶
func MakeRandomStrLower ¶
func NewRedisPool ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func WxGetSessionKey ¶
func WxPKCS7UnPadding ¶
WxPKCS7UnPadding return unpadding []Byte plantText
Types ¶
type EosInstance ¶
func GetEos ¶
func GetEos() *EosInstance
func (*EosInstance) CreateAccount ¶
func (e *EosInstance) CreateAccount(accountName string) (string, string, error)
创建用户
func (*EosInstance) CreateTask ¶
func (e *EosInstance) CreateTask(owner, approver, contributor, desc string, bounty int64) (string, error)
调用合约生成bounty
func (*EosInstance) CreateWallet ¶
func (e *EosInstance) CreateWallet(walletName string) (string, error)
创建唯一的钱包 每个用户只能创建一个钱包,钱包名字关联用户表 不存储钱包密钥,创建钱包无法从外部调用
func (*EosInstance) GetAccountTransaction ¶
func (e *EosInstance) GetAccountTransaction(id string) (eos.Action, error)
func (*EosInstance) GetAccountTransactionsRaw ¶
func (e *EosInstance) GetAccountTransactionsRaw(accountName string, startNum, count int) (interface{}, error)
func (*EosInstance) IssueDot ¶
func (e *EosInstance) IssueDot(to, memo string, quantity float64) (string, error)
func (*EosInstance) TransferDot ¶
func (e *EosInstance) TransferDot(from, to, memo, walletName string, quantity float64) (string, error)
func (*EosInstance) WalletImport ¶
func (e *EosInstance) WalletImport(privKey string) error
func (*EosInstance) WalletLock ¶
func (e *EosInstance) WalletLock(name string) error
func (*EosInstance) WalletUnlock ¶
func (e *EosInstance) WalletUnlock(name, secret string) error
type NewTask ¶
type NewTask struct { Owner eos.AccountName `json:"owner"` Approver eos.AccountName `json:"approver"` Contributor eos.AccountName `json:"contributor"` Desc string `json:"desc"` Bounty int64 `json:"bounty"` }
type RedisClient ¶
type RedisClient struct { Conn redis.Conn HasPrefix bool // contains filtered or unexported fields }
func init() { po = NewRedisPool() }
func GetRedis ¶
func GetRedis() *RedisClient
func (*RedisClient) Close ¶
func (r *RedisClient) Close()
func (*RedisClient) DEL ¶
func (r *RedisClient) DEL(key string) error
func (*RedisClient) GET ¶
func (r *RedisClient) GET(key string) string
func (*RedisClient) HDEL ¶
func (r *RedisClient) HDEL(key, field string) error
func (*RedisClient) HSET ¶
func (r *RedisClient) HSET(key, field, val string) error
func (*RedisClient) SET ¶
func (r *RedisClient) SET(key string, val interface{}) error
func (*RedisClient) SETEX ¶
func (r *RedisClient) SETEX(key string, expireSeconds int, val interface{}) error
func (*RedisClient) WithPrefix ¶
func (r *RedisClient) WithPrefix(p string) *RedisClient
func (*RedisClient) ZADD ¶
func (r *RedisClient) ZADD(key string, score, member interface{}, optionArgs ...interface{}) error
func (*RedisClient) ZINCRBY ¶
func (r *RedisClient) ZINCRBY(key string, increment, member interface{}) error
type WxBizDataCrypt ¶
WxBizDataCrypt represents an active WxBizDataCrypt object
type WxSessionData ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.