mysql

package
v0.0.0-...-ee5d6ac Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(user, pass, dbname, host string, port int) (err error)

Types

type MessageReceive

type MessageReceive struct {
	ID        int64
	FromID    uint32
	ToID      uint32
	MessageID int64
	Flag      int
}

func (*MessageReceive) Insert

func (mr *MessageReceive) Insert() error

func (*MessageReceive) SetRead

func (mr *MessageReceive) SetRead() error

func (*MessageReceive) TableName

func (mr *MessageReceive) TableName() string

type MessageSend

type MessageSend struct {
	ID       int64
	FromID   uint32
	ToID     uint32
	Seq      uint32
	Content  []byte
	SendTime time.Time
	SendType int
}

func (*MessageSend) Insert

func (ms *MessageSend) Insert() error

func (*MessageSend) TableName

func (ms *MessageSend) TableName() string

TableName 如果考虑分表, 使用 from 字段

type User

type User struct {
	ID       int64
	Nickname string
	Password string
}

func (*User) Create

func (u *User) Create() error

func (*User) Get

func (u *User) Get() (bool, error)

func (*User) TableName

func (u *User) TableName() string

Jump to

Keyboard shortcuts

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