Documentation ¶
Index ¶
- func CopyArtifactMiddleware() func(http.Handler) http.Handler
- func PostInitiateBlobUploadMiddleware() func(http.Handler) http.Handler
- func PutBlobUploadMiddleware() func(http.Handler) http.Handler
- func PutManifestMiddleware() func(http.Handler) http.Handler
- func RefreshForProjectMiddleware(skippers ...middleware.Skipper) func(http.Handler) http.Handler
- func RefreshMiddleware(config RefreshConfig, skipers ...middleware.Skipper) func(http.Handler) http.Handler
- func RequestMiddleware(config RequestConfig, skippers ...middleware.Skipper) func(http.Handler) http.Handler
- type RefreshConfig
- type RequestConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyArtifactMiddleware ¶
CopyArtifactMiddleware middleware to request count and storage resources for copy artifact API
func PostInitiateBlobUploadMiddleware ¶
PostInitiateBlobUploadMiddleware middleware to add blob to project after mount blob success
func PutBlobUploadMiddleware ¶
PutBlobUploadMiddleware middleware to request storage resource for the project
func PutManifestMiddleware ¶
PutManifestMiddleware middleware to request count and storage resources for the project
func RefreshForProjectMiddleware ¶
RefreshForProjectMiddleware middleware which refresh the quota usage of project after the response success
func RefreshMiddleware ¶
func RefreshMiddleware(config RefreshConfig, skipers ...middleware.Skipper) func(http.Handler) http.Handler
RefreshMiddleware middleware which refresh the quota usage after the response success
func RequestMiddleware ¶
func RequestMiddleware(config RequestConfig, skippers ...middleware.Skipper) func(http.Handler) http.Handler
RequestMiddleware middleware which request resources
Types ¶
type RefreshConfig ¶
type RefreshConfig struct { // IgnoreLimitation allow quota usage exceed the limitation when it's true IgnoreLimitation bool // ReferenceObject returns reference object its quota usage will refresh by reference and reference id ReferenceObject func(*http.Request) (reference string, referenceID string, err error) }
RefreshConfig refresh quota usage middleware config
type RequestConfig ¶
type RequestConfig struct { // ReferenceObject returns reference object which resources will be requested ReferenceObject func(r *http.Request) (reference string, referenceID string, err error) // Resources returns request resources for the reference object Resources func(r *http.Request, reference, referenceID string) (types.ResourceList, error) // ResourcesWarningPercent value from 0 to 100 ResourcesWarningPercent int // ResourcesWarning returns event which will be notified when resources usage exceeded the wanring percent ResourcesWarning func(r *http.Request, reference, referenceID string, message string) event.Metadata // ResourcesExceeded returns event which will be notified when resources exceeded the limitation ResourcesExceeded func(r *http.Request, reference, referenceID string, message string) event.Metadata }
RequestConfig request resources middleware config