specifier

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KindType

type KindType int

KindType is an enum that represents the type of a specifier.

const (
	ToothArchiveKind KindType = iota
	ToothRepoKind
)

type Specifier

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

Specifier is a type that can be used to specify a tooth url/file or a requirement.

func Parse

func Parse(specifierString string) (Specifier, error)

Parse creates a new specifier from the given string.

func (Specifier) IsToothVersionSpecified

func (s Specifier) IsToothVersionSpecified() (bool, error)

IsToothVersionSpecified returns whether the specifier has a tooth version.

func (Specifier) Kind

func (s Specifier) Kind() KindType

Kind returns the type of the specifier.

func (Specifier) String

func (s Specifier) String() string

String returns the string representation of the specifier.

func (Specifier) ToothArchivePath

func (s Specifier) ToothArchivePath() (path.Path, error)

ToothArchivePath returns the path of the tooth archive.

func (Specifier) ToothRepoPath

func (s Specifier) ToothRepoPath() (string, error)

ToothRepoPath returns the tooth repo of the specifier.

func (Specifier) ToothVersion

func (s Specifier) ToothVersion() (semver.Version, error)

ToothVersion returns the version of the tooth.

Jump to

Keyboard shortcuts

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