Documentation ¶
Index ¶
- Constants
- Variables
- func New(text string) *err
- func Storage() storage
- type Err
- type Http
- func (Http) BadGateway(w http.ResponseWriter)
- func (Http) BadParameter(w http.ResponseWriter, args ...string)
- func (Http) BadRequest(w http.ResponseWriter, msg ...string)
- func (Http) Forbidden(w http.ResponseWriter, msg ...string)
- func (Http) InternalServerError(w http.ResponseWriter, msg ...string)
- func (Http) InvalidJSON(w http.ResponseWriter, msg ...string)
- func (Http) InvalidXML(w http.ResponseWriter, msg ...string)
- func (Http) NotAllowed(w http.ResponseWriter, msg ...string)
- func (Http) NotFound(w http.ResponseWriter, args ...string)
- func (Http) NotImplemented(w http.ResponseWriter, msg ...string)
- func (Http) PaymentRequired(w http.ResponseWriter, msg ...string)
- func (Http) Unauthorized(w http.ResponseWriter, msg ...string)
- type ServiceError
- type VolumeError
Constants ¶
View Source
const ( StatusBadParameter = "Bad Parameter" StatusBadRequest = "Bad Request" StatusUnknown = "Unknown" StatusIncorrectXml = "Incorrect Xml" StatusIncorrectJson = "Incorrect Json" StatusNotUnique = "Not Unique" StatusForbidden = "Forbidden" StatusNotAllowed = "Not Allowed" ArgumentIsEmpty = "ArgumentIsEmpty" )
View Source
const ( ErrEntityExists = "entity exists" ErrOperationFailure = "operation failure" ErrEntityNotFound = "entity not found" ErrStructArgIsNil = "input structure is nil" ErrStructOutIsNil = "output structure is nil" ErrStructArgIsInvalid = "input structure is invalid" ErrStructOutIsInvalid = "output structure is invalid" ErrStructOutIsNotPointer = "output structure is not pointer" )
View Source
const ( VolumeIsNotReady = "volume is not ready" VolumeIsNotProvisioned = "volume is not provisioned" VolumeNotFound = "volume not found" VolumesProvisionedOnDifferentNodes = "volumes are binded to different nodes" )
View Source
const IngressNotFound = "IngressNotFound"
View Source
const NodeNotFound = "NodeNotFound"
View Source
const PodNotFound = "PodNotFound"
View Source
const ResourcesCpuLimitExceeded = "resources cpu limit exceeded"
View Source
const ResourcesCpuLimitIsRequired = "resources cpu limit is required"
View Source
const ResourcesRamLimitExceeded = "resources ram limit exceeded"
View Source
const ResourcesRamLimitIsRequired = "resources ram limit is required"
View Source
const (
ServiceIsBindedToRoute = "service is binded to route"
)
Variables ¶
View Source
var ( NotLoggedMessage = errors.New("You are currently not logged in to the system, to get proper access create a new user or login with an existing user.") LoginErrorMessage = errors.New("Incorrect login or password") LogoutErrorMessage = errors.New("Some problems with logout") UnknownMessage = errors.New("Oops, error occurred: Please provide bug to github: https://github.com/lastbackend/registry/issues") )
Functions ¶
Types ¶
type Err ¶
func BadParameter ¶
func IncorrectJSON ¶
func IncorrectXML ¶
func NotAllowed ¶
func (*Err) Http ¶
func (e *Err) Http(w http.ResponseWriter)
func (*Err) SetMessage ¶
type Http ¶
type Http struct { Code int `json:"code"` Status string `json:"status"` Message string `json:"message"` }
var HTTP Http
func (Http) BadGateway ¶
func (Http) BadGateway(w http.ResponseWriter)
func (Http) BadParameter ¶
func (Http) BadParameter(w http.ResponseWriter, args ...string)
func (Http) BadRequest ¶
func (Http) BadRequest(w http.ResponseWriter, msg ...string)
func (Http) InternalServerError ¶
func (Http) InternalServerError(w http.ResponseWriter, msg ...string)
func (Http) InvalidJSON ¶
func (Http) InvalidJSON(w http.ResponseWriter, msg ...string)
func (Http) InvalidXML ¶
func (Http) InvalidXML(w http.ResponseWriter, msg ...string)
func (Http) NotAllowed ¶
func (Http) NotAllowed(w http.ResponseWriter, msg ...string)
func (Http) NotImplemented ¶
func (Http) NotImplemented(w http.ResponseWriter, msg ...string)
func (Http) PaymentRequired ¶
func (Http) PaymentRequired(w http.ResponseWriter, msg ...string)
func (Http) Unauthorized ¶
func (Http) Unauthorized(w http.ResponseWriter, msg ...string)
type ServiceError ¶
type ServiceError struct { }
func (*ServiceError) RouteBinded ¶
func (ve *ServiceError) RouteBinded(route string) error
type VolumeError ¶
type VolumeError struct { }
func (*VolumeError) DifferentNodes ¶
func (ve *VolumeError) DifferentNodes() error
func (*VolumeError) NotFound ¶
func (ve *VolumeError) NotFound(vol string) error
func (*VolumeError) NotProvisioned ¶
func (ve *VolumeError) NotProvisioned(vol string) error
func (*VolumeError) NotReady ¶
func (ve *VolumeError) NotReady(vol string) error
Click to show internal directories.
Click to hide internal directories.