base

package
v0.0.0-...-6b04d54 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// HttpEmptyRespError : Error message for empty response
	HttpEmptyRespError = "Empty Response from Server"

	// NullRepo : Error message for empty repo
	NullRepo = "Repo Not found"

	// MissingFlowAttrs : Error message for missing flow attrs
	MissingFlowAttrs = "Missing Flow attributes"

	// NullModelRepo : Error message for NUll Model Repo
	NullModelRepo = "Flow has no model repo"

	// NullOutput : Error message when flow has no output
	NullOutput = "Flow has no output"
)

Variables

This section is empty.

Functions

func Debug

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

Debug : Log Debug messages

func ErrHttpEmptyResponse

func ErrHttpEmptyResponse() error

ErrHttpEmptyResponse : Raises Empty response

func ErrMissingFlowAttrs

func ErrMissingFlowAttrs() error

ErrMissingFlowAttrs : Raise Missing Flow Attrs Error

func ErrNullModelRepo

func ErrNullModelRepo() error

ErrNullModelRepo : Return error struct for Empty Model Repo

func ErrNullOutput

func ErrNullOutput() error

ErrNullOutput : returns error struct for empty output

func ErrNullRepo

func ErrNullRepo() error

ErrNullRepo : Raises Null Repo error

func Error

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

Error : Log Error messages

func ErrorToHTTPStatus

func ErrorToHTTPStatus(err error) (int, string)

ErrorToHTTPStatus :

func Errorf

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

Errorf : Prints Error

func FixedRandomString

func FixedRandomString(n int) string

FixedRandomString : Random fixed size char string

func GetEnv

func GetEnv(name string) string

GetEnv : Get Env var

func GetEnvVar

func GetEnvVar(name string) string

GetEnvVar : Get OS Env Var

func HomeDir

func HomeDir() (string, error)

HomeDir : Returns home directory and Error if not found

func Info

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

Info : Log Info messages

func IsErrFileNotFound

func IsErrFileNotFound(e error) bool

IsErrFileNotFound : Identifies file not found error

func IsErrHttpEmptyResponse

func IsErrHttpEmptyResponse(err error) bool

IsErrHttpEmptyResponse : Returns True if err is empty response

func IsErrMissingFlowAttrs

func IsErrMissingFlowAttrs(err error) bool

IsErrMissingFlowAttrs : Returns true when error is missing flow attrs

func IsErrNullModelRepo

func IsErrNullModelRepo(err error) bool

IsErrNullModelRepo : Return true for Empty Model Repo

func IsErrNullOutput

func IsErrNullOutput(err error) bool

IsErrNullOutput : returns true for empty output

func IsErrNullRepo

func IsErrNullRepo(err error) bool

IsErrNullRepo : Returns true for Null Repo Error

func JustHomeDir

func JustHomeDir() string

JustHomeDir : Returns user home directory. Works better on Linux

func Log

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

Log : Log messages

func Out

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

Out : Log output messages

func Println

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

Println : Print messages

func SetEnvVar

func SetEnvVar(name, value string) error

SetEnvVar : Set OS Env Vars

func Warn

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

Warn : Log warning messages

Types

type ErrFileNotFound

type ErrFileNotFound struct {
	RepoName string
	CommitId string
	Fpath    string
}

ErrFileNotFound : Custom error when file is not found

func (ErrFileNotFound) Error

func (e ErrFileNotFound) Error() string

type HTTPError

type HTTPError struct {
	Status  int
	Message string
}

HTTPError : HTTP Error struct returned by handler methods

func HTTPErrorf

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

HTTPErrorf :

func (*HTTPError) Error

func (err *HTTPError) Error() string

type IntMax

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

IntMax : Used Locking and tracking waiters

func (*IntMax) SetIfMax

func (v *IntMax) SetIfMax(value int64)

SetIfMax :

func (*IntMax) String

func (v *IntMax) String() string

type IntMeanVar

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

IntMeanVar :

func (*IntMeanVar) AddSince

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

AddSince :

func (*IntMeanVar) AddValue

func (v *IntMeanVar) AddValue(value int64)

AddValue : 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