response

package
v1.9.0-beta.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorAttribute

type ErrorAttribute struct {
	Name    string `json:"name"`
	Message string `json:"message"`
}

type ErrorSchema

type ErrorSchema struct {
	Code          string    `json:"code"`
	Message       string    `json:"message"`
	Date          time.Time `json:"date"`
	ClusterUUID   string    `json:"cluster_uuid"`
	NodeGroupUUID string    `json:"node_group_uuid"`
	ProjectUUID   string    `json:"project_uuid"`
}

type HTTPErrorResponse

type HTTPErrorResponse struct {
	Error ErrorSchema `json:"error"`
}

func NewAuthorizationError

func NewAuthorizationError() HTTPErrorResponse

func NewBodyParserErrorResponse

func NewBodyParserErrorResponse() HTTPErrorResponse

func NewErrorResponse

func NewErrorResponse(ctx context.Context, err error, msg ...string) HTTPErrorResponse

func NewErrorResponseWithDetails added in v1.1.1

func NewErrorResponseWithDetails(err error, msg, clusterUUID, nodeGroupUUID, projectUUID string) HTTPErrorResponse

type HTTPSuccessResponse

type HTTPSuccessResponse struct {
	Data interface{} `json:"data"`
}

func NewSuccessResponse

func NewSuccessResponse(data interface{}) HTTPSuccessResponse

type HTTPValidationErrorResponse

type HTTPValidationErrorResponse struct {
	Error      ErrorSchema      `json:"error"`
	Attributes []ErrorAttribute `json:"attributes"`
}

func NewValidationErrorResponse

func NewValidationErrorResponse(errors map[string]string) HTTPValidationErrorResponse

Jump to

Keyboard shortcuts

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