metadata

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMetadata

type AppMetadata struct {
	Version     string
	Name        string
	Description string
	Namespace   string
	Maintainers Maintainers
	Parents     Parents
}

AppMetadata is the format of the data found inside the metadata.yml file

func From

func From(orig AppMetadata, modifiers ...Modifier) AppMetadata

From returns an AppMetadata instance based on the provided AppMetadata and applicable modifier functions

type Maintainer

type Maintainer struct {
	Name  string
	Email string
}

Maintainer represents one of the apps's maintainers

func (Maintainer) String

func (m Maintainer) String() string

String gives a string representation of a maintainer

type Maintainers

type Maintainers []Maintainer

Maintainers is a list of maintainers

func (Maintainers) String

func (ms Maintainers) String() string

String gives a string representation of a list of maintainers

type Modifier

type Modifier func(AppMetadata) AppMetadata

Modifier is a function signature that takes and returns an AppMetadata object

func WithMaintainers

func WithMaintainers(maintainers Maintainers) Modifier

WithMaintainers returns a modified AppMetadata with updated maintainers field

func WithName

func WithName(name string) Modifier

WithName returns a modified AppMetadata with updated name field

func WithNamespace

func WithNamespace(namespace string) Modifier

WithNamespace returns a modified AppMetadata with updated namespace field

type ParentMetadata

type ParentMetadata struct {
	Name        string
	Namespace   string
	Version     string
	Maintainers Maintainers
}

ParentMetadata contains historical data of forked packages

type Parents

type Parents []ParentMetadata

Parents is a list of ParentMetadata items

Jump to

Keyboard shortcuts

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