bootstrap

package
v0.0.0-...-d78363a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInCache = errors.New("not found in cache")

Functions

func CacheDefault

func CacheDefault() string

func CachedAssets

func CachedAssets(cache, version string) (string, error)

func CanonicalizeHash

func CanonicalizeHash(h hash.Hash) string

func Hash

func Hash() hash.Hash

func NewStorageReader

func NewStorageReader(bucket, version string, auth AuthOption) (*storage.Reader, error)

func NewStorageWriter

func NewStorageWriter(bucket, version string, auth AuthOption, force bool) (*storage.Writer, error)

func ValidateVersion

func ValidateVersion(version string) error

func VersionArchiveName

func VersionArchiveName(version string) string

Types

type AuthOption

type AuthOption int
const (
	AuthNone AuthOption = iota
	AuthAppDefault
	NumAuthOptions
)

func (*AuthOption) Set

func (a *AuthOption) Set(input string) error

func (*AuthOption) String

func (a *AuthOption) String() string

type Hashes

type Hashes map[string]string

func ReadHashesFile

func ReadHashesFile(hashfile string) (Hashes, error)

func (Hashes) Get

func (h Hashes) Get(version string) (string, bool)

func (Hashes) Put

func (h Hashes) Put(version string, hash string, force bool) bool

func (Hashes) WriteToFile

func (h Hashes) WriteToFile(hashfile string) error

Jump to

Keyboard shortcuts

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