utils

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBuilderID

func ParseBuilderID(id string, needVersion bool) (string, string, error)

func TagFromGitHubRef

func TagFromGitHubRef(ref string) (string, error)

func ValidateGitHubTagRef

func ValidateGitHubTagRef(tag string) error

Types

type TrustedBuilderID

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

func TrustedBuilderIDNew

func TrustedBuilderIDNew(builderID string) (*TrustedBuilderID, error)

TrustedBuilderIDNew creates a new BuilderID structure.

func (*TrustedBuilderID) Matches

func (b *TrustedBuilderID) Matches(builderID string, allowRef bool) error

Matches matches the builderID string against the reference builderID. If the builderID contains a semver, the full builderID must match. Otherwise, only the name needs to match. `allowRef: true` indicates that the matching need not be an eaxct match. In this case, if the BuilderID version is a GitHub ref `refs/tags/name`, we will consider it equal to user-provided builderID `name`.

func (*TrustedBuilderID) Name

func (b *TrustedBuilderID) Name() string

func (*TrustedBuilderID) String

func (b *TrustedBuilderID) String() string

func (*TrustedBuilderID) Version

func (b *TrustedBuilderID) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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