odinlib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV_CONFIG bool
View Source
var TEST = false

Functions

func FindAndInsert

func FindAndInsert(varType string, desc string, value string, id string, timestamp string) bool

func Log

func Log(varType string, desc string, value string, id string, timestamp string) bool

func ParseYaml

func ParseYaml(cfg *JobConfig, file *os.File) bool

func ReadFile

func ReadFile(filename string) *os.File

func SetupClient

func SetupClient() (*mongo.Client, error)

Types

type JobConfig

type JobConfig struct {
	Provider struct {
		Name    string `yaml:"name"`
		Version string `yaml:"version"`
	} `yaml:"provider"`
	Job struct {
		Name        string `yaml:"name"`
		ID          string `yaml:"id"`
		Description string `yaml:"description"`
		Language    string `yaml:"language"`
		File        string `yaml:"file"`
		Schedule    string `yaml:"schedule"`
	} `yaml:"job"`
}

type Odin

type Odin struct {
	ID        string
	Timestamp string
}

func Setup

func Setup(config string) (*Odin, string)

func (Odin) Condition

func (odin Odin) Condition(description string, expression string) bool

func (Odin) Result

func (odin Odin) Result(description string, expression string) bool

func (Odin) Watch

func (odin Odin) Watch(description string, expression string) bool

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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