errs

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrParseVariableName represents the error when unable to parse a
	// variable name within a substitution.
	ErrParseVariableName = New("unable to parse variable name")
	// ErrSecretRegexMatch represents the error when a regex does not match.
	ErrSecretRegexMatch = New("secret regex match failed")
	// ErrNotFound return when azure blob is not found.
	ErrNotFound = New("blob not found")
	// ErrSASToken returns when sas token is not found.
	ErrSASToken = New("azure client requires SAS Token")
	// ErrAzureCredentials is returned when the azure credentials are invalid.
	ErrAzureCredentials = New("azure client requires credentials")
	// ErrAPIStatus is returned when the api status is not 200.
	ErrAPIStatus = New("non OK status")
	// ErrInvalidLoggerInstance is returned when logger instance is not supported.
	ErrInvalidLoggerInstance = New("Invalid logger instance")
	// ErrUnsupportedGitProvider is returned when try to integrate unsupported provider repo
	ErrUnsupportedGitProvider = New("unsupported gitprovider")
	// ErrGitDiffNotFound is returned when basecommit is null or git provider returns empty diff
	ErrGitDiffNotFound = New("diff not found")
	// GenericErrRemark returns a generic error message for user facing errors.
	GenericErrRemark = New("Unexpected error")
	// ErrMarshalJSON is returned when json marshal failed
	ErrMarshalJSON = New("JSON marshal failed")
	// ErrUnMarshalJSON is returned when json unmarshal failed
	ErrUnMarshalJSON = New("JSON unmarshal failed")
	// ErrMissingAccessToken is returned when Oauth token is missing
	ErrMissingAccessToken = New("Missing OAuth access token. Please add an OAuth token")
	// ErrSubModuleNotFound will be thrown if submodule is not present in yml
	ErrSubModuleNotFound = New("Submodule not found in tas config file")
)
View Source
var CR_AUTH_NF = Err{
	Code:    "CR::AUTH:NF",
	Message: "Container registry auth are not present for private repo"}

CR_AUTH_NF should be raise when container registry auth are not present for private repo

View Source
var ERR_CTRL_CONN_MAX_ATTEMPT = Err{
	Code:    "ERR::CTRL::CONN::MAX::ATTEMPT",
	Message: "Control websocket reconnection max attempt reached"}

ERR_CTRL_CONN_MAX_ATTEMPT should be thrown when control websocket reconnection max attempt reached

View Source
var ERR_DUMMY = Err{
	Code:    "ERR::DUMMY",
	Message: "Dummy error "}

ERR_DUMMY dummy error

View Source
var ERR_FS_MAX_ATTEMPT = Err{
	Code:    "ERR::FS::MAX::ATTEMPT",
	Message: "File server restart max attempt reached"}

ERR_FS_MAX_ATTEMPT should be thrown when file server restart max attempt reached

View Source
var ERR_INF_API_MAX_ATTEMPT = Err{
	Code:    "ERR::INF::API::MAX::ATTEMPT",
	Message: "Info api server restart max attempt reached"}

ERR_INF_API_MAX_ATTEMPT should be thrown when info api server restart max attempt reached

View Source
var ERR_INVALID_ENVIRONMENT = Err{
	Code:    "ERR::INV::ENV",
	Message: "Invalid environment specified"}

ERR_INVALID_ENVIRONMENT should be thorwn when invalid environment specified"

View Source
var ERR_INV_WS_DAT_TYPE = Err{
	Code:    "ERR::INV::WS::DAT::TYPE",
	Message: "Invalid data type reader received from websocket"}

ERR_INV_WS_DAT_TYPE should be thrown when invalid data type reader received from websocket

View Source
var ERR_SNK_PRX_MAX_ATTEMPT = Err{
	Code:    "ERR::SNK::PRX::MAX::ATTEMPT",
	Message: "Sink proxy restart max attempt reached"}

ERR_SNK_PRX_MAX_ATTEMPT should be thrown when sink proxy restart max attempt reache

View Source
var ERR_SNK_RD_WRT_MSM = Err{
	Code:    "ERR::SNK::RD::WRT::MSM",
	Message: "Read write mismatch in sink proxy "}

ERR_SNK_RD_WRT_MSM should be raise when there is read write mismatch in sink proxy

Functions

func ErrInvalidPayload

func ErrInvalidPayload(errMsg string) error

ErrInvalidPayload returns an error when the nucleus payload is invalid.

func ErrSecretNotFound

func ErrSecretNotFound(secret string) error

ErrSecretNotFound represents the error when a secret is not found in map.

func New

func New(text string) error

New returns a new error message.

Types

type Err

type Err struct {
	Code    string
	Message string
	URL     string
}

Err represents structure of a custom error

func ERR_API_SRV_STR

func ERR_API_SRV_STR(err string) Err

ERR_API_SRV_STR function returns error with code ERR::API::SRV::STR

func ERR_API_WEB_HOK

func ERR_API_WEB_HOK(err string) Err

ERR_API_WEB_HOK function returns error with code ERR::API::WEB::HOK

func ERR_ATT_PRX

func ERR_ATT_PRX(reqType string, err string) Err

ERR_ATT_PRX function returns error with code "ERR::ATT::PRX"

func ERR_BIN_UPD

