app

package
v0.0.0-...-82b865a Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database string    `yaml:"database"`
	Port     string    `yaml:"port"`
	Services []Service `yaml:"services"`
}

Configuration object.

type Env

type Env struct {
	Conf Config
}

Environment object

func NewEnv

func NewEnv(confFile string) (*Env, error)

func (*Env) ConnectDb

func (env *Env) ConnectDb() (*sqlx.DB, error)

func (*Env) SetupDb

func (env *Env) SetupDb() error
type Header struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

Headers object, stores header details.

type Service

type Service struct {
	Name        string   `yaml:"name"`
	Label       string   `yaml:"label"`
	Description string   `yaml:"description"`
	Url         string   `yaml:"url"`
	Method      string   `yaml:"method"`
	Body        string   `yaml:"body"`
	Headers     []Header `yaml:"headers"`
	Interval    int      `yaml:"interval"`
}

Service object, stores details required for monitoring a service.

Jump to

Keyboard shortcuts

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