storage

package
v0.0.0-...-5342816 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOctOutput

func AddOctOutput(ctx *beegoContext.Context, repo string, data []byte) error

AddOctOutput writes the output to storage

func BC2DC

BC2DC converts beego context to docker context

func ComposeBlobPath

func ComposeBlobPath(repo string, digest string, proto string, protoVersion string) string

ComposeBlobPath composes the blob path from the 'digest, proto, proto version' repo is not used

func ComposeManifestPath

func ComposeManifestPath(repo string, tag string, proto string, protoVersion string) string

ComposeManifestPath composes the manifest path from the 'proto, proto version, repo and tag'

func DeleteBlob

func DeleteBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) error

DeleteBlob deletes the blob TODO we need to get user in ctx, or setting in config

func DeleteManifest

func DeleteManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string) error

DeleteManifest deletes the manifest data TODO we need to get user in ctx, or setting in config

func Driver

func Driver() driver.StorageDriver

Driver returns the storage driver

func GetBlob

func GetBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) ([]byte, error)

GetBlob gets the blob data TODO we need to get user in ctx, or setting in config

func GetManifest

func GetManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string) ([]byte, error)

GetManifest gets the manifest data TODO we need to get user in ctx, or setting in config

func GetOctImage

func GetOctImage(ctx *beegoContext.Context, repo string) ([]byte, error)

GetOctImage returns the image of a repo

func GetOctStatus

func GetOctStatus(ctx *beegoContext.Context, repo string) ([]byte, error)

GetOctStatus returns the status of a repo

func GetRepoPackage

func GetRepoPackage(ctx *context.Context, url string) ([]byte, error)

GetRepoPackage gets the blob data TODO we need to get user in ctx, or setting in config

func HeadBlob

func HeadBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) (driver.FileInfo, error)

HeadBlob return the blob stat TODO we need to get user in ctx, or setting in config

func HeadRepoURL

func HeadRepoURL(ctx *context.Context, url string) (driver.FileInfo, error)

HeadRepoURL return the repo url stat TODO we need to get user in ctx, or setting in config

func HealthRegist

func HealthRegist() error

HealthRegist regists the storage health driver

func InitStorage

func InitStorage(cfg config.StorageConfig) error

InitStorage setups the storage bankends from the config file

func ListRepoDir

func ListRepoDir(ctx *context.Context, url string) ([]string, error)

ListRepoDir lists the content inside a repo directory

func PutBlob

func PutBlob(ctx *context.Context, repo string, proto string, protoVersion string, data []byte) error

PutBlob puts the blob TODO we need to get user in ctx, or setting in config

func PutManifest

func PutManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string, data []byte) error

PutManifest puts the manifest data TODO we need to get user in ctx, or setting in config

func PutPackage

func PutPackage(ctx *context.Context, reponame string, pkgname string, data []byte) error

PutPackage put the blob data to a repo by a name

func PutPackageFromReader

func PutPackageFromReader(ctx *context.Context, reponame string, pkgname string, r io.Reader) (int64, error)

PutPackageFromReader writes the package data to a repo from a reader stream

Types

type Health

type Health struct {
}

Health provides interface for storage health operations

func (*Health) GetStatus

func (sh *Health) GetStatus() (string, string)

GetStatus returns the storage health status

Jump to

Keyboard shortcuts

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