models

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUserInfo

func DeleteUserInfo(id int64) (err error)

删除

func GetBrokers

func GetBrokers() (dataList []interface{}, err error)

获取broker列表

func GetTopics

func GetTopics() (dataList []interface{}, err error)

GetTopics: 获取topic列表

func QueryAllUserInfo

func QueryAllUserInfo() (dataList []interface{}, err error)

查询数据

func SaveUserInfoById

func SaveUserInfoById(m *UserInfo) (err error)

创建&更新

Types

type KafkaBroker

type KafkaBroker struct {
	Id         int32  // id
	Addr       string // 地址
	Controller bool   // 是否controller
}

type KafkaTopic

type KafkaTopic struct {
	Topic          string
	PartitionSize  int32
	AvailableCount int64
}

type MessageBlock

type MessageBlock struct {
	PartitionId int32
	Txt         string
	Offset      int64
}

type TopicMessages

type TopicMessages struct {
	Topic   string
	Message []MessageBlock
}

func GetTopicMessages

func GetTopicMessages(topic string) (topicMessage TopicMessages, err error)

获取Topic消息

type UserInfo

type UserInfo struct {
	Id         int64     `orm:"auto"`
	UserName   string    `orm:"size(255)"` //登录名
	Password   string    `orm:"size(255)"` //密码
	Name       string    `orm:"size(255)"` //用户名
	BirthDate  string    `orm:"size(255)"` //生日
	Gender     int8      //性别
	Email      string    `orm:"size(255)"` //Email
	Phone      string    `orm:"size(255)"` //电话
	Status     int8      //状态
	CreateTime time.Time //创建时间
	UpdateTime time.Time //更新时间
}

func GetUserInfoById

func GetUserInfoById(id int64) (v *UserInfo, err error)

按id查询

Jump to

Keyboard shortcuts

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