control

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GoPkgDir = ".gopkg"

GoPkgDir is the directory where gopkg meta files are placed.

Variables

This section is empty.

Functions

func CreateCtrlDirectory

func CreateCtrlDirectory(path, version, uploader string, metadata Metadata) error

CreateCtrlDirectory create a brand new control directory at given path using given details

func ReadCtrlDirectory

func ReadCtrlDirectory(path string) (Metadata, Changelog, error)

ReadCtrlDirectory reads control directory at given path and returns metadata & changelog

Types

type Changelog

type Changelog struct {
	Releases []Release
}

Changelog is the root object containing all package releases

type Metadata

type Metadata struct {
	// The Go import path
	ImportPath string
	// List of the package maintainers
	// i.e who take the responsibility for uploading & managing it
	Maintainers []string
	// The package build dependencies (i.e what we need to pull before building the package)
	BuildDependencies []string `yaml:"build_dependencies"`
	// List of the packages built by this control package
	Packages []Package
}

Metadata represent the package metadata

type Package

type Package struct {
	// The package alias (i.e what the user will use to identify the package)
	Alias string
	// Main is the full path to the file containing the `func main()` sequence
	Main string `yaml:"main,omitempty"`
	// BinName is the name of the binary that will be installed
	BinName string
	// Human description of the package
	Description string
	// Targets describe the build target (os,arches)
	Targets map[string][]string `yaml:"targets,omitempty"`
}

Package represent a package installable

type Release

type Release struct {
	// The package version number (upstream-internal)
	// f.e 1.2.0-1 is the initial release of upstream version 1.2.0.
	Version string
	// Who has taking care of the release upload
	Uploader string
	// The human descriptions of changes applied since last release
	Changes []string
}

Release is produced each time a package is released

Jump to

Keyboard shortcuts

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