module

package
v0.0.0-...-930013b Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouteNameBase            = "base"
	RouteNameBlob            = "blob"
	RouteNameManifest        = "manifest"
	RouteNameTags            = "tags"
	RouteNameBlobUpload      = "blob-upload"
	RouteNameBlobUploadChunk = "blob-upload-chunk"
)

Variables

View Source
var DigestRegexp = regexp.MustCompile(`[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+`)
View Source
var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9]+(?:[._-][a-z0-9]+)*`)
View Source
var RepositoryNameRegexp = regexp.MustCompile(`(?:` + RepositoryNameComponentRegexp.String() + `/)*` + RepositoryNameComponentRegexp.String())
View Source
var TagNameRegexp = regexp.MustCompile(`[\w][\w.-]{0,127}`)

Functions

func CheckClientStatus

func CheckClientStatus(reqbody []byte) error

func CleanCache

func CleanCache(imageId string)

func CopyImgLayer

func CopyImgLayer(srcPath, srcFile, dstPath, dstFile string, reqbody []byte) (int, error)

func FillRespMsg

func FillRespMsg(result bool, clientreason, serverreason string) models.CompleteMsg

func GetAciPath

func GetAciPath(imageId, acifile string) string

func GetImagePath

func GetImagePath(imageId string) string

func GetManifestPath

func GetManifestPath(imageId string) string

func GetPubkeysPath

func GetPubkeysPath(namespace, repository string) string

func GetSignaturePath

func GetSignaturePath(imageId, signfile string) string

func ParseManifest

func ParseManifest(data []byte) error

func RemoteAddr

func RemoteAddr(r *http.Request) string

func Router

func Router() *mux.Router

func RouterWithPrefix

func RouterWithPrefix(prefix string) *mux.Router

func VerifyAciSignature

func VerifyAciSignature(acipath, signpath, pubkeyspath string) error

codes as below are implemented to support ACI storage

Types

type RouteDescriptor

type RouteDescriptor struct {
	Name string
	Path string
}

type URLBuilder

type URLBuilder struct {
	// contains filtered or unexported fields
}

func NewURLBuilder

func NewURLBuilder(root *url.URL) *URLBuilder

func NewURLBuilderFromRequest

func NewURLBuilderFromRequest(r *http.Request) *URLBuilder

func (*URLBuilder) BuildBlobURL

func (ub *URLBuilder) BuildBlobURL(name string, dgst string) (string, error)

func (*URLBuilder) BuildManifestURL

func (ub *URLBuilder) BuildManifestURL(name, reference string) (string, error)

Jump to

Keyboard shortcuts

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