K8s: Make GetAPIRoutes an optional interface (#97531)
This commit is contained in:
@@ -39,9 +39,6 @@ type APIGroupBuilder interface {
|
||||
// Get OpenAPI definitions
|
||||
GetOpenAPIDefinitions() common.GetOpenAPIDefinitions
|
||||
|
||||
// Get the API routes for each version
|
||||
GetAPIRoutes() *APIRoutes
|
||||
|
||||
// Optionally add an authorization hook
|
||||
// Standard namespace checking will happen before this is called, specifically
|
||||
// the namespace must matches an org|stack that the user belongs to
|
||||
@@ -60,6 +57,11 @@ type APIGroupValidation interface {
|
||||
Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error)
|
||||
}
|
||||
|
||||
type APIGroupRouteProvider interface {
|
||||
// Support direct HTTP routes from an APIGroup
|
||||
GetAPIRoutes() *APIRoutes
|
||||
}
|
||||
|
||||
type APIGroupOptions struct {
|
||||
Scheme *runtime.Scheme
|
||||
OptsGetter generic.RESTOptionsGetter
|
||||
|
||||
Reference in New Issue
Block a user