common

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTestDB added in v1.0.7

func DeleteTestDB(db *gorm.DB, dbName string)

func GenerateError

func GenerateError(id int32, err error) *models.Error

func GenerateErrorResponder

func GenerateErrorResponder(err error) middleware.Responder

func GenerateErrorResponderWithDefault added in v1.0.5

func GenerateErrorResponderWithDefault(err error, defaultCode int32) middleware.Responder

func GenerateInternalFromError

func GenerateInternalFromError(err error) *models.Error

func GetCurrentHostName added in v1.0.5

func GetCurrentHostName(host *models.Host) (string, error)

func GetEventSeverityFromHostStatus added in v1.0.7

func GetEventSeverityFromHostStatus(status string) string

func GetHostnameForMsg added in v1.0.7

func GetHostnameForMsg(host *models.Host) string

func InitializeDBTest added in v1.0.7

func InitializeDBTest()

func PrepareTestDB added in v1.0.7

func PrepareTestDB(dbName string, extrasSchemas ...interface{}) *gorm.DB

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)

type Cluster

type Cluster struct {
	models.Cluster
	// The pull secret that obtained from the Pull Secret page on the Red Hat OpenShift Cluster Manager site.
	PullSecret string `json:"pull_secret" gorm:"type:TEXT"`
}

type DBContext added in v1.0.7

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

func (*DBContext) GetPort added in v1.0.7

func (c *DBContext) GetPort() string

Jump to

Keyboard shortcuts

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