models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicsName = "topics"
)

Variables

This section is empty.

Functions

func CreateLog

func CreateLog(data *CreateLogData) (err error)

创建日志任务

func CreateProject

func CreateProject(data *CreateProjectData) (err error)

创建项目

func DeleteLog

func DeleteLog(data *LogDataInfo) (err error)

删除日志任务

func GetEtcdKeyData

func GetEtcdKeyData(key string, defVal interface{}) (data []byte, err error)

获取etcd中指定key的值

func InitEtcd

func InitEtcd(etcdAddr []string) (err error)

初始化etcd

func InitMySql

func InitMySql(dbInfo MysqlInfo) (err error)

初始化mysql

func NowTime

func NowTime() (now_time string)

/ 获取当前时间

func SetEtcdKeyData

func SetEtcdKeyData(key, data string) (err error)

设置数据到etcd

Types

type CreateLogData

type CreateLogData struct {
	Hosts     string `form:"hosts"`
	Topic     string `form:"topic"`
	Pname     string `form:"pname"`
	LogPath   string `form:"logPath"`
	ApplyPath string `form: "applyPath"`
}

创建日志任务form数据

type CreateProjectData

type CreateProjectData struct {
	Name      string `form:"pname"`
	Type      string `form:"type"`
	ApplyPath string `form:"applyPath"`
}

创建project form

type LogCollect

type LogCollect struct {
	Topic   string `json:"topic"`
	LogPath string `json:"logPath"`
}

日志收集任务结构体

type LogDataInfo

type LogDataInfo struct {
	Id         int    `json:"id" db:"id" form:"id"`
	Host       string `json:"host" db:"host"`
	Topic      string `json:"topic" db:"topic" form:"topic"`
	Pname      string `json:"pname" db:"pname"`
	LogPath    string `json:"logPath" db:"logPath" form:"logPath"`
	ApplyPath  string `json:"applyPath" db:"applyPath" form:"applyPath"`
	CreateTime string `json:"createTime" db:"createTime"`
}

日志收集数据结构

func GetLogData

func GetLogData() (listData []LogDataInfo, err error)

获取日志列表数据

type MysqlInfo

type MysqlInfo struct {
	Address  string
	Port     string
	User     string
	Password string
	DbName   string
}

mysql配置信息

type ProjectDataInfo

type ProjectDataInfo struct {
	Id         int    `db:"id" json:"id"`
	Name       string `db:"pname" json:"name"`
	Type       string `db:"type" json:"type"`
	CreateTime string `db:"createTime" json:"createTime"`
	ApplyPath  string `db:"applyPath" json:"applyPath"`
}

project数据信息

func GetProjectData

func GetProjectData() (listData []ProjectDataInfo, err error)

获取项目列表数据

Jump to

Keyboard shortcuts

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