Help us shape the future of Go! Take the 2026 Go Developer Survey

container

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(ctx *context.Context)

Authenticate creates a token for the current user If the current user is anonymous, the ghost user is used unless RequireSignInView is enabled.

func AuthenticateNotImplemented

func AuthenticateNotImplemented(ctx *context.Context)

https://distribution.github.io/distribution/spec/auth/oauth/

func DeleteBlobsUpload

func DeleteBlobsUpload(ctx *context.Context)

https://docs.docker.com/registry/spec/api/#delete-blob-upload

func DetermineSupport

func DetermineSupport(ctx *context.Context)

DetermineSupport is used to test if the registry supports OCI https://github.com/opencontainers/distribution-spec/blob/main/spec.md#determining-support

func GetRepositoryList

func GetRepositoryList(ctx *context.Context)

https://docs.docker.com/registry/spec/api/#listing-repositories

func ReqContainerAccess

func ReqContainerAccess(ctx *context.Context)

ReqContainerAccess is a middleware which checks the current user valid (real user or ghost if anonymous access is enabled)

func VerifyImageName

func VerifyImageName(ctx *context.Context)

VerifyImageName is a middleware which checks if the image name is allowed

Types

type Auth

type Auth struct{}

func (*Auth) Name

func (a *Auth) Name() string

func (*Auth) Verify

func (a *Auth) Verify(req *http.Request, w http.ResponseWriter, store auth.DataStore, sess auth.SessionStore) (*user_model.User, error)

Verify extracts the user from the Bearer token If it's an anonymous session, a ghost user is returned

Source Files

  • auth.go
  • blob.go
  • container.go
  • errors.go
  • manifest.go

Jump to

Keyboard shortcuts

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