handler

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxMemory = 32 * 1024 * 1024

MaxMemory is the a total of max bytes of its file parts stored in memory

Variables

View Source
var (
	// ErrorSessionMissing indicates that the specified session not found
	ErrorSessionMissing = newHandlerError(http.StatusNotFound, "SESSION NOT FOUND", "session with specified identity not found")
	// ErrorManifestMissing indicates that the specified component doesn't have manifest yet
	ErrorManifestMissing = newHandlerError(http.StatusNotFound, "MANIFEST NOT FOUND", "that component doesn't have manifest yet")
	// ErrorInvalidTarball indicates that the tarball is not valid (eg. too large)
	ErrorInvalidTarball = newHandlerError(http.StatusBadRequest, "INVALID TARBALL", "the tarball content is not valid")
	// ErrorInvalidManifest indicates that the manifest is not valid
	ErrorInvalidManifest = newHandlerError(http.StatusBadRequest, "INVALID MANIFEST", "the manifest content is not valid")
	// ErrorInternalError indicates that an internal error happened
	ErrorInternalError = newHandlerError(http.StatusInternalServerError, "INTERNAL ERROR", "an internal error happened")
	// ErrorManifestConflict indicates that the uploaded manifest is not new enough
	ErrorManifestConflict = newHandlerError(http.StatusConflict, "MANIFEST CONFLICT", "the manifest provided is not new enough")
	// ErrorForbiden indicates that the user can't access target resource
	ErrorForbiden = newHandlerError(http.StatusForbidden, "FORBIDDEN", "permission denied")
)

Functions

func RotateRoot

func RotateRoot(mirror repository.Mirror) http.Handler

RotateRoot handles requests to re-sign root manifest

func SignComponent

func SignComponent(sm session.Manager, mirror repository.Mirror) http.Handler

SignComponent handles requests to re-sign component manifest

func UploadTarbal

func UploadTarbal(sm session.Manager) http.Handler

UploadTarbal handle tarball upload

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL