utils

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BcsK8sCluster = iota + 1
	BcsMesosCluster
	BcsTkeCluster
)

Variables

View Source
var WriteClientError = WriteFuncFactory(400)
View Source
var WriteForbiddenError = WriteFuncFactory(403)
View Source
var WriteNotFoundError = WriteFuncFactory(404)
View Source
var WriteServerError = WriteFuncFactory(500)
View Source
var WriteUnauthorizedError = WriteFuncFactory(401)

Functions

func WriteFuncFactory

func WriteFuncFactory(statusCode int) func(response *restful.Response, codeName, message string)

WriteFuncFactory builds WriteXXX shortcut functions

Types

type CannotCreateClusterError

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

func NewCannotCreateClusterError

func NewCannotCreateClusterError(message string) *CannotCreateClusterError

func (*CannotCreateClusterError) Error

func (e *CannotCreateClusterError) Error() string

type ClusterAreadyExistError

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

func NewClusterAreadyExistError

func NewClusterAreadyExistError(message string) *ClusterAreadyExistError

func (*ClusterAreadyExistError) Error

func (e *ClusterAreadyExistError) Error() string

type ClusterInitFailedError

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

func NewClusterInitFailedError

func NewClusterInitFailedError(message string) *ClusterInitFailedError

func (*ClusterInitFailedError) Error

func (e *ClusterInitFailedError) Error() string

Jump to

Keyboard shortcuts

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