client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client exposes the semver-manager operations to Go applications.

func New

func New(config Config) *Client

New creates a client. GitHub is used when Platform is empty.

func (*Client) Fetch

func (c *Client) Fetch() ([]models.Version, error)

Fetch reads repository tags, removes the configured prefix, and parses SemVer tags.

func (*Client) Filter

func (c *Client) Filter(versions []models.Version, filters ...filter.FilterFunc) (models.VersionSlice, error)

Filter applies the supplied filters to versions.

func (*Client) FormatRelease

func (c *Client) FormatRelease(version models.Version) string

FormatRelease prefixes a semantic version for use as a repository tag name.

func (*Client) Increment

func (c *Client) Increment(sourceVersions []models.Version, stream models.VersionPattern, level models.Increment) (models.Version, error)

Increment calculates the next version in the requested stream.

func (*Client) Push

func (c *Client) Push(ctx context.Context, version models.Version, target string) error

Push creates a Git tag targeting a commit SHA, a GitHub ref, or local HEAD when target is empty.

func (*Client) Validate

func (c *Client) Validate(version, validatorType string) (bool, error)

Validate validates a version, stripping the configured prefix first.

type Config

type Config struct {
	Owner      string
	Repository string
	Token      string
	Platform   string
	Prefix     string
	LocalPath  string
}

Config contains repository settings and the tag namespace used by the client.

Jump to

Keyboard shortcuts

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