controllers

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceInstanceStateSucceeded = "succeeded"
)

Variables

This section is empty.

Functions

func AddHeadersMiddleware

func AddHeadersMiddleware(next http.Handler) http.Handler

func BasicAuthMiddleware

func BasicAuthMiddleware(next http.Handler) http.Handler

func CallCreate

func CallCreate(w http.ResponseWriter, r *http.Request)

func CallDelete

func CallDelete(w http.ResponseWriter, r *http.Request)

func CallGet

func CallGet(w http.ResponseWriter, r *http.Request)

func CallHistoriesGet

func CallHistoriesGet(w http.ResponseWriter, r *http.Request)

func CallRun

func CallRun(w http.ResponseWriter, r *http.Request)

func CallScheduleCreate

func CallScheduleCreate(w http.ResponseWriter, r *http.Request)

func CallScheduleDelete

func CallScheduleDelete(w http.ResponseWriter, r *http.Request)

func CallScheduleGet

func CallScheduleGet(w http.ResponseWriter, r *http.Request)

func Catalog

func Catalog(w http.ResponseWriter, r *http.Request)

func CheckJWTMiddleware

func CheckJWTMiddleware(next http.Handler) http.Handler

func CreateServiceBinding

func CreateServiceBinding(w http.ResponseWriter, r *http.Request)

func CreateServiceInstance

func CreateServiceInstance(w http.ResponseWriter, r *http.Request)

func DebugMiddleware

func DebugMiddleware(next http.Handler) http.Handler

func DeleteServiceBinding

func DeleteServiceBinding(w http.ResponseWriter, r *http.Request)

func DeleteServiceInstance

func DeleteServiceInstance(w http.ResponseWriter, r *http.Request)

func GetServiceBinding

func GetServiceBinding(w http.ResponseWriter, r *http.Request)

func GetServiceInstanceLastOperation

func GetServiceInstanceLastOperation(w http.ResponseWriter, _ *http.Request)

func JobCreate

func JobCreate(w http.ResponseWriter, r *http.Request)

func JobDelete

func JobDelete(w http.ResponseWriter, r *http.Request)

func JobGet

func JobGet(w http.ResponseWriter, r *http.Request)

func JobHistoriesGet

func JobHistoriesGet(w http.ResponseWriter, r *http.Request)

func JobRun

func JobRun(w http.ResponseWriter, r *http.Request)

func JobScheduleCreate

func JobScheduleCreate(w http.ResponseWriter, r *http.Request)

func JobScheduleDelete

func JobScheduleDelete(w http.ResponseWriter, r *http.Request)

func JobScheduleGet

func JobScheduleGet(w http.ResponseWriter, r *http.Request)

Types

type GenericRequestFitsAll

type GenericRequestFitsAll struct {
	SpaceGUID      string `json:"spaceguid"`
	AppGUID        string `json:"appguid,omitempty"`
	Name           string `json:"name,omitempty"`
	CronExpression string `json:"cronexpression,omitempty"`
	ExpressionType string `json:"expressiontype,omitempty"`
	Command        string `json:"command,omitempty"`
	MemoryInMB     int    `json:"memory_in_mb,omitempty"`
	DiskInMB       int    `json:"disk_in_mb,omitempty"`
	Url            string `json:"url,omitempty"`
	AuthHeader     string `json:"authheader,omitempty"`
	ScheduleGuid   string `json:"scheduleguid,omitempty"`
}

GenericRequestFitsAll - All request bodies can have different structures, but this one will capture all fields, while some of them may be empty

func ValidateRequest

func ValidateRequest(w http.ResponseWriter, r *http.Request) (bool, string, GenericRequestFitsAll)

ValidateRequest - We validate the incoming http request, it should have a valid JWT, there should be a user_id claim in the JWT, the request body should be json-parse-able and the user should be authorized for the requested space.

Jump to

Keyboard shortcuts

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