base

package
v0.0.0-...-5d4f8f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpEmptyRespError = "Empty Response from Server"
	NullRepo           = "Repo Not found"
	MissingFlowAttrs   = "Missing Flow attributes"
	NullModelRepo      = "Flow has no model repo"
	NullOutput         = "Flow has no output"
)

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...interface{})

func ErrHttpEmptyResponse

func ErrHttpEmptyResponse() error

func ErrMissingFlowAttrs

func ErrMissingFlowAttrs() error

func ErrNullModelRepo

func ErrNullModelRepo() error

func ErrNullOutput

func ErrNullOutput() error

func ErrNullRepo

func ErrNullRepo() error

func Error

func Error(format string, args ...interface{})

func ErrorToHTTPStatus

func ErrorToHTTPStatus(err error) (int, string)

func Errorf

func Errorf(format string, args ...interface{})

func GetEnv

func GetEnv(name string) string

func GetEnvVar

func GetEnvVar(name string) string

func HomeDir

func HomeDir() (string, error)

func Info

func Info(format string, args ...interface{})

func IsErrFileNotFound

func IsErrFileNotFound(e error) bool

func IsErrHttpEmptyResponse

func IsErrHttpEmptyResponse(err error) bool

func IsErrMissingFlowAttrs

func IsErrMissingFlowAttrs(err error) bool

func IsErrNullModelRepo

func IsErrNullModelRepo(err error) bool

func IsErrNullOutput

func IsErrNullOutput(err error) bool

func IsErrNullRepo

func IsErrNullRepo(err error) bool

func JustHomeDir

func JustHomeDir() string

func Log

func Log(format string, args ...interface{})

func Out

func Out(format string, args ...interface{})

func Println

func Println(format string, args ...interface{})

func SetEnvVar

func SetEnvVar(name, value string) error

func Warn

func Warn(format string, args ...interface{})

Types

type ErrFileNotFound

type ErrFileNotFound struct {
	RepoName string
	CommitId string
	Fpath    string
}

Custom error when file is not found

func (ErrFileNotFound) Error

func (e ErrFileNotFound) Error() string

type HTTPError

type HTTPError struct {
	Status  int
	Message string
}

func HTTPErrorf

func HTTPErrorf(status int, format string, args ...interface{}) *HTTPError

func (*HTTPError) Error

func (err *HTTPError) Error() string

type IntMax

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

func (*IntMax) SetIfMax

func (v *IntMax) SetIfMax(value int64)

func (*IntMax) String

func (v *IntMax) String() string

type IntMeanVar

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

func (*IntMeanVar) AddSince

func (v *IntMeanVar) AddSince(start time.Time)

func (*IntMeanVar) AddValue

func (v *IntMeanVar) AddValue(value int64)

Adds value. Calculates new mean as iterative mean (avoids int overflow)

func (*IntMeanVar) String

func (v *IntMeanVar) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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