types

package
v0.90.55 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types contains all of the structs for objects in Statping including services, hits, failures, Core, and others.

More info on: https://github.com/statping/statping

Index

Constants

View Source
const (
	TIME_NANO  = "2006-01-02T15:04:05Z"
	TIME       = "2006-01-02 15:04:05"
	CHART_TIME = "2006-01-02T15:04:05.999999-07:00"
	TIME_DAY   = "2006-01-02"
)

Variables

View Source
var (
	ErrorServiceSelection = returnErr("error selecting services")

	// create errors
	ErrorCreateService    = returnErr("error creating service")
	ErrorCreateMessage    = returnErr("error creating messages")
	ErrorCreateIncident   = returnErr("error creating incident")
	ErrorCreateUser       = returnErr("error creating user")
	ErrorCreateIncidentUp = returnErr("error creating incident update")
	ErrorCreateGroup      = returnErr("error creating group")
	ErrorCreateCheckinHit = returnErr("error creating checkin hit")
	ErrorCreateSampleHits = returnErr("error creating sample hits")
	ErrorCreateCore       = returnErr("error creating core")
	ErrorCreateHit        = returnErr("error creating hit for service %v")

	ErrorDirCreate = returnErr("error creating directory %s")

	ErrorFileCopy = returnErr("error copying file %s to %s")

	ErrorConfig     = returnErr("error with configuration")
	ErrorConnection = returnErr("error with connection")

	ErrorNotFound  = returnErrCode("item was not found", http.StatusNotFound)
	ErrorJSONParse = returnErrCode("could not parse JSON request", http.StatusBadRequest)
)
View Source
var (
	Second = time.Second
	Minute = time.Minute
	Hour   = time.Hour
	Day    = Hour * 24
	Week   = Day * 7
	Month  = Week * 4
	Year   = Day * 365
)

Functions

func FixedTime added in v0.90.11

func FixedTime(t time.Time, d time.Duration) string

Types

type Error added in v0.90.11

type Error struct {
	// contains filtered or unexported fields
}

func Err added in v0.90.11

func Err(err errorer, format interface{}) Error

func ErrWrap added in v0.90.11

func ErrWrap(err errorer, format interface{}, args ...interface{}) Error

func (Error) Error added in v0.90.11

func (e Error) Error() string

func (Error) String added in v0.90.11

func (e Error) String() string

type Errorer added in v0.90.11

type Errorer interface {
}

Jump to

Keyboard shortcuts

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