storage

package
v0.0.0-...-6cb26c7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

@auther foolbread @time 2016-01-21 @file aqua/common/storage/common.go

@auther foolbread @time 2015-12-22 @file aqua/common/storage/redis_handler.go

@auther foolbread @time 2016-02-18 @file aqua/common/storage/relation_handler.go

@auther foolbread @time 2016-02-18 @file aqua/common/storage/session_handler.go

@auther foolbread @time 2016-02-18 @file aqua/common/storage/singlechat_handler.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Md5ToByte

func Md5ToByte(s string) byte

func ParseSession

func ParseSession(s string) (token []byte, id int)

Types

type RedisHandler

type RedisHandler struct {
	// contains filtered or unexported fields
}

func NewRedisHandler

func NewRedisHandler(ser string, pwd string) (*RedisHandler, error)

func (*RedisHandler) AddSet

func (s *RedisHandler) AddSet(set, key string) error

////////////////////////////////////////////////////////////////////////

func (*RedisHandler) AppendKey

func (s *RedisHandler) AppendKey(key, value string) error

////////////////////////////////////////////////////////////////////////

func (*RedisHandler) DelHash

func (s *RedisHandler) DelHash(key string, field string) error

func (*RedisHandler) DelHashs

func (s *RedisHandler) DelHashs(key string, fields []string) error

func (*RedisHandler) DelKey

func (s *RedisHandler) DelKey(key string) error

func (*RedisHandler) DelSet

func (s *RedisHandler) DelSet(set, key string) error

func (*RedisHandler) ExistsKey

func (s *RedisHandler) ExistsKey(key string) (bool, error)

func (*RedisHandler) GetAllHash

func (s *RedisHandler) GetAllHash(key string) (map[string]string, error)

func (*RedisHandler) GetHashLen

func (s *RedisHandler) GetHashLen(key string) (int, error)

func (*RedisHandler) GetKey

func (s *RedisHandler) GetKey(key string) (string, error)

func (*RedisHandler) IncreKey

func (s *RedisHandler) IncreKey(key string) (int, error)

////////////////////////////////////////////////////////////////////////

func (*RedisHandler) SetHash

func (s *RedisHandler) SetHash(key string, field string, value string) error

////////////////////////////////////////////////////////////////////////

func (*RedisHandler) SetKey

func (s *RedisHandler) SetKey(key, value string) error

func (*RedisHandler) SismemberSet

func (s *RedisHandler) SismemberSet(set, key string) (bool, error)

type RelationHandler

type RelationHandler struct {
	// contains filtered or unexported fields
}

func NewRelationHandler

func NewRelationHandler(info string) *RelationHandler

func (*RelationHandler) AddRelationMsg

func (s *RelationHandler) AddRelationMsg(cid string, msg string, id int) error

func (*RelationHandler) AddUsrBlack

func (s *RelationHandler) AddUsrBlack(cid string, black string) error

func (*RelationHandler) AddUsrFriend

func (s *RelationHandler) AddUsrFriend(cid string, friend string) error

/////////////////////////////////////////////////////////////////////

func (*RelationHandler) DelRelationMsg

func (s *RelationHandler) DelRelationMsg(cid string, id int64) error

func (*RelationHandler) DelRelationMsgs

func (s *RelationHandler) DelRelationMsgs(cid string, ids []int64) error

func (*RelationHandler) DelUsrBlack

func (s *RelationHandler) DelUsrBlack(cid string, black string) error

func (*RelationHandler) DelUsrFriend

func (s *RelationHandler) DelUsrFriend(cid string, friend string) error

func (*RelationHandler) GetRelationMsgs

func (s *RelationHandler) GetRelationMsgs(cid string) (map[string]string, error)

func (*RelationHandler) GetRelationMsgsSize

func (s *RelationHandler) GetRelationMsgsSize(cid string) (int, error)

func (*RelationHandler) IncreRelationMsgId

func (s *RelationHandler) IncreRelationMsgId(cid string) (int, error)

/////////////////////////////////////////////////////////////////////

func (*RelationHandler) IsExistBlack

func (s *RelationHandler) IsExistBlack(cid string, black string) (bool, error)

func (*RelationHandler) IsExistFriend

func (s *RelationHandler) IsExistFriend(cid string, friend string) (bool, error)

type SessionHandler

type SessionHandler struct {
	// contains filtered or unexported fields
}

func NewSessionHandler

func NewSessionHandler(info string) *SessionHandler

func (*SessionHandler) DelUsrSession

func (s *SessionHandler) DelUsrSession(cid string) error

func (*SessionHandler) GetUsrSession

func (s *SessionHandler) GetUsrSession(cid string) (string, error)

func (*SessionHandler) IsExistSession

func (s *SessionHandler) IsExistSession(cid string) (bool, error)

func (*SessionHandler) SetUsrSession

func (s *SessionHandler) SetUsrSession(cid string, session string) error

/////////////////////////////////////////////////////////////////////

type SingleChatHandler

type SingleChatHandler struct {
	// contains filtered or unexported fields
}

func NewSingleChatHandler

func NewSingleChatHandler(info string) *SingleChatHandler

func (*SingleChatHandler) AddPeerMsg

func (s *SingleChatHandler) AddPeerMsg(cid string, msg string, id int) error

func (*SingleChatHandler) DelPeerMsg

func (s *SingleChatHandler) DelPeerMsg(cid string, id int64) error

func (*SingleChatHandler) DelPeerMsgs

func (s *SingleChatHandler) DelPeerMsgs(cid string, ids []int64) error

func (*SingleChatHandler) GetPeerMsgs

func (s *SingleChatHandler) GetPeerMsgs(cid string) (map[string]string, error)

func (*SingleChatHandler) GetPeerMsgsSize

func (s *SingleChatHandler) GetPeerMsgsSize(cid string) (int, error)

func (*SingleChatHandler) IncrePeerMsgId

func (s *SingleChatHandler) IncrePeerMsgId(cid string) (int, error)

/////////////////////////////////////////////////////////////////////

Jump to

Keyboard shortcuts

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