Documentation ¶
Index ¶
- Variables
- func GetProjectName(ctx Context) string
- func ValidateProjectNameMiddleware(ctx Context) error
- type Context
- type DefaultParams
- func (p *DefaultParams) WithContentLength(length int) *DefaultParams
- func (p *DefaultParams) WithContentType(content string) *DefaultParams
- func (p *DefaultParams) WithDigest(digest string) *DefaultParams
- func (p *DefaultParams) WithLocation(location string) *DefaultParams
- func (p *DefaultParams) WithRange(start, end int) *DefaultParams
- func (p *DefaultParams) WithUUID(uuid string) *DefaultParams
- type Handler
- type HandlerFunc
- type Header
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ContentOctetStream = "application/octet-stream"
Functions ¶
func GetProjectName ¶
Types ¶
type Context ¶
type Context interface { AbortWithJson(code int, i any) //Не использовать. Не понятно почему, но не работает, пофиксить JSON(code int, i any) Bind(i any) error FormFile(name string) (*multipart.FileHeader, error) Body() io.ReadCloser NoContent(code int) Param(string) string QueryParams() url.Values QueryParam(name string) string OriginalURL() string Request() *http.Request Redirect(location string, status int) error Header(key string) string SetHeader(key string, val string) SetHeaders([]Header) OctetStream(code int, data []byte) }
type DefaultParams ¶
type DefaultParams struct { ContentLength int Range bool StartRange int EndRange int Location string ContentType string UUID string Digest string }
func NewRegisryHeadersParams ¶
func NewRegisryHeadersParams() *DefaultParams
func (*DefaultParams) WithContentLength ¶
func (p *DefaultParams) WithContentLength(length int) *DefaultParams
func (*DefaultParams) WithContentType ¶
func (p *DefaultParams) WithContentType(content string) *DefaultParams
func (*DefaultParams) WithDigest ¶
func (p *DefaultParams) WithDigest(digest string) *DefaultParams
func (*DefaultParams) WithLocation ¶
func (p *DefaultParams) WithLocation(location string) *DefaultParams
func (*DefaultParams) WithRange ¶
func (p *DefaultParams) WithRange(start, end int) *DefaultParams
func (*DefaultParams) WithUUID ¶
func (p *DefaultParams) WithUUID(uuid string) *DefaultParams
type HandlerFunc ¶
func (HandlerFunc) Handle ¶
func (h HandlerFunc) Handle(ctx Context) error
type Header ¶
func CreateRegistryHeaders ¶
func CreateRegistryHeaders(params *DefaultParams) []Header
Click to show internal directories.
Click to hide internal directories.