quick-know: github.com/Alienero/quick-know/store/define Index | Files

package define

import "github.com/Alienero/quick-know/store/define"

Index

Package Files

config.go define.go

Constants

const (
    // Client requst type
    OFFLINE = 41
    ONLINE  = 42
)

Variables

var Config = new(DBConfig)

func Get_uuid Uses

func Get_uuid() string

func SetKey Uses

func SetKey(addr string)

type Ctrl Uses

type Ctrl struct {
    Id   string
    Auth string
}

type DBConfig Uses

type DBConfig struct {
    DBType string

    UserAddr string // DB addr.
    UserName string // DB name.
    Clients  string
    Ctrls    string
    Salt     string // Sha512's salt.

    MsgAddr     string // DB addr.
    MsgName     string // DB name.
    OfflineName string // Collection name.
    SubName     string // Collection name.
    SubsName    string // Collection name.
    SubMsgName  string // Collection name.

    OfflineMsgs int // The max of the offline msgs.
}

type Msg Uses

type Msg struct {
    Id     string
    Msg_id int    // Msg ID
    Owner  string // Owner
    To_id  string
    Topic  string
    Body   []byte
    Typ    int // Online or Oflline msg

    Dup byte // mqtt dup

    Expired int64

    // sub msgs.
    IsSub bool
}

type Sub Uses

type Sub struct {
    Id  string
    Own string

    Max int // Max of the group members
    Typ int
}

type SubMsgs Uses

type SubMsgs struct {
    Id    string
    Count int64
    Body  []byte
}

type Sub_map Uses

type Sub_map struct {
    Sub_id  string
    User_id string
}

type User Uses

type User struct {
    Id    string
    Psw   string
    Owner string // Owner
}

Package define imports 7 packages (graph) and is imported by 5 packages. Updated 2016-07-30. Refresh now. Tools for package owners.