Documentation ¶
Index ¶
- Constants
- Variables
- func WithInternalServerError(msg string) error
- func WithInternalServerErrorf(format string, args ...interface{}) error
- func WithNotFoundError(msg string) error
- func WithNotFoundErrorf(format string, args ...interface{}) error
- func WithUnimplementedError(msg string) error
- func WithUnimplementedErrorf(format string, args ...interface{}) error
- type InternalServerError
- type NotFoundError
- type UnimplementedError
Constants ¶
View Source
const ( // Metric Enum MetricLatency = "http-latency" MetricAvailability = "http-availability" // Datasource Enum LoggingDatasource = "logging" MonitoringDatasource = "monitoring" // Alert Enum AlertingBurnRate = "burnrate" AlertingBudget = "budget" AlertingTarget = "target" GTThresholdType = ">" LTThresholdType = "<" // Notification Enum NotifSlack = "slack" NotifMail = "email" NotifPager = "pager" NotifHook = "webhook" OsloVersion = "openslo/v1" )
Variables ¶
View Source
var ( ErrMissingServices = validation.Error("Service definitions are required to create an SLO") ErrInvalidMonitorWindow = validation.Error("Invalid `monitorWindow` in the body of the request") ErrInvalidTarget = validation.Error("Invalid `target` in the body of the request") ErrInvalidBudgetingInterval = validation.Error("Invalid `budgetingInterval` in the body of the request : Must be between 1m & 1h") ErrInvalidMetricName = validation.Error("Invalid `metricName` in the body of the request") ErrInvalidDescription = validation.Errorf("Description %s", lengthConstraint(1050)) ErrInvalidMetric = validation.Error("Invalid preconfigured metric") ErrInvalidAlertType = validation.Error("Invalid alert type") ErrInvalidAlertCondition = validation.Error("Invalid Alert Condition") ErrInvalidAlertThreshold = validation.Error("Invalid Alert Threshold") ErrInvalidAlertTarget = validation.Error("Invalid Alert Target") ErrMissingServiceInfo = validation.Error("Service job & cluster id are required to create an SLO") ErrNonNullId = WithInternalServerError("Slo Create requests must not have a set id") ErrPrometheusGenerator = WithInternalServerError("Prometheus generator failed to start") ErrInvalidDatasource = WithNotFoundError("Invalid required datasource value") ErrNotImplemented = WithUnimplementedError("Not Implemented") )
validation error descriptions
Functions ¶
func WithInternalServerError ¶
func WithNotFoundError ¶
func WithNotFoundErrorf ¶
func WithUnimplementedError ¶
func WithUnimplementedErrorf ¶
Types ¶
type InternalServerError ¶
type InternalServerError struct {
// contains filtered or unexported fields
}
func (*InternalServerError) Error ¶
func (e *InternalServerError) Error() string
func (*InternalServerError) GRPCStatus ¶
func (e *InternalServerError) GRPCStatus() *status.Status
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
func (*NotFoundError) GRPCStatus ¶
func (e *NotFoundError) GRPCStatus() *status.Status
type UnimplementedError ¶
type UnimplementedError struct {
// contains filtered or unexported fields
}
func (*UnimplementedError) Error ¶
func (e *UnimplementedError) Error() string
func (*UnimplementedError) GRPCStatus ¶
func (e *UnimplementedError) GRPCStatus() *status.Status
Click to show internal directories.
Click to hide internal directories.