instancedeleter

package
v0.0.0-...-2cf41ae Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendEntryPoint

func ExtendEntryPoint(w http.ResponseWriter, r *http.Request, project, zone string)

func RenderError

func RenderError(ctx context.Context, w http.ResponseWriter, e APIError)

RenderError renders response as error

func RenderJSON

func RenderJSON(w http.ResponseWriter, data interface{}, status int)

RenderJSON renders response in JSON format

func ShutdownEntryPoint

func ShutdownEntryPoint(ctx context.Context, m *pubsub.Message, necoTestProject, necoTestZone string) error

Types

type APIError

type APIError struct {
	Status  int
	Message string
	Err     error
}

APIError is to define REST API errors.

func InternalServerError

func InternalServerError(e error) APIError

InternalServerError creates an APIError.

func (APIError) Error

func (e APIError) Error() string

Error implements error interface.

type ExtendStatus

type ExtendStatus struct {
	Extended string `json:"extended"`
}

ExtendStatus represents status of /extend

type ShutdownStatus

type ShutdownStatus struct {
	Stopped []string `json:"stopped"`
	Deleted []string `json:"deleted"`
}

ShutdownStatus represents status of /shutdown

Jump to

Keyboard shortcuts

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