models

package
v0.0.0-...-3f4cbe2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIVE = iota + 1
	LATEST
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event int
const (
	DISCONNECT Event = iota + 1
	CONNECT
	ERROR
)

type Log

type Log struct {
	gorm.Model
	AppName  string `json:"app_name"`
	Label    string `json:"label"`
	Level    int32  `json:"level"`
	Message  string `json:"message"`
	Hostname string `json:"hostname"`
	Payload  []byte `json:"payload"`
	Line     int32  `json:"line"`
	File     string `json:"file"`
}

type Mode

type Mode int

type Watcher

type Watcher struct {
	gorm.Model `json:"-"`
	App        string `json:"app"`
	Host       string `json:"host" gorm:"unique"`
	Mode       int    `json:"mode"`
	IsActive   bool   `json:"is_active"`
}

type WatcherEvent

type WatcherEvent struct {
	gorm.Model
	Watcher   Watcher `json:"watcher"`
	WatcherID uint    `json:"-"`
	Event     Event   `json:"event"`
	Message   string  `json:"message"`
}

Jump to

Keyboard shortcuts

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