func (r resources) registerHookContextFacade() { common.RegisterHookContextFacade( context.HookContextFacade, internalserver.FacadeVersion, r.newHookContextFacade, reflect.TypeOf(&internalserver.UnitFacade{}), ) api.RegisterFacadeVersion(context.HookContextFacade, internalserver.FacadeVersion) }
func (c payloads) registerHookContextFacade() { const version = 0 common.RegisterHookContextFacade( payloadsHookContextFacade, version, c.newHookContextFacade, reflect.TypeOf(&internalserver.UnitFacade{}), ) api.RegisterFacadeVersion(payloadsHookContextFacade, version) }
// registerPublicFacade adds the resources public API facade // to the API server. func (r resources) registerPublicFacade() { if !markRegistered(resource.ComponentName, "public-facade") { return } common.RegisterStandardFacade( resource.ComponentName, server.Version, r.newPublicFacade, ) api.RegisterFacadeVersion(resource.ComponentName, server.Version) }
func (c payloads) registerPublicFacade() { if !markRegistered(payload.ComponentName, "public-facade") { return } const version = 1 common.RegisterStandardFacade( payload.ComponentName, version, c.newPublicFacade, ) api.RegisterFacadeVersion(payload.ComponentName, version) }
func (r resources) registerHookContextFacade() { common.RegisterHookContextFacade( context.HookContextFacade, internalserver.FacadeVersion, r.newHookContextFacade, reflect.TypeOf(&internalserver.UnitFacade{}), ) coreapi.RegisterFacadeVersion(context.HookContextFacade, internalserver.FacadeVersion) common.RegisterAPIModelEndpoint(internalapi.HTTPEndpointPattern, apihttp.HandlerSpec{ Constraints: apihttp.HandlerConstraints{ AuthKind: names.UnitTagKind, StrictValidation: true, ControllerModelOnly: false, }, NewHandler: resourceadapters.NewDownloadHandler, }) }
// registerPublicFacade adds the resources public API facade // to the API server. func (r resources) registerPublicFacade() { if !markRegistered(resource.ComponentName, "public-facade") { return } common.RegisterStandardFacade( resource.ComponentName, server.Version, resourceadapters.NewPublicFacade, ) coreapi.RegisterFacadeVersion(resource.ComponentName, server.Version) common.RegisterAPIModelEndpoint(api.HTTPEndpointPattern, apihttp.HandlerSpec{ Constraints: apihttp.HandlerConstraints{ AuthKind: names.UserTagKind, StrictValidation: true, ControllerModelOnly: false, }, NewHandler: resourceadapters.NewUploadHandler, }) }