func ERR_BIN_UPD(err string) Err

ERR_BIN_UPD function retruns err with code "ERR::BIN::UPD"

func ERR_DAT_CONN_DWN

func ERR_DAT_CONN_DWN(err string) Err

ERR_DAT_CONN_DWN function returns err with code "ERR::DAT::CONN::DWN"

func ERR_DAT_WS_RD

func ERR_DAT_WS_RD(err string) Err

ERR_DAT_WS_RD function returns error with code ERR::DAT::WS::RD

func ERR_DIR_CRT

func ERR_DIR_CRT(err string) Err

ERR_DIR_CRT function returns error with code "ERR::DIR::CRT"

func ERR_DNS_RLV

func ERR_DNS_RLV(err string) Err

ERR_DNS_RLV function returns error with code "ERR::DNS::RLV"

func ERR_DOCKER_CRT

func ERR_DOCKER_CRT(err string) Err

ERR_DOCKER_CRT function returns error with code ERR::DOCKER::CRT

func ERR_DOCKER_RUN

func ERR_DOCKER_RUN(err string) Err

ERR_DOCKER_RUN function returns error with code ERR::DOCKER::RUN

func ERR_DOCKER_STRT

func ERR_DOCKER_STRT(err string) Err

ERR_DOCKER_STRT function returns error with code "ERR::DOCKER::STRT"

func ERR_FIL_CRT

func ERR_FIL_CRT(err string) Err

ERR_FIL_CRT function returns error with code ERR::FIL::CRT

func ERR_FIL_SRV_STR

func ERR_FIL_SRV_STR(err string) Err

ERR_FIL_SRV_STR function returns error with code "ERR::FIL::SRV::STR"

func ERR_INVALID_WS_URL

func ERR_INVALID_WS_URL(err string) Err

ERR_INVALID_WS_URL function returns err with code "ERR::INV::WS::URL"

func ERR_JSON_MAR

func ERR_JSON_MAR(err string) Err

ERR_JSON_MAR function returns error with code "ERR::JSON::MAR"

func ERR_JSON_UNMAR

func ERR_JSON_UNMAR(err string) Err

ERR_JSON_UNMAR function returns error with code "ERR::JSON::UNMAR"

func ERR_LT_CRDS

func ERR_LT_CRDS() Err

ERR_LT_CRDS functio returns error with code "ERR::LT::CRDS"

func ERR_SNK_PRX

func ERR_SNK_PRX(err string) Err

ERR_SNK_PRX function return error with code "ERR::SNK::PRX"

func ERR_SNK_PRX_CONN

func ERR_SNK_PRX_CONN(err string) Err

ERR_SNK_PRX_CONN function returns error with code "ERR::SNK::PRX::CONN"

func ERR_SNK_WRT

func ERR_SNK_WRT(err string) Err

ERR_SNK_WRT function returns error with code ERR::SNK::WRT

func ERR_VLD_CFG

func ERR_VLD_CFG(errs []string) Err

ERR_VLD_CFG function return error with code ERR::CNF::FLD::VLD

func ERR_WS_CONN

func ERR_WS_CONN(err string) Err

ERR_WS_CONN function returns err with code "ERR::WS::Conn"

func ERR_WS_CTRL_CONN

func ERR_WS_CTRL_CONN(err string) Err

ERR_WS_CTRL_CONN function returns err with code "ERR::WS::Conn"

func ERR_WS_CTRL_CONN_DWN

func ERR_WS_CTRL_CONN_DWN(err string) Err

ERR_WS_CTRL_CONN_DWN function returns err with code "ERR::WS::CTRL::CONN::DWN"

func ERR_WS_RDR

func ERR_WS_RDR(err string) Err

ERR_WS_RDR function returns error with code "ERR::WS::RDR"

func ERR_WS_WRT

func ERR_WS_WRT(err string) Err

ERR_WS_WRT function returns error with code "ERR::WS::WRT"

func ErrDirDel added in v0.3.20

func ErrDirDel(err string) Err

ErrDirDel function returns error with code "ERR::DIR::DEL"

func ErrDockerCP added in v0.7.0

func ErrDockerCP(err string) Err

ErrDockerCP function returns error with code "ERR::DOCKER::CP"

func ErrDockerVolCrt added in v0.7.0

func ErrDockerVolCrt(err string) Err

ErrDockerVolCrt function returns error with code "ERR::DOCKER::VOL::CRT"

func ErrSecretLoad added in v0.7.0

func ErrSecretLoad(err string) Err

ErrSecretLoad function returns error with code "ERR::SECRET::LOAD"

func (Err) Error

func (e Err) Error() string

type ErrInvalidConf

type ErrInvalidConf struct {
	Message string
	Fields  []string
	Values  []interface{}
}

ErrInvalidConf represents field validation failures of TAS configuration

func (ErrInvalidConf) Error

func (e ErrInvalidConf) Error() string

type Error

type Error struct {
	Message string `json:"message"`
}

Error represents a json-encoded API error.

func (*Error) Error

func (e *Error) Error() string

type StatusFailed

type StatusFailed struct {
	Remark string
}

func (*StatusFailed) Error

func (e *StatusFailed) Error() string

Jump to

Keyboard shortcuts

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