indexcache

package
v6.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsWrongType

func IsWrongType(err error) bool

IsWrongType asserts wrongTypeError.

Types

type Config

type Config struct {
	Logger micrologger.Logger

	HTTPClientTimeout time.Duration
}

type Entry

type Entry struct {
	Urls    []string `json:"urls"`
	Version string   `json:"version"`
}

type Index

type Index struct {
	Entries map[string][]Entry `json:"entries"`
}

type Interface

type Interface interface {
	GetIndex(ctx context.Context, url string) (*Index, error)
}

type Resource

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

func New

func New(config Config) (*Resource, error)

func (*Resource) GetIndex

func (r *Resource) GetIndex(ctx context.Context, storageURL string) (*Index, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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