access

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access interface {
	// GetDownloadURL constructs a public download URL for the given blob digest.
	// Note: it does not verify the blob exists.
	GetDownloadURL(digest multihash.Multihash) (url.URL, error)
}

type PatternAccess

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

func NewPatternAccess

func NewPatternAccess(urlPattern string) (*PatternAccess, error)

NewPatternAccess creates a new Access instance for accessing blobs where the URL is created from a string that contains the placeholder pattern: "{blob}".

e.g. "http://localhost:3000/blob/{blob}"

func (*PatternAccess) GetDownloadURL

func (p *PatternAccess) GetDownloadURL(digest multihash.Multihash) (url.URL, error)

GetDownloadURL implements Access.

Jump to

Keyboard shortcuts

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