statping: github.com/hunterlong/statping/types Index | Files

package types

import "github.com/hunterlong/statping/types"

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

Package Files

doc.go errors.go oauth.go time.go

Constants

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

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)
)
var (
    Second = time.Second
    Minute = time.Minute
    Hour   = time.Hour
    Day    = Hour * 24
    Week   = Day * 7
    Month  = Week * 4
    Year   = Day * 365
)

func FixedTime Uses

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

type Error Uses

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

func Err Uses

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

func ErrWrap Uses

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

func (Error) Error Uses

func (e Error) Error() string

func (Error) String Uses

func (e Error) String() string

type Errorer Uses

type Errorer interface {
}

Package types imports 3 packages (graph) and is imported by 12 packages. Updated 2020-03-28. Refresh now. Tools for package owners.