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 `json:"version"` Name string `json:"name"` Description string `json:"description,omitempty"` Namespace string `json:"namespace,omitempty"` Maintainers Maintainers `json:"maintainers,omitempty"` Parents Parents `yaml:",omitempty" json:"parents,omitempty"` }
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
func Load ¶ added in v0.5.0
func Load(data []byte) (AppMetadata, error)
Load validates the given data and loads it into a metadata struct
type Maintainer ¶
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 WithNamespace ¶
WithNamespace returns a modified AppMetadata with updated namespace field
type ParentMetadata ¶
type ParentMetadata struct { Name string `json:"name"` Namespace string `json:"namespace,omitempty"` Version string `json:"version"` Maintainers Maintainers `json:"maintainers,omitempty"` }
ParentMetadata contains historical data of forked packages