data

package
v0.0.0-...-71a6408 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
}

func NewApi

func NewApi() *Api

func (*Api) GetQaList

func (*Api) GetQaList() []Qa

func (*Api) GetQaReplyList

func (*Api) GetQaReplyList(qa *Qa) []QaReply

func (*Api) GetVersion

func (*Api) GetVersion() (v Version)

func (*Api) QaAdd

func (*Api) QaAdd(qa *Qa) error

func (*Api) QaReply

func (*Api) QaReply(qr *QaReply) error

QaReply 回复问题

func (*Api) Statistic

func (*Api) Statistic()

type ApiUser

type ApiUser struct {
}

func NewApiUser

func NewApiUser() *ApiUser

func (*ApiUser) Login

func (*ApiUser) Login(ua *UserApi) e.Error

func (*ApiUser) PasswordReset

func (*ApiUser) PasswordReset(ua *UserApi) e.Error

func (*ApiUser) Register

func (*ApiUser) Register(ua *UserApi) e.Error

type ChatApi

type ChatApi struct {
}

func NewChatApi

func NewChatApi() *ChatApi

func (*ChatApi) GetChatHistory

func (*ChatApi) GetChatHistory() (msg []Message)

func (*ChatApi) GetChatUsers

func (*ChatApi) GetChatUsers() (u []User)

type Data

type Data struct {
	*Redis
}

func NewData

func NewData() *Data

func (*Data) DeleteRedisContet

func (d *Data) DeleteRedisContet(drk *DataRedisContent) (err error)

func (*Data) DeleteRedisKey

func (d *Data) DeleteRedisKey(drk *DataRedisContent) (err error)

func (*Data) GetRedisCmdResult

func (d *Data) GetRedisCmdResult(addr, cmd string) (interface{}, error)

func (*Data) GetRedisCmdResult2

func (d *Data) GetRedisCmdResult2(addr, cmd string) (interface{}, error)

func (*Data) GetRedisContent

func (d *Data) GetRedisContent(drk *DataRedisContent) error

func (*Data) GetRedisKeyList

func (d *Data) GetRedisKeyList(drk *DataRedisKeyList) error

func (*Data) UpdateRedisContet

func (d *Data) UpdateRedisContet(drk *DataRedisContent) (err error)

type DataRedisContent

type DataRedisContent struct {
	Addr      string
	Key       string
	Match     string
	MatchType string
	Cursor    uint64
	Result    interface{}
	Type      string
	Ttl       string
}

type DataRedisKeyList

type DataRedisKeyList struct {
	Addr      string
	Match     string
	MatchType string
	Cursor    uint64
	Result    []string
}

type Message

type Message struct {
	User        User        `json:"User,omitempty"`
	GroupId     string      `json:"GroupId,omitempty"`
	Content     string      `json:"Content,omitempty"`
	MessageType MessageType `json:"MessageType,omitempty"`
	Time        time.Time   `json:"Time,omitempty"`
	ExtraInfo   interface{} `json:"ExtraInfo,omitempty"`
}

type MessageType

type MessageType int
const (
	MTchatText MessageType = iota
	MTauth
	MTsystem
	MTuserList
	MTchatImage
	MTchatFile
	MTheartBeat
)

type Qa

type Qa struct {
	Id       int64
	Content  string
	Email    string
	Nickname string
	Time     time.Time
}

type QaReply

type QaReply struct {
	Id       int64
	Content  string
	Email    string
	Nickname string
	Time     time.Time
	QaId     int64
	Pid      int64
}

type Redis

type Redis struct {
	*config.Config
}

func NewRedis

func NewRedis(conf *config.Config) *Redis

func (*Redis) DeleteRds

func (rds *Redis) DeleteRds(addr string)

func (*Redis) GetRds

func (rds *Redis) GetRds(addr string) *redis.Client

type User

type User struct {
	Id       string
	Email    string
	Nickname string
	Password string
	// contains filtered or unexported fields
}

type UserApi

type UserApi struct {
	Email          string `json:"Email,omitempty"`
	Password       string `json:"Password,omitempty"`
	PasswordNew    string `json:"PasswordNew,omitempty"`
	PasswordRepeat string `json:"PasswordRepeat,omitempty"`
	Nickname       string `json:"Nickname,omitempty"`
	Token          string `json:"Token,omitempty"`
}

type Version

type Version struct {
	Url     string // 下载地址
	Num     int64  // 升级序号, 10
	NumText string // 版本号, v0.0.1
	Notes   string // 更新内容
}

Jump to

Keyboard shortcuts

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