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

artwork

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Data        []byte
	ContentType string
	Status      string
	MaxAge      time.Duration
}

type Cache

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

func NewCache

func NewCache(root string, options ...Option) (*Cache, error)

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, mbid string) Asset

type Option

type Option func(*Cache)

func WithBaseURL

func WithBaseURL(value string) Option

func WithClock

func WithClock(clock func() time.Time) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

type Provider

type Provider interface {
	Get(context.Context, string) Asset
}

Jump to

Keyboard shortcuts

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