context

package
v0.0.0-...-0a0144f Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobDigestFromContext

func BlobDigestFromContext(ctx context.Context) string

BlobDigestFromContext returns a blob digest defined in a context.Context.

func BlobUploadIDFromContext

func BlobUploadIDFromContext(ctx context.Context) string

BlobUploadIDFromContext returns a blob upload id defined in a context.Context.

func NamespaceFromContext

func NamespaceFromContext(ctx context.Context) string

NamespaceFromContext returns a namespace defined in a context.Context.

func ProjectFromContext

func ProjectFromContext(ctx context.Context) string

ProjectFromContext returns a project defined in a context.Context.

func RepoFromContext

func RepoFromContext(ctx context.Context) string

RepoFromContext returns a repository defined in a context.Context.

func WithBlobDigest

func WithBlobDigest(ctx context.Context, digest string) context.Context

WithBlobDigest returns a new context with the provided blob digest.

func WithBlobUploadID

func WithBlobUploadID(ctx context.Context, uploadID string) context.Context

WithBlobUploadID returns a new context with the provided blob upload id.

func WithNamespace

func WithNamespace(ctx context.Context, namespace string) context.Context

WithNamespace returns a new context with the provided namespace.

func WithProject

func WithProject(ctx context.Context, project string) context.Context

WithProject returns a new context with the provided project.

func WithRepo

func WithRepo(ctx context.Context, repo string) context.Context

WithRepo returns a new context with the provided repository.

Types

type Key

type Key string

Key is the internal titan context key.

var BlobDigestKey Key = "blob-digest"

BlobDigestKey is a context namespace for OCI blob digests.

var BlobUploadIDKey Key = "blob-upload-id-key"

BlobUploadIDKey is a context upload id for OCI blobs.

var NamespaceKey Key = "namespace"

NamespaceKey is a context namespace...for namespaces.

var ProjectKey Key = "project"

ProjectKey is a context namespace for projects.

var RepoKey Key = "repository"

RepoKey is a context namespace for repositories.

Jump to

Keyboard shortcuts

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