Documentation ¶
Index ¶
- func AesEncrypt(origData []byte, keyString string) ([]byte, error)
- func HashPassword(pwd string) (string, error)
- func MD5(text string) string
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func RandString(lenght int64) string
- func VerifyPassword(pwd string, hash string) bool
- type CircularQueue
- type LinkQueue
- type Redis
- func (r *Redis) Delete(key string) (int64, error)
- func (r *Redis) Exists(key string) (bool, error)
- func (r *Redis) Expire(key string, ex int64) (int64, error)
- func (r *Redis) Get(key string) ([]byte, error)
- func (r *Redis) Keys(key string) ([]string, error)
- func (r *Redis) Set(key string, content interface{}, ex ...int64) (string, error)
- type RedisConfig
- type SinglyList
- func (list *SinglyList) Append(item interface{}) error
- func (list *SinglyList) Clear()
- func (list *SinglyList) Get(index int) (item interface{}, err error)
- func (list *SinglyList) InsertAt(index int, item interface{}) error
- func (list *SinglyList) Lenght() int
- func (list *SinglyList) Remove(index int) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesEncrypt ¶
AesEncrypt 加密 CBC 128位
Types ¶
type CircularQueue ¶
CircularQueue 循环队列
func InitCircularQueue ¶
func InitCircularQueue(lenght int) (queue *CircularQueue, err error)
InitCircularQueue 初始化队列
func (*CircularQueue) Dequeue ¶
func (q *CircularQueue) Dequeue() (item interface{}, err error)
Dequeue 出队
type RedisConfig ¶
type RedisConfig struct { Address string Password string Db string MaxIdle int // 最大空闲连接数 MaxActive int // 最大连接数 IdleTimeout time.Duration // 空闲连接超时时间 Wait bool // 如果超过最大连接,是否等待,不等待则报错 }
RedisConfig Redis配置信息
type SinglyList ¶
SinglyList 单向链表
func (*SinglyList) Get ¶
func (list *SinglyList) Get(index int) (item interface{}, err error)
Get 查找元素
func (*SinglyList) InsertAt ¶
func (list *SinglyList) InsertAt(index int, item interface{}) error
InsertAt 插入数据
func (*SinglyList) Remove ¶
func (list *SinglyList) Remove(index int) (interface{}, error)
Remove 移除元素
Click to show internal directories.
Click to hide internal directories.