Documentation ¶
Index ¶
- Variables
- func AvailabilityStatus(w http.ResponseWriter, r *http.Request)
- func AzureOfferingTemplate(w http.ResponseWriter, r *http.Request)
- func CheckPermissionAndRender(w http.ResponseWriter, r *http.Request, permission string, resources ...string) error
- func CreateAWSReservation(w http.ResponseWriter, r *http.Request)
- func CreateAzureReservation(w http.ResponseWriter, r *http.Request)
- func CreateGCPReservation(w http.ResponseWriter, r *http.Request)
- func CreateNoopReservation(w http.ResponseWriter, r *http.Request)
- func CreatePubkey(w http.ResponseWriter, r *http.Request)
- func CreateReservation(w http.ResponseWriter, r *http.Request)
- func DeletePubkey(w http.ResponseWriter, r *http.Request)
- func FeatureFlagService(w http.ResponseWriter, r *http.Request)
- func GetPubkey(w http.ResponseWriter, r *http.Request)
- func GetReservationDetail(w http.ResponseWriter, r *http.Request)
- func GetSourceUploadInfo(w http.ResponseWriter, r *http.Request)
- func ListAllProvisioningSources(w http.ResponseWriter, r *http.Request)
- func ListBuiltinInstanceTypes(typeFunc InstanceTypesForZoneFunc) func(w http.ResponseWriter, r *http.Request)
- func ListLaunchTemplateAWS(w http.ResponseWriter, r *http.Request)
- func ListLaunchTemplateGCP(w http.ResponseWriter, r *http.Request)
- func ListLaunchTemplates(w http.ResponseWriter, r *http.Request)
- func ListProvisioningSourcesByProvider(w http.ResponseWriter, r *http.Request, asProviderType models.ProviderType)
- func ListPubkeys(w http.ResponseWriter, r *http.Request)
- func ListReservations(w http.ResponseWriter, r *http.Request)
- func ListSources(w http.ResponseWriter, r *http.Request)
- func MustParseBool(str string) (bool, error)
- func ParseBool(str string) (*bool, error)
- func ParseInt64(r *http.Request, param string) (int64, error)
- func ReadyBackendService(w http.ResponseWriter, r *http.Request)
- func ReadyService(w http.ResponseWriter, r *http.Request)
- func SourcesStatus(w stdhttp.ResponseWriter, r *stdhttp.Request)
- func StatusService(w http.ResponseWriter, r *http.Request)
- func ValidatePermissions(w http.ResponseWriter, r *http.Request)
- func WelcomeService(w http.ResponseWriter, r *http.Request)
- type InstanceTypesForZoneFunc
- type Vars
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknownProviderType = errors.New("unknown provider type parameter") ErrProviderTypeMismatch = errors.New("reservation type does not match requested provider type") ErrProviderTypeNotImplemented = errors.New("provider type not yet implemented") ErrUnknownInstanceTypeName = errors.New("unknown instance type") ErrArchitectureMismatch = errors.New("instance type and image architecture mismatch") ErrBothTypeAndTemplateMissing = errors.New("instance type or launch template not set") ErrUnsupportedRegion = errors.New("unknown region/location/zone") ErrInvalidNamePattern = errors.New("name pattern is not RFC-1035 compatible") ErrPubkeyNotFound = errors.New("no pubkey found") )
var ErrMissingExtraPermission = errors.New("missing permission")
var ErrMissingNameOrBody = errors.New("name or body missing")
var ErrUnknownProviderFromSources = errors.New("unknown provider returned from sources")
var ErrUnknownReadinessService = errors.New("unknown service for readiness test")
Functions ¶
func AvailabilityStatus ¶
func AvailabilityStatus(w http.ResponseWriter, r *http.Request)
func AzureOfferingTemplate ¶
func AzureOfferingTemplate(w http.ResponseWriter, r *http.Request)
func CheckPermissionAndRender ¶
func CheckPermissionAndRender(w http.ResponseWriter, r *http.Request, permission string, resources ...string) error
CheckPermissionAndRender can be used to perform an extra permission check that is more detailed than the one performed by the middleware. Do not use this function as the only permission check, permissions should always be enforced via middleware as a bare minimum.
func CreateAWSReservation ¶
func CreateAWSReservation(w http.ResponseWriter, r *http.Request)
func CreateAzureReservation ¶
func CreateAzureReservation(w http.ResponseWriter, r *http.Request)
func CreateGCPReservation ¶
func CreateGCPReservation(w http.ResponseWriter, r *http.Request)
func CreateNoopReservation ¶
func CreateNoopReservation(w http.ResponseWriter, r *http.Request)
CreateNoopReservation is used to create empty reservation that is processed without any operation being made. This is useful when testing the job queue. The endpoint has no payload.
func CreatePubkey ¶
func CreatePubkey(w http.ResponseWriter, r *http.Request)
func CreateReservation ¶
func CreateReservation(w http.ResponseWriter, r *http.Request)
CreateReservation dispatches requests to type provider specific handlers
func DeletePubkey ¶
func DeletePubkey(w http.ResponseWriter, r *http.Request)
func FeatureFlagService ¶
func FeatureFlagService(w http.ResponseWriter, r *http.Request)
func GetReservationDetail ¶
func GetReservationDetail(w http.ResponseWriter, r *http.Request)
func GetSourceUploadInfo ¶
func GetSourceUploadInfo(w http.ResponseWriter, r *http.Request)
func ListAllProvisioningSources ¶
func ListAllProvisioningSources(w http.ResponseWriter, r *http.Request)
func ListBuiltinInstanceTypes ¶
func ListBuiltinInstanceTypes(typeFunc InstanceTypesForZoneFunc) func(w http.ResponseWriter, r *http.Request)
func ListLaunchTemplateAWS ¶
func ListLaunchTemplateAWS(w http.ResponseWriter, r *http.Request)
func ListLaunchTemplateGCP ¶
func ListLaunchTemplateGCP(w http.ResponseWriter, r *http.Request)
func ListLaunchTemplates ¶
func ListLaunchTemplates(w http.ResponseWriter, r *http.Request)
func ListProvisioningSourcesByProvider ¶
func ListProvisioningSourcesByProvider(w http.ResponseWriter, r *http.Request, asProviderType models.ProviderType)
func ListPubkeys ¶
func ListPubkeys(w http.ResponseWriter, r *http.Request)
func ListReservations ¶
func ListReservations(w http.ResponseWriter, r *http.Request)
func ListSources ¶
func ListSources(w http.ResponseWriter, r *http.Request)
func MustParseBool ¶
MustParseBool converts string into bool. If string is empty, it returns an error.
func ParseInt64 ¶
ParseInt64 converts param into int64. If param does not exist, it returns an error. TODO: It would be better to move chi.URLParam call out of this function so it can be also used for URL params. See below for an examples (MustParseBool/ParseBool).
func ReadyBackendService ¶
func ReadyBackendService(w http.ResponseWriter, r *http.Request)
func ReadyService ¶
func ReadyService(w http.ResponseWriter, r *http.Request)
func SourcesStatus ¶
func SourcesStatus(w stdhttp.ResponseWriter, r *stdhttp.Request)
SourcesStatus fetches information from sources and then performs a smallest possible request on the cloud provider (list keys or similar). Reports an error if sources configuration is no longer valid.
func StatusService ¶
func StatusService(w http.ResponseWriter, r *http.Request)
func ValidatePermissions ¶
func ValidatePermissions(w http.ResponseWriter, r *http.Request)
func WelcomeService ¶
func WelcomeService(w http.ResponseWriter, r *http.Request)
Types ¶
type InstanceTypesForZoneFunc ¶
type InstanceTypesForZoneFunc func(region, zone string, supported *bool) ([]*clients.InstanceType, error)
Source Files ¶
- availability_status_service.go
- aws_iam_service.go
- aws_reservation_service.go
- azure_offering_template_service.go
- azure_reservation_service.go
- builtin_types_service.go
- error_renderer.go
- feature_flags_service.go
- gcp_reservation_service.go
- launch_templates_service.go
- noop_reservation_service.go
- parameters.go
- permissions.go
- pubkey_service.go
- reservations_service.go
- sources_service.go
- sources_status_service.go
- status_service.go
- welcome_service.go