versions

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMatchingPathsFromBucket added in v1.2.0

func GetMatchingPathsFromBucket(client s3resource.S3Client, bucketName string, regex string) ([]string, error)

GetMatchingPathsFromBucket gets all the paths in the S3 bucket `bucketName` which match all the sections of `regex`

`regex` is a forward-slash (`/`) delimited list of regular expressions that must match each corresponding sub-directories and file name for the path to be retained.

The function walks the file tree stored in the S3 bucket `bucketName` and collects the full paths that matches `regex` along the way. It takes care of following only the branches (prefix in S3 terms) that matches with the corresponding section of `regex`.

func MatchUnanchored

func MatchUnanchored(paths []string, pattern string) ([]string, error)

Types

type Extraction

type Extraction struct {
	// path to s3 object in bucket
	Path string

	// parsed version
	Version version.Version

	// the raw version match
	VersionNumber string
}

func Extract

func Extract(path string, pattern string) (Extraction, bool)

type Extractions

type Extractions []Extraction

func GetBucketFileVersions

func GetBucketFileVersions(client s3resource.S3Client, source s3resource.Source) Extractions

func (Extractions) Len

func (e Extractions) Len() int

func (Extractions) Less

func (e Extractions) Less(i int, j int) bool

func (Extractions) Swap

func (e Extractions) Swap(i int, j int)

Jump to

Keyboard shortcuts

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