models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name      string `json:"Name"`
	Type      string `json:"Type"`
	Command   string `json:"Command"`
	Success   string `json:"Success"`
	Failure   string `json:"Failure"`
	RunOnFail bool   `json:"RunOnFail"`
	Service   string `json:"Service"`
}

Action Struct

type Config

type Config struct {
	BotName    string
	StartTime  int64
	Debug      bool
	ConfigFile string
	Validate   bool
	Version    string
	LogFile    string
	Workspace  string
	Services   []Service
	Pipelines  []Pipeline
}

Config Represents the values for configuring a hex server

type Input

type Input struct {
	Type   string `json:"Type"`
	Name   string `json:"Name"`
	Target string `json:"Target"`
	Match  string `json:"Match"`
	ACL    string `json:"ACL,omitempty"`
	Help   string `json:"Help"`
	Hide   bool
}

Input Struct

type Message

type Message struct {
	Inputs   map[string]string
	Success  bool
	Response []string
	Outputs  []Output
}

Message struct

func MakeMessage

func MakeMessage(Type string, Name string, Target string, User string, Input string) (message Message)

MakeMessage function

type Output

type Output struct {
	Name    string `json:"Name"`
	Targets string `json:"Targets"`
}

Output Struct

type Pipeline

type Pipeline struct {
	Name    string `json:"Name"`
	Active  bool   `json:"Active"`
	Alert   bool   `json:"Alert"`
	Remind  int64  `json:"Remind"`
	Inputs  []Input
	Actions []Action
	Outputs []Output
}

Pipeline Struct

type Response

type Response struct {
	Title  string
	Detail string
	Link   string
	Status string
}

type Service

type Service struct {
	BotName string
	Type    string
	Name    string
	Active  bool
	Config  map[string]string
}

Service Struct

type State

type State struct {
	LastRun     int64
	LastChange  int64
	LastAlert   int64
	RunStart    int64
	RunCount    int64
	LastRunTime int64
	AvgRunTime  int64
	Success     bool
	Running     bool
	Alert       bool
}

State Struct

Jump to

Keyboard shortcuts

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