meta

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: LGPL-2.1 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProjectManifest

func CreateProjectManifest(sourceRoot string, explicitPath string, format string, valuesObj *ValuesObj, force bool) (string, error)

func GenerateGo

func GenerateGo(configObj GoConfigObj) ([]byte, error)

GenerateGo renders the project metadata file (Name/Version/Hash/DateUpdate).

func ValidateGoVersion

func ValidateGoVersion(raw string) error

func ValidateVersion

func ValidateVersion(raw string) error

Types

type GoConfigObj

type GoConfigObj struct {
	PackageName  string
	Name         string
	Version      string
	VersionMajor uint16
	VersionMinor uint16
	VersionPatch uint16
	Hash         string
	DateUpdate   time.Time
}

type Obj

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

func FindProject

func FindProject(sourceRoot string, explicitPath string) (*Obj, bool, error)

func New

func New(sourcePath string) (*Obj, error)

New opens a self-version manifest (values.*) by file or directory.

func NewProject

func NewProject(sourcePath string) (*Obj, error)

NewProject opens a project manifest (meta.*) by file or directory.

func (*Obj) IncrementMajor

func (obj *Obj) IncrementMajor() (string, error)

func (*Obj) IncrementMinor

func (obj *Obj) IncrementMinor() (string, error)

func (*Obj) IncrementPatch

func (obj *Obj) IncrementPatch() (string, error)

func (*Obj) Manifest

func (obj *Obj) Manifest() (*ValuesObj, error)

func (*Obj) ManifestPath

func (obj *Obj) ManifestPath() string

func (*Obj) Name

func (obj *Obj) Name() (string, error)

func (*Obj) PreMajor

func (obj *Obj) PreMajor(preID string) (string, error)

func (*Obj) PreMinor

func (obj *Obj) PreMinor(preID string) (string, error)

func (*Obj) PrePatch

func (obj *Obj) PrePatch(preID string) (string, error)

func (*Obj) Prerelease

func (obj *Obj) Prerelease(preID string) (string, error)

func (*Obj) SourcePath

func (obj *Obj) SourcePath() string

func (*Obj) Stat

func (obj *Obj) Stat() (os.FileInfo, error)

func (*Obj) Validate

func (obj *Obj) Validate() error

func (*Obj) Version

func (obj *Obj) Version() (*VersionObj, error)

func (*Obj) VersionString

func (obj *Obj) VersionString() (string, error)

func (*Obj) Write

func (obj *Obj) Write(valuesObj *ValuesObj, force bool) error

type ValuesObj

type ValuesObj struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Ver  string `json:"ver" yaml:"ver"`
	Hash string `json:"hash,omitempty" yaml:"hash,omitempty"`
}

ValuesObj is shared by project meta.* files and self-version values.* files.

type VersionObj

type VersionObj struct {
	Raw        string
	Major      string
	Minor      uint64
	Patch      uint64
	Prerelease string
	Build      string
}

func ParseVersion

func ParseVersion(raw string) (*VersionObj, error)

func (*VersionObj) IncrementMajor

func (obj *VersionObj) IncrementMajor() error

func (*VersionObj) IncrementMinor

func (obj *VersionObj) IncrementMinor() error

func (*VersionObj) IncrementPatch

func (obj *VersionObj) IncrementPatch() error

func (*VersionObj) IncrementPrerelease

func (obj *VersionObj) IncrementPrerelease(preID string) error

func (*VersionObj) PreMajor

func (obj *VersionObj) PreMajor(preID string) error

func (*VersionObj) PreMinor

func (obj *VersionObj) PreMinor(preID string) error

func (*VersionObj) PrePatch

func (obj *VersionObj) PrePatch(preID string) error

func (*VersionObj) String

func (obj *VersionObj) String() string

Jump to

Keyboard shortcuts

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