Documentation ¶
Index ¶
- func DeleteTestDB(db *gorm.DB, dbName string)
- func GenerateError(id int32, err error) *models.Error
- func GenerateErrorResponder(err error) middleware.Responder
- func GenerateErrorResponderWithDefault(err error, defaultCode int32) middleware.Responder
- func GenerateInternalFromError(err error) *models.Error
- func GetCurrentHostName(host *models.Host) (string, error)
- func GetEventSeverityFromHostStatus(status string) string
- func GetHostnameForMsg(host *models.Host) string
- func InitializeDBTest()
- func PrepareTestDB(dbName string, extrasSchemas ...interface{}) *gorm.DB
- func TerminateDBTest()
- type ApiErrorResponse
- type Cluster
- type DBContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTestDB ¶ added in v1.0.7
func GenerateErrorResponder ¶
func GenerateErrorResponder(err error) middleware.Responder
func GenerateErrorResponderWithDefault ¶ added in v1.0.5
func GenerateErrorResponderWithDefault(err error, defaultCode int32) middleware.Responder
func GetCurrentHostName ¶ added in v1.0.5
func GetEventSeverityFromHostStatus ¶ added in v1.0.7
func GetHostnameForMsg ¶ added in v1.0.7
func InitializeDBTest ¶ added in v1.0.7
func InitializeDBTest()
func PrepareTestDB ¶ added in v1.0.7
func TerminateDBTest ¶ added in v1.0.7
func TerminateDBTest()
Types ¶
type ApiErrorResponse ¶
type ApiErrorResponse struct {
// contains filtered or unexported fields
}
func NewApiError ¶
func NewApiError(statusCode int32, err error) *ApiErrorResponse
func (*ApiErrorResponse) Error ¶
func (a *ApiErrorResponse) Error() string
func (*ApiErrorResponse) StatusCode ¶
func (a *ApiErrorResponse) StatusCode() int32
func (*ApiErrorResponse) WriteResponse ¶
func (a *ApiErrorResponse) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
Click to show internal directories.
Click to hide internal directories.