manifest

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: GPL-3.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const Filename = "manifest.toml"

Variables

This section is empty.

Functions

This section is empty.

Types

type DevelopmentStatus

type DevelopmentStatus string
const (
	Planning DevelopmentStatus = "planning"
	PreAlpha DevelopmentStatus = "pre-alpha"
	Alpha    DevelopmentStatus = "alpha"
	Beta     DevelopmentStatus = "beta"
	Stable   DevelopmentStatus = "stable"
	Mature   DevelopmentStatus = "mature"
	Inactive DevelopmentStatus = "inactive"
)

type InformationLoss

type InformationLoss string

InformationLoss in terms of which kind of code generation would they allow.

const (
	// Lossless no information loss converting code to AST and then back to code
	// would. code == codegen(AST(code)).
	Lossless InformationLoss = "lossless"
	// FormatingLoss only superfluous formatting information is lost (e.g.
	// whitespace, indentation). Code generated from the AST could be the same
	// as the original code after passing a code formatter.
	// fmt(code) == codegen(AST(code)).
	FormatingLoss InformationLoss = "formating-loss"
	// SyntacticSugarLoss there is information loss about syntactic sugar. Code
	// generated from the AST could be the same as the original code after
	// desugaring it. desugar(code) == codegen(AST(code)).
	SyntacticSugarLoss InformationLoss = "syntactic-sugar-loss"
	// CommentLoss comments are not present in the AST.
	CommentLoss InformationLoss = "formating-loss"
)

type Manifest

type Manifest struct {
	Language        string            `toml:"language"`
	Version         string            `toml:"version,omitempty"`
	Build           *time.Time        `toml:"build,omitempty"`
	Status          DevelopmentStatus `toml:"status"`
	InformationLoss []InformationLoss `toml:"loss"`
	Documentation   struct {
		Description string `toml:"description,omitempty"`
		Caveats     string `toml:"caveats,omitempty"`
	} `toml:"documentation,omitempty"`
	Runtime struct {
		OS            OS       `toml:"os"`
		NativeVersion Versions `toml:"native_version"`
		GoVersion     string   `toml:"go_version"`
	} `toml:"runtime"`
}

func Load

func Load(path string) (*Manifest, error)

Load reads a manifest and decode the content into a new Manifest struct

func (*Manifest) Decode

func (m *Manifest) Decode(r io.Reader) error

Decode decodes reads r and decodes it into m

func (*Manifest) Encode

func (m *Manifest) Encode(w io.Writer) error

Encode encodes m in toml format and writes the restult to w

type OS

type OS string
const (
	Alpine OS = "alpine"
	Debian OS = "debian"
)

func (OS) AsImage

func (os OS) AsImage() string

type Versions

type Versions []string

func (Versions) String

func (v Versions) String() string

Jump to

Keyboard shortcuts

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