path

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Separator = "/"
)

Variables

View Source
var (
	EncodedPathRe          = regexp.MustCompile(fmt.Sprintf("^/?%s/%s", reReference, rePath))
	EncodedPathReferenceRe = regexp.MustCompile(fmt.Sprintf("^/?%s$", reReference))

	ErrPathMalformed = errors.New("encoded path is malformed")
)

Functions

func WithRef

func WithRef(path, ref string) string

Types

type Ref

type Ref struct {
	Branch   string
	CommitID graveler.CommitID
}

type ResolvedAbsolutePath

type ResolvedAbsolutePath struct {
	Repo      string
	Reference string
	Path      string
}

func ResolveAbsolutePath

func ResolveAbsolutePath(encodedPath string) (ResolvedAbsolutePath, error)

type ResolvedPath

type ResolvedPath struct {
	Ref      string
	Path     string
	WithPath bool
}

func ResolvePath

func ResolvePath(encodedPath string) (ResolvedPath, error)

Jump to

Keyboard shortcuts

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