storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

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

func NewSource

func NewSource(bucketName string) (*Source, error)

NewSource creates a Source given the google cloud bucket's name

func (*Source) DownloadObject

func (s *Source) DownloadObject(obj *storage.ObjectAttrs, dir string) error

func (*Source) FindLatest

func (s *Source) FindLatest(objs []*storage.ObjectAttrs) *storage.ObjectAttrs

func (*Source) FindObjectsForArch

func (s *Source) FindObjectsForArch(objs []*storage.ObjectAttrs) []*storage.ObjectAttrs

FindObjectsForArch searches the provided list of objects and returns the subset, if any, whose name contains references to the local system's architecture, as defined by runtime.GOARCH, in addition to any well-known alternative names for the architecture

func (*Source) FindObjectsForArchAndOS

func (s *Source) FindObjectsForArchAndOS(objs []*storage.ObjectAttrs) []*storage.ObjectAttrs

FindObjectsForArchAndOS searches the provided list of assets and returns the subset, if any, matching the local architecture and OS, as defined by runtime.GOARCH and runtime.GOOS, respectively. In addition to these values, well-known alternatives are also used when searching.

func (*Source) FindObjectsForOS

func (s *Source) FindObjectsForOS(objs []*storage.ObjectAttrs) []*storage.ObjectAttrs

FindObjectsForOS searches the provided list of objects and returns the subset, if any, whose name contains references to the local system's OS, as defined by runtime.GOOS, in addition to any well-known alternative names for the architecture

func (*Source) ListObjects

func (s *Source) ListObjects(prefix string) ([]*storage.ObjectAttrs, error)

ListObjects fetches all objects in the Source's bucket matching the provided prefix Objects are returned in lexigraphical order

Jump to

Keyboard shortcuts

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