Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeAndValidatePayload(r *http.Request, object interface{}) *requestMalformedError
- type AppHandler
- type BuildHandler
- type CFAppRepository
- type CFBuildRepository
- type CFDomainRepository
- type CFDropletRepository
- type CFOrgRepository
- type CFPackageRepository
- type CFProcessRepository
- type CFRouteRepository
- type CFSpaceRepository
- type ClientBuilder
- type DropletHandler
- type OrgHandler
- type OrgRepositoryProvider
- type PackageHandler
- type ProcessHandler
- type RegistryAuthBuilder
- type ResourceMatchesHandler
- type RootHandler
- type RootV3Handler
- type RouteHandler
- type SourceImageUploader
- type SpaceHandler
Constants ¶
View Source
const ( AppCreateEndpoint = "/v3/apps" AppGetEndpoint = "/v3/apps/{guid}" AppListEndpoint = "/v3/apps" AppSetCurrentDropletEndpoint = "/v3/apps/{guid}/relationships/current_droplet" AppGetProcessesEndpoint = "/v3/apps/{guid}/processes" AppGetRoutesEndpoint = "/v3/apps/{guid}/routes" AppStartEndpoint = "/v3/apps/{guid}/actions/start" AppStopEndpoint = "/v3/apps/{guid}/actions/stop" AppStartedState = "STARTED" AppStoppedState = "STOPPED" )
View Source
const ( BuildGetEndpoint = "/v3/builds/{guid}" BuildCreateEndpoint = "/v3/builds" )
View Source
const ( PackageCreateEndpoint = "/v3/packages" PackageUploadEndpoint = "/v3/packages/{guid}/upload" )
View Source
const ( ProcessGetEndpoint = "/v3/processes/{guid}" ProcessGetSidecarsEndpoint = "/v3/processes/{guid}/sidecars" )
View Source
const ( RouteGetEndpoint = "/v3/routes/{guid}" RouteGetListEndpoint = "/v3/routes" RouteGetDestinationsEndpoint = "/v3/routes/{guid}/destinations" RouteCreateEndpoint = "/v3/routes" )
View Source
const (
DropletGetEndpoint = "/v3/droplets/{guid}"
)
View Source
const (
OrgListEndpoint = "/v3/organizations"
)
View Source
const (
ResourceMatchesEndpoint = "/v3/resource_matches"
)
View Source
const (
RootGetEndpoint = "/"
)
View Source
const (
RootV3GetEndpoint = "/v3"
)
View Source
const (
SpacesEndpoint = "/v3/spaces"
)
Variables ¶
View Source
var Logger = ctrl.Log.WithName("Shared Handler Functions")
Functions ¶
Types ¶
type AppHandler ¶
type AppHandler struct {
// contains filtered or unexported fields
}
func NewAppHandler ¶
func NewAppHandler( logger logr.Logger, serverURL url.URL, appRepo CFAppRepository, dropletRepo CFDropletRepository, processRepo CFProcessRepository, routeRepo CFRouteRepository, domainRepo CFDomainRepository, buildClient ClientBuilder, k8sConfig *rest.Config) *AppHandler
func (*AppHandler) RegisterRoutes ¶
func (h *AppHandler) RegisterRoutes(router *mux.Router)
type BuildHandler ¶
type BuildHandler struct {
// contains filtered or unexported fields
}
func NewBuildHandler ¶
func NewBuildHandler( logger logr.Logger, serverURL url.URL, buildRepo CFBuildRepository, packageRepo CFPackageRepository, buildClient ClientBuilder, k8sConfig *rest.Config) *BuildHandler
func (*BuildHandler) RegisterRoutes ¶
func (h *BuildHandler) RegisterRoutes(router *mux.Router)
type CFAppRepository ¶
type CFAppRepository interface { FetchApp(context.Context, client.Client, string) (repositories.AppRecord, error) FetchAppList(context.Context, client.Client) ([]repositories.AppRecord, error) FetchNamespace(context.Context, client.Client, string) (repositories.SpaceRecord, error) CreateAppEnvironmentVariables(context.Context, client.Client, repositories.AppEnvVarsRecord) (repositories.AppEnvVarsRecord, error) CreateApp(context.Context, client.Client, repositories.AppRecord) (repositories.AppRecord, error) SetCurrentDroplet(context.Context, client.Client, repositories.SetCurrentDropletMessage) (repositories.CurrentDropletRecord, error) SetAppDesiredState(context.Context, client.Client, repositories.SetAppDesiredStateMessage) (repositories.AppRecord, error) }
type CFBuildRepository ¶
type CFBuildRepository interface { FetchBuild(context.Context, client.Client, string) (repositories.BuildRecord, error) CreateBuild(context.Context, client.Client, repositories.BuildCreateMessage) (repositories.BuildRecord, error) }
type CFDomainRepository ¶
type CFDomainRepository interface {
FetchDomain(context.Context, client.Client, string) (repositories.DomainRecord, error)
}
type CFDropletRepository ¶
type CFDropletRepository interface {
FetchDroplet(context.Context, client.Client, string) (repositories.DropletRecord, error)
}
type CFOrgRepository ¶
type CFOrgRepository interface { CreateOrg(context context.Context, org repositories.OrgRecord) (repositories.OrgRecord, error) FetchOrgs(context context.Context, orgNames []string) ([]repositories.OrgRecord, error) }
type CFPackageRepository ¶
type CFPackageRepository interface { FetchPackage(context.Context, client.Client, string) (repositories.PackageRecord, error) CreatePackage(context.Context, client.Client, repositories.PackageCreateMessage) (repositories.PackageRecord, error) UpdatePackageSource(ctx context.Context, client client.Client, message repositories.PackageUpdateSourceMessage) (repositories.PackageRecord, error) }
type CFProcessRepository ¶
type CFProcessRepository interface { FetchProcess(context.Context, client.Client, string) (repositories.ProcessRecord, error) FetchProcessesForApp(context.Context, client.Client, string, string) ([]repositories.ProcessRecord, error) }
type CFRouteRepository ¶
type CFRouteRepository interface { FetchRoute(context.Context, client.Client, string) (repositories.RouteRecord, error) FetchRouteList(context.Context, client.Client) ([]repositories.RouteRecord, error) FetchRoutesForApp(context.Context, client.Client, string, string) ([]repositories.RouteRecord, error) CreateRoute(context.Context, client.Client, repositories.RouteRecord) (repositories.RouteRecord, error) }
type CFSpaceRepository ¶
type CFSpaceRepository interface { CreateSpace(context.Context, repositories.SpaceRecord) (repositories.SpaceRecord, error) FetchSpaces(context.Context, []string, []string) ([]repositories.SpaceRecord, error) }
type DropletHandler ¶
type DropletHandler struct {
// contains filtered or unexported fields
}
func NewDropletHandler ¶
func NewDropletHandler( logger logr.Logger, serverURL url.URL, dropletRepo CFDropletRepository, buildClient ClientBuilder, k8sConfig *rest.Config) *DropletHandler
func (*DropletHandler) RegisterRoutes ¶
func (h *DropletHandler) RegisterRoutes(router *mux.Router)
type OrgHandler ¶
type OrgHandler struct {
// contains filtered or unexported fields
}
func NewOrgHandler ¶
func NewOrgHandler(apiBaseURL url.URL, orgRepoProvider OrgRepositoryProvider) *OrgHandler
func (*OrgHandler) RegisterRoutes ¶
func (h *OrgHandler) RegisterRoutes(router *mux.Router)
type OrgRepositoryProvider ¶
type OrgRepositoryProvider interface {
OrgRepoForRequest(request *http.Request) (CFOrgRepository, error)
}
type PackageHandler ¶
type PackageHandler struct {
// contains filtered or unexported fields
}
func NewPackageHandler ¶
func NewPackageHandler( logger logr.Logger, serverURL url.URL, packageRepo CFPackageRepository, appRepo CFAppRepository, buildClient ClientBuilder, uploadSourceImage SourceImageUploader, buildRegistryAuth RegistryAuthBuilder, k8sConfig *rest.Config, registryBase string, registrySecretName string) *PackageHandler
func (*PackageHandler) RegisterRoutes ¶
func (h *PackageHandler) RegisterRoutes(router *mux.Router)
type ProcessHandler ¶
type ProcessHandler struct {
// contains filtered or unexported fields
}
func NewProcessHandler ¶
func NewProcessHandler( logger logr.Logger, serverURL url.URL, processRepo CFProcessRepository, buildClient ClientBuilder, k8sConfig *rest.Config) *ProcessHandler
func (*ProcessHandler) LogError ¶
func (h *ProcessHandler) LogError(w http.ResponseWriter, processGUID string, err error)
func (*ProcessHandler) RegisterRoutes ¶
func (h *ProcessHandler) RegisterRoutes(router *mux.Router)
type RegistryAuthBuilder ¶
type ResourceMatchesHandler ¶
type ResourceMatchesHandler struct {
// contains filtered or unexported fields
}
func NewResourceMatchesHandler ¶
func NewResourceMatchesHandler(serverURL string) *ResourceMatchesHandler
func (*ResourceMatchesHandler) RegisterRoutes ¶
func (h *ResourceMatchesHandler) RegisterRoutes(router *mux.Router)
type RootHandler ¶
type RootHandler struct {
// contains filtered or unexported fields
}
func NewRootHandler ¶
func NewRootHandler(logger logr.Logger, serverURL string) *RootHandler
func (*RootHandler) RegisterRoutes ¶
func (h *RootHandler) RegisterRoutes(router *mux.Router)
type RootV3Handler ¶
type RootV3Handler struct {
// contains filtered or unexported fields
}
func NewRootV3Handler ¶
func NewRootV3Handler(serverURL string) *RootV3Handler
func (*RootV3Handler) RegisterRoutes ¶
func (h *RootV3Handler) RegisterRoutes(router *mux.Router)
type RouteHandler ¶
type RouteHandler struct {
// contains filtered or unexported fields
}
func NewRouteHandler ¶
func NewRouteHandler( logger logr.Logger, serverURL url.URL, routeRepo CFRouteRepository, domainRepo CFDomainRepository, appRepo CFAppRepository, buildClient ClientBuilder, k8sConfig *rest.Config) *RouteHandler
func (*RouteHandler) RegisterRoutes ¶
func (h *RouteHandler) RegisterRoutes(router *mux.Router)
type SourceImageUploader ¶
type SpaceHandler ¶
type SpaceHandler struct {
// contains filtered or unexported fields
}
func NewSpaceHandler ¶
func NewSpaceHandler(spaceRepo CFSpaceRepository, apiBaseURL url.URL) *SpaceHandler
func (*SpaceHandler) RegisterRoutes ¶
func (h *SpaceHandler) RegisterRoutes(router *mux.Router)
func (*SpaceHandler) SpaceCreateHandler ¶
func (h *SpaceHandler) SpaceCreateHandler(w http.ResponseWriter, r *http.Request)
func (*SpaceHandler) SpaceListHandler ¶
func (h *SpaceHandler) SpaceListHandler(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.