specs

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024-2025 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024-2025 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024-2025 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Index

Constants

View Source
const (
	MARKDEVKIT_CONFIGNAME = "mark-devkit"
	MARKDEVKIT_ENV_PREFIX = "MARKDEVKIT"
	MARKDEVKIT_VERSION    = `0.13.2`
)
View Source
const (
	HookOuterPreSourcer = "outer-pre-sourcer"
	HookInnerChroot     = "inner-chroot"
	HookOuterChroot     = "outer-chroot"
	HookOuterPostChroot = "outer-post-chroot"
	HookOuterPreChroot  = "outer-pre-chroot"
	HookOuterPostOutput = "outer-post-output"
)
View Source
const (
	GeneratorBuiltinGitub      = "builtin-github"
	GeneratorBuiltinDirListing = "builtin-dirlisting"
	GeneratorBuiltinNoop       = "builtin-noop"
	GeneratorBuiltinPypi       = "builtin-pypi"

	TmplEngineHelm   = "helm"
	TmplEnginePongo2 = "pongo2"
	TmplEngineJ2cli  = "j2cli"
)
View Source
const (
	CacheDataVersion = "1.0.6"
)

Variables

This section is empty.

Functions

func GenDefault

func GenDefault(viper *v.Viper)

func SanitizeCategory added in v0.5.0

func SanitizeCategory(cat string, slot string) string

Types

type AutogenArtefact added in v0.12.0

type AutogenArtefact struct {
	Use    string            `json:"use,omitempty" yaml:"use,omitempty"`
	SrcUri []string          `json:"src_uri" yaml:"src_uri"`
	Name   string            `json:"name" yaml:"name"`
	Hashes map[string]string `json:"hashes,omitempty" yaml:"hashes,omitempty"`
}

type AutogenAsset added in v0.12.0

type AutogenAsset struct {
	Use     string `json:"use,omitempty" yaml:"use,omitempty"`
	Name    string `json:"name,omitempty" yaml:"name,omitempty"`
	Matcher string `json:"matcher,omitempty" yaml:"matcher,omitempty"`
	Prefix  string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
	Url     string `json:"url,omitempty" yaml:"url,omitempty"`
}

type AutogenAtom added in v0.12.0

type AutogenAtom struct {
	Name     string                  `json:"-" yaml:"-"`
	Tarball  string                  `json:"tarball,omitempty" yaml:"tarball,omitempty"`
	Github   *AutogenGithubProps     `json:"github,omitempty" yaml:"github,omitempty"`
	Dir      *AutogenDirlistingProps `json:"dir,omitempty" yaml:"dir,omitempty"`
	Python   *AutogenPythonOpts      `json:"-,inline" yaml:"-,inline"`
	Vars     map[string]interface{}  `json:"vars,omitempty" yaml:"vars,omitempty"`
	Category string                  `json:"category,omitempty" yaml:"category,omitempty"`

	Template string `json:"template,omitempty" yaml:"template,omitempty"`
	FilesDir string `json:"files_dir,omitempty" yaml:"files_dir,omitempty"`

	Extensions []string        `json:"extensions,omitempty" yaml:"extensions,omitempty"`
	Assets     []*AutogenAsset `json:"assets,omitempty" yaml:"assets,omitempty"`

	Transforms []*AutogenTransform `json:"transform,omitempty" yaml:"transform,omitempty"`
	Selector   []string            `json:"selector,omitempty" yaml:"selector,omitempty"`

	IgnoreArtefacts *bool `json:"ignore_artefacts,omitempty" yaml:"ignore_artefacts,omitempty"`
}

func NewAutogenAtom added in v0.12.0

func NewAutogenAtom(name string) *AutogenAtom

func (*AutogenAtom) Clone added in v0.12.0

func (a *AutogenAtom) Clone() *AutogenAtom

func (*AutogenAtom) GetCategory added in v0.12.0

func (a *AutogenAtom) GetCategory(def *AutogenAtom) string

func (*AutogenAtom) GetTemplate added in v0.12.0

func (a *AutogenAtom) GetTemplate(def *AutogenAtom) string

func (*AutogenAtom) HasAssets added in v0.12.0

func (a *AutogenAtom) HasAssets() bool

func (*AutogenAtom) HasSelector added in v0.12.0

func (a *AutogenAtom) HasSelector() bool

func (*AutogenAtom) HasTransforms added in v0.12.0

func (a *AutogenAtom) HasTransforms() bool

func (*AutogenAtom) Merge added in v0.13.0

func (a *AutogenAtom) Merge(atom *AutogenAtom) *AutogenAtom

type AutogenDefinition added in v0.12.0

type AutogenDefinition struct {
	TemplateEngine *AutogenTemplateEngine    `json:"template,omitempty" yaml:"template,omitempty"`
	Generator      string                    `json:"generator,omitempty" yaml:"generator,omitempty"`
	Defaults       *AutogenAtom              `json:"defaults,omitempty" yaml:"defaults,omitempty"`
	Packages       []map[string]*AutogenAtom `json:"packages,omitempty" yaml:"packages,omitempty"`
}

type AutogenDirlistingProps added in v0.12.0

type AutogenDirlistingProps struct {
	Url             string `json:"url,omitempty" yaml:"url,omitempty"`
	Matcher         string `json:"matcher,omitempty" yaml:"matcher,omitempty"`
	ExcludesMatcher string `json:"exclude,omitempty" yaml:"exclude,omitempty"`
}

type AutogenGithubProps added in v0.12.0

type AutogenGithubProps struct {
	User  string `json:"user,omitempty" yaml:"user,omitempty"`
	Repo  string `json:"repo,omitempty" yaml:"repo,omitempty"`
	Query string `json:"query,omitempty" yaml:"query,omitempty"`

	PerPage  *int `json:"per_page,omitempty" yaml:"per_page,omitempty"`
	Page     *int `json:"page,omitempty" yaml:"page,omitempty"`
	NumPages *int `json:"num_pages,omitempty" yaml:"num_pages,omitempty"`
}

type AutogenPythonOpts added in v0.13.0

type AutogenPythonOpts struct {
	PythonCompat         string              `json:"python_compat,omitempty" yaml:"python_compat,omitempty"`
	PythonRequiresIgnore string              `json:"python_requires_ignore,omitempty" yaml:"python_requires_ignore,omitempty"`
	PypiName             string              `json:"pypi_name,omitempty" yaml:"pypi_name,omitempty"`
	DistutilsPEP517      string              `json:"du_pep517,omitempty" yaml:"du_pep517,omitempty"`
	Pydeps               map[string][]string `json:"pydeps,omitempty" yaml:"pydeps,omitempty"`
}

type AutogenSpec added in v0.12.0

type AutogenSpec struct {
	File string `json:"-" yaml:"-"`

	Version     string                        `json:"version,omitempty" yaml:"version,omitempty"`
	Definitions map[string]*AutogenDefinition `json:"-,inline" yaml:"-,inline"`
}

func NewAutogenSpec added in v0.12.0

func NewAutogenSpec() *AutogenSpec

func (*AutogenSpec) HasGithubGenerators added in v0.12.0

func (a *AutogenSpec) HasGithubGenerators() bool

func (*AutogenSpec) LoadFile added in v0.12.0

func (a *AutogenSpec) LoadFile(file string) error

func (*AutogenSpec) LoadYaml added in v0.12.0

func (a *AutogenSpec) LoadYaml(data []byte, file string) error

func (*AutogenSpec) Prepare added in v0.12.0

func (a *AutogenSpec) Prepare()

type AutogenTemplateEngine added in v0.12.0

type AutogenTemplateEngine struct {
	Engine string   `json:"engine,omitempty" yaml:"engine,omitempty"`
	Opts   []string `json:"opts,omitempty" yaml:"opts,omitempty"`
}

type AutogenTransform added in v0.12.0

type AutogenTransform struct {
	Kind    string `json:"kind,omitempty" yaml:"kind,omitempty"`
	Match   string `json:"match,omitempty" yaml:"match,omitempty"`
	Replace string `json:"replace,omitempty" yaml:"replace,omitempty"`
}

type Bind

type Bind struct {
	Source string `yaml:"source,omitempty" json:"source,omitempty"`
	Target string `yaml:"target,omitempty" json:"target,omitempty"`
}

type DistfilesSpec added in v0.7.0

type DistfilesSpec struct {
	*MergeKit       `json:"-,inline" yaml:"-,inline"`
	FallbackMirrors []*MergeKitThirdPartyMirror `json:"fallback_mirrors,omitempty" yaml:"fallback_mirrors,omitempty"`
}

func NewDistfilesSpec added in v0.7.0

func NewDistfilesSpec() *DistfilesSpec

func (*DistfilesSpec) LoadFile added in v0.7.0

func (d *DistfilesSpec) LoadFile(file string) error

func (*DistfilesSpec) LoadYaml added in v0.7.0

func (d *DistfilesSpec) LoadYaml(data []byte, file string) error

type EnvVar

type EnvVar struct {
	Key   string `yaml:"key" json:"key"`
	Value string `yaml:"value" json:"value"`
}

type Hook

type Hook struct {
	File        string   `yaml:"-" json:"-"`
	Name        string   `yaml:"name,omitempty" json:"name,omitempty"`
	Description string   `yaml:"description,omitempty" json:"description,omitempty"`
	Type        HookType `yaml:"type,omitempty" json:"type,omitempty"`
	Commands    []string `yaml:"commands,omitempty" json:"commands,omitempty"`
	Entrypoint  []string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`

	Binds []Bind `yaml:"chroot_binds,omitempty" json:"chroot_binds,omitempty"`
}

func NewHookFromYaml

func NewHookFromYaml(data []byte, file string) (*Hook, error)

func (*Hook) GetBinds

func (h *Hook) GetBinds() []Bind

func (*Hook) GetCommands

func (h *Hook) GetCommands() []string

func (*Hook) GetDescription

func (h *Hook) GetDescription() string

func (*Hook) GetEntrypoint

func (h *Hook) GetEntrypoint() []string

func (*Hook) GetFile

func (h *Hook) GetFile() string

func (*Hook) GetName

func (h *Hook) GetName() string

func (*Hook) GetType

func (h *Hook) GetType() HookType

type HookFile

type HookFile struct {
	File  string `yaml:"-" json:"-"`
	Hooks []Hook `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}

func NewHookFileFromFile

func NewHookFileFromFile(file string, opts map[string]interface{}) (*HookFile, error)

func NewHookFileFromYaml

func NewHookFileFromYaml(data []byte, file string) (*HookFile, error)

func (*HookFile) GetFile

func (h *HookFile) GetFile() string

func (*HookFile) GetHooks

func (h *HookFile) GetHooks() *[]Hook

type HookType

type HookType string

type Job

type Job struct {
	Name   string    `yaml:"name" json:"name"`
	Source JobSource `yaml:"source,omitempty" json:"source,omitempty"`
	Output JobOutput `yaml:"output,omitempty" json:"omitempty,omitempty"`

	Options map[string]interface{} `yaml:"options,omitempty" json:"options,omitempty"`
	Envs    []*EnvVar              `yaml:"environments,omitempty" json:"environments,omitempty"`

	ChrootBinds []Bind `yaml:"chroot_binds,omitempty" json:"chroot_binds,omitempty"`

	WorkspaceDir string   `yaml:"workspacedir,omitempty" json:"workspacedir,omitempty"`
	HooksBasedir string   `yaml:"hooks_basedir,omitempty" json:"hooks_basedir,omitempty"`
	Hooks        []string `yaml:"hooks_files,omitempty" json:"hooks_files,omitempty"`
}

func (*Job) Render

func (j *Job) Render(specfile string) (*JobRendered, error)

type JobOutput

type JobOutput struct {
	Type string `yaml:"type,omitempty" json:"type,omitempty"`
	Name string `yaml:"name,omitempty" json:"name,omitempty"`
	Dir  string `yaml:"dir,omitempty" json:"dir,omitempty"`

	TarformersSpec *tarf_specs.SpecFile `yaml:"tarformers_specs,omitempty" json:"tarformers_specs,omitempty"`
}

type JobRendered

type JobRendered struct {
	*Job
	HookFile []*HookFile `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}

func (*JobRendered) GetBindsMap

func (j *JobRendered) GetBindsMap() map[string]string

func (*JobRendered) GetOptionsEnvsMap

func (j *JobRendered) GetOptionsEnvsMap() map[string]string

func (*JobRendered) GetPostChrootHooks

func (j *JobRendered) GetPostChrootHooks() *[]*Hook

func (*JobRendered) GetPostOutputHooks added in v0.4.0

func (j *JobRendered) GetPostOutputHooks() *[]*Hook

func (*JobRendered) GetPreChrootHooks

func (j *JobRendered) GetPreChrootHooks() *[]*Hook

func (*JobRendered) GetPreSourcesHooks added in v0.3.0

func (j *JobRendered) GetPreSourcesHooks() *[]*Hook

func (*JobRendered) Json

func (j *JobRendered) Json() ([]byte, error)

func (*JobRendered) Yaml

func (j *JobRendered) Yaml() ([]byte, error)

type JobSource

type JobSource struct {
	Type   string `yaml:"type,omitempty" json:"type,omitempty"`
	Uri    string `yaml:"uri,omitempty" json:"uri,omitempty"`
	Path   string `yaml:"path,omitempty" json:"path,omitempty"`
	Target string `yaml:"target,omitempty" json:"target,omitempty"`

	// Anisie specific options
	AniseConfigPath   string   `yaml:"anise_config,omitempty" json:"anise_config,omitempty"`
	AniseRepositories []string `yaml:"anise_repos,omitempty" json:"anise_repos,omitempty"`
	AnisePackages     []string `yaml:"anise_packages,omitempty" json:"anise_packages,omitempty"`
}

type KitRelease added in v0.5.0

type KitRelease struct {
	Sources []*ReposcanKit   `yaml:"sources,omitempty" json:"sources,omitempty"`
	Target  KitReleaseTarget `yaml:"target,omitempty" json:"target,omitempty"`
	MainKit string           `yaml:"main_kit,omitempty" json:"main_kit,omitempty"`
}

func (*KitRelease) GetMainKit added in v0.5.0

func (r *KitRelease) GetMainKit() string

func (*KitRelease) GetTargetKit added in v0.5.0

func (r *KitRelease) GetTargetKit() (*ReposcanKit, error)

type KitReleaseSpec added in v0.5.0

type KitReleaseSpec struct {
	Release *KitRelease `yaml:"release,omitempty" json:"release,omitempty"`

	File string `yaml:"-" json:"-"`
}

func NewKitReleaseSpec added in v0.5.0

func NewKitReleaseSpec() *KitReleaseSpec

func (*KitReleaseSpec) GetSourceKit added in v0.5.0

func (r *KitReleaseSpec) GetSourceKit(name string) *ReposcanKit

func (*KitReleaseSpec) LoadFile added in v0.5.0

func (r *KitReleaseSpec) LoadFile(file string) error

func (*KitReleaseSpec) LoadYaml added in v0.5.0

func (r *KitReleaseSpec) LoadYaml(data []byte, file string) error

type KitReleaseTarget added in v0.5.0

type KitReleaseTarget struct {
	Name   string `yaml:"name" json:"name"`
	Url    string `yaml:"url,omitempty" json:"url,omitempty"`
	Branch string `yaml:"branch" json:"branch"`
}

type MarkDevkitAuthentication added in v0.12.0

type MarkDevkitAuthentication struct {
	Remotes map[string]*MarkDevkitRemoteAuth `mapstructure:"-,inline" json:"-,inline" yaml:"-,inline"`
}

func (*MarkDevkitAuthentication) GetRemote added in v0.12.0

type MarkDevkitConfig

type MarkDevkitConfig struct {
	Viper *v.Viper `yaml:"-" json:"-"`

	General        MarkDevkitGeneral        `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"`
	Logging        MarkDevkitLogging        `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"`
	Authentication MarkDevkitAuthentication `mapstructure:"authentication" json:"authentication,omitempty" yaml:"authentication,omitempty"`
}

func NewMarkDevkitConfig

func NewMarkDevkitConfig(viper *v.Viper) *MarkDevkitConfig

func (*MarkDevkitConfig) GetAuthentication added in v0.12.0

func (c *MarkDevkitConfig) GetAuthentication() *MarkDevkitAuthentication

func (*MarkDevkitConfig) GetGeneral

func (c *MarkDevkitConfig) GetGeneral() *MarkDevkitGeneral

func (*MarkDevkitConfig) GetLogging

func (c *MarkDevkitConfig) GetLogging() *MarkDevkitLogging

func (*MarkDevkitConfig) Unmarshal

func (c *MarkDevkitConfig) Unmarshal() error

func (*MarkDevkitConfig) Yaml

func (c *MarkDevkitConfig) Yaml() ([]byte, error)

type MarkDevkitGeneral

type MarkDevkitGeneral struct {
	Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"`
}

func (*MarkDevkitGeneral) HasDebug

func (g *MarkDevkitGeneral) HasDebug() bool

type MarkDevkitLogging

type MarkDevkitLogging struct {
	// Path of the logfile
	Path string `mapstructure:"path,omitempty" json:"path,omitempty" yaml:"path,omitempty"`
	// Enable/Disable logging to file
	EnableLogFile bool `mapstructure:"enable_logfile,omitempty" json:"enable_logfile,omitempty" yaml:"enable_logfile,omitempty"`
	// Enable JSON format logging in file
	JsonFormat bool `mapstructure:"json_format,omitempty" json:"json_format,omitempty" yaml:"json_format,omitempty"`

	// Log level
	Level string `mapstructure:"level,omitempty" json:"level,omitempty" yaml:"level,omitempty"`

	// Enable emoji
	EnableEmoji bool `mapstructure:"enable_emoji,omitempty" json:"enable_emoji,omitempty" yaml:"enable_emoji,omitempty"`
	// Enable/Disable color in logging
	Color bool `mapstructure:"color,omitempty" json:"color,omitempty" yaml:"color,omitempty"`
}

type MarkDevkitRemoteAuth added in v0.12.0

type MarkDevkitRemoteAuth struct {
	Username   string `mapstructure:"username,omitempty" json:"username,omitempty" yaml:"username,omitempty"`
	Password   string `mapstructure:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty"`
	Token      string `mapstructure:"token,omitempty" json:"token,omitempty" yaml:"token,omitempty"`
	ApiVersion string `mapstructure:"api_version,omitempty" json:"api_version,omitempty" yaml:"api_version,omitempty"`
	Url        string `mapstructure:"url,omitempty" json:"url,omitempty" yaml:"url,omitempty"`
}

type MergeKit added in v0.5.0

type MergeKit struct {
	Sources []*ReposcanKit `yaml:"sources,omitempty" json:"sources,omitempty"`
	Target  MergeKitTarget `yaml:"target,omitempty" json:"target,omitempty"`

	File string `yaml:"-" json:"-"`
}

func NewMergeKit added in v0.5.0

func NewMergeKit() *MergeKit

func (*MergeKit) GetEclassesInclude added in v0.5.0

func (m *MergeKit) GetEclassesInclude() *map[string][]string

func (*MergeKit) GetFixupsInclude added in v0.5.0

func (m *MergeKit) GetFixupsInclude() *[]*MergeKitFixupInclude

func (*MergeKit) GetMetadata added in v0.5.0

func (m *MergeKit) GetMetadata() *MergeKitMetadata

func (*MergeKit) GetSourceKit added in v0.5.0

func (m *MergeKit) GetSourceKit(name string) *ReposcanKit

func (*MergeKit) GetTargetKit added in v0.5.0

func (m *MergeKit) GetTargetKit() (*ReposcanKit, error)

func (*MergeKit) LoadFile added in v0.5.0

func (m *MergeKit) LoadFile(file string) error

func (*MergeKit) LoadYaml added in v0.5.0

func (m *MergeKit) LoadYaml(data []byte, file string) error

type MergeKitAtom added in v0.5.0

type MergeKitAtom struct {
	Package     string   `yaml:"pkg,omitempty" json:"pkg,omitempty"`
	MaxVersions *int     `yaml:"max_versions,omitempty" json:"max_versions,omitempty"`
	Conditions  []string `yaml:"conditions,omitempty" json:"conditions,omitempty"`
	Versions    []string `yaml:"versions,omitempty" json:"versions,omitempty"`
}

type MergeKitEclasses added in v0.5.0

type MergeKitEclasses struct {
	Include map[string][]string `yaml:"include,omitempty" json:"include,omitempty"`
}

type MergeKitFixupInclude added in v0.5.0

type MergeKitFixupInclude struct {
	Dir  string `yaml:"dir,omitempty" json:"dir,omitempty"`
	To   string `yaml:"to,omitempty" json:"to,omitempty"`
	File string `yaml:"file,omitempty" json:"file,omitempty"`
	Name string `yaml:"name,omitempty" json:"name,omitempty"`
}

func (*MergeKitFixupInclude) GetName added in v0.6.0

func (f *MergeKitFixupInclude) GetName() string

func (*MergeKitFixupInclude) GetType added in v0.6.0

func (f *MergeKitFixupInclude) GetType() string

type MergeKitFixups added in v0.5.0

type MergeKitFixups struct {
	Include []*MergeKitFixupInclude `yaml:"include,omitempty" json:"include,omitempty"`
}

type MergeKitMetadata added in v0.5.0

type MergeKitMetadata struct {
	LayoutMasters          string   `yaml:"layout_masters,omitempty" json:"layout_masters,omitempty"`
	Aliases                []string `yaml:"aliases,omitempty" json:"aliases,omitempty"`
	ManifestHashes         []string `yaml:"manifest_hashes,omitempty" json:"manifest_hashes,omitempty"`
	ManifestRequiredHashes []string `yaml:"manifest_required_hashes,omitempty" json:"manifest_required_hashes,omitempty"`
}

func (*MergeKitMetadata) GetLayoutMasters added in v0.5.0

func (m *MergeKitMetadata) GetLayoutMasters() string

func (*MergeKitMetadata) HasAliases added in v0.5.0

func (m *MergeKitMetadata) HasAliases() bool

func (*MergeKitMetadata) HasManifestHashes added in v0.8.0

func (m *MergeKitMetadata) HasManifestHashes() bool

func (*MergeKitMetadata) HashManifestReqHashes added in v0.8.0

func (m *MergeKitMetadata) HashManifestReqHashes() bool

type MergeKitTarget added in v0.5.0

type MergeKitTarget struct {
	Name   string `yaml:"name" json:"name"`
	Url    string `yaml:"url,omitempty" json:"url,omitempty"`
	Branch string `yaml:"branch" json:"branch"`

	Eclasses          *MergeKitEclasses           `yaml:"eclasses,omitempty" json:"eclasses,omitempty"`
	Metadata          *MergeKitMetadata           `yaml:"metadata,omitempty" json:"metadata,omitempty"`
	ThirdpartyMirrors []*MergeKitThirdPartyMirror `yaml:"thirdpartymirrors,omitempty" json:"thirdpartymirrors,omitempty"`
	Fixups            *MergeKitFixups             `yaml:"fixups,omitempty" json:"fixups,omitempty"`

	AtomDefaults *MergeKitAtom   `yaml:"atoms_defaults,omitempty" json:"atoms_defaults,omitempty"`
	Atoms        []*MergeKitAtom `yaml:"atoms,omitempty" json:"atoms,omitempty"`
}

func (*MergeKitTarget) GetThirdpartyMirrorsUris added in v0.7.0

func (m *MergeKitTarget) GetThirdpartyMirrorsUris(alias string) []string

type MergeKitThirdPartyMirror added in v0.5.0

type MergeKitThirdPartyMirror struct {
	Alias  string        `yaml:"alias,omitempty" json:"alias,omitempty"`
	Uri    []string      `yaml:"uri,omitempty" json:"uri,omitempty"`
	Layout *MirrorLayout `yaml:"layout,omitempty" json:"layout,omitempty"`
}

type MetaKitInfo added in v0.5.0

type MetaKitInfo struct {
	KitOrder    []string                  `yaml:"kit_order,omitempty" json:"kit_order,omitempty"`
	KitSettings map[string]MetaKitSetting `yaml:"kit_settings,omitempty" json:"kit_settings,omitempty"`
	ReleaseDefs map[string][]string       `yaml:"release_defs,omitempty" json:"release_defs,omitempty"`
	ReleaseInfo *MetaReleaseInfo          `yaml:"release_info,omitempty" json:"release_info,omitempty"`
}

kit-info.json structure

func (*MetaKitInfo) Json added in v0.5.0

func (i *MetaKitInfo) Json() ([]byte, error)

type MetaKitSetting added in v0.5.0

type MetaKitSetting struct {
	Stability map[string]string `yaml:"stability,omitempty" json:"stability,omitempty"`
	Type      string            `yaml:"type,omitempty" json:"type,omitempty"`
}

type MetaKitSha1 added in v0.5.0

type MetaKitSha1 struct {
	Kits map[string]map[string]interface{} `yaml:"-,inline" json:"-,inline"`
}

kit-sha1.json structure

func (*MetaKitSha1) Json added in v0.5.0

func (i *MetaKitSha1) Json() ([]byte, error)

type MetaKitShaValue added in v0.5.0

type MetaKitShaValue struct {
	Sha1  string `yaml:"sha1,omitempty" json:"sha1,omitempty"`
	Depth *int   `yaml:"depth,omitempty" json:"depth,omitempty"`
}

Instead of directly define the sha1 of a branch is possible define the depth and the sha1 together. This struct is used as value of the MetaKitSha1 map interface.

type MetaReleaseInfo added in v0.5.0

type MetaReleaseInfo struct {
	Required []map[string]string `yaml:"required,omitempty" json:"required,omitempty"`
	Version  int                 `yaml:"version,omitempty" json:"version,omitempty"`
}

Used by kit-info.json and version.json

func (*MetaReleaseInfo) Json added in v0.5.0

func (r *MetaReleaseInfo) Json() ([]byte, error)

type MetroSpec

type MetroSpec struct {
	Version string `yaml:"version,omitempty" json:"version,omitempty"`
	Jobs    []Job  `yaml:"jobs,omitempty" json:"jobs,omitempty"`

	File string `yaml:"-" json:"-"`
}

func NewMetroSpec

func NewMetroSpec() *MetroSpec

func (*MetroSpec) GetJob

func (s *MetroSpec) GetJob(name string) *Job

func (*MetroSpec) LoadYaml

func (s *MetroSpec) LoadYaml(data []byte, file string) error

type MirrorLayout added in v0.7.0

type MirrorLayout struct {
	Modes []*MirrorLayoutMode `json:"modes" yaml:"modes"`
}

type MirrorLayoutMode added in v0.7.0

type MirrorLayoutMode struct {
	Type     string `json:"type" yaml:"type"`
	Hash     string `json:"hash,omitempty" yaml:"hash,omitempty"`
	HashMode string `json:"hash_mode,omitempty" yaml:"hash_mode,omitempty"`
}

func (*MirrorLayoutMode) GetAtomPath added in v0.7.0

func (l *MirrorLayoutMode) GetAtomPath(fileName, fileSha512, fileBlake2b string) (ans string)

type PypiDownloadsInfo added in v0.13.0

type PypiDownloadsInfo struct {
	LastDay   *int `json:"last_day,omitempty" yaml:"last_day,omitempty"`
	LastMonth *int `json:"last_month,omitempty" yaml:"last_month,omitempty"`
	LastWeek  *int `json:"last_week,omitempty" yaml:"last_week,omitempty"`
}

type PypiMetadata added in v0.13.0

type PypiMetadata struct {
	Info       *PypiPackageInfo              `json:"info,omitempty" yaml:"info,omitempty"`
	LastSerial *int                          `json:"last_serial,omitempty" yaml:"last_serial,omitempty"`
	Releases   map[string][]*PypiReleaseFile `json:"releases,omitempty" yaml:"releases,omitempty"`
	// Files of the last releases
	Urls []*PypiReleaseFile `json:"urls,omitempty" yaml:"urls,omitempty"`
}

func NewPypiMetadata added in v0.13.0

func NewPypiMetadata() *PypiMetadata

func (*PypiMetadata) GetInfo added in v0.13.0

func (p *PypiMetadata) GetInfo() *PypiPackageInfo

func (*PypiMetadata) GetReleaseFiles added in v0.13.0

func (p *PypiMetadata) GetReleaseFiles(version, packagetype string) []*PypiReleaseFile

func (*PypiMetadata) GetVersions added in v0.13.0

func (p *PypiMetadata) GetVersions(pythonCompat string) []string

func (*PypiMetadata) Json added in v0.13.0

func (p *PypiMetadata) Json() ([]byte, error)

func (*PypiMetadata) Yaml added in v0.13.0

func (p *PypiMetadata) Yaml() ([]byte, error)

type PypiPackageInfo added in v0.13.0

type PypiPackageInfo struct {
	Author                 string             `json:"author,omitempty" yaml:"author,omitempty"`
	AuthorEmail            string             `json:"author_email,omitempty" yaml:"author_email,omitempty"`
	BugtrackUrl            string             `json:"bugtrack_url,omitempty" yaml:"bugtrack_url,omitempty"`
	Classifiers            []string           `json:"classifiers,omitempty" yaml:"classifiers,omitempty"`
	Description            string             `json:"description,omitempty" yaml:"description,omitempty'`
	DescriptionContentType string             `json:"description_content_type,omitempty" yaml:"description_content_type,omitempty"`
	DocsUrl                string             `json:"docs_url,omitempty" yaml:"docs_url,omitempty"`
	DownloadUrl            string             `json:"download_url,omitempty,omitempty" yaml:"download_url,omitempty"`
	Downloads              *PypiDownloadsInfo `json:"downloads,omitempty" yaml:"downloads,omitempty"`
	Homepage               string             `json:"homepage,omitempty" yaml:"homepage,omitempty"`
	Keywords               string             `json:"keywords,omitempty" yaml:"keywords,omitempty"`
	License                string             `json:"license,omitempty" yaml:"license,omitempty"`
	LicenseExpr            string             `json:"license_expression,omitempty" yaml:"license_expression,omitempty"`
	Maintainer             string             `json:"maintainer,omitempty" yaml:"maintainer,omitempty"`
	MaintainerEmail        string             `json:"maintainer_email,omitempty" yaml:"maintainer_email,omitempty"`
	Name                   string             `json:"name,omitempty" yaml:"name,omitempty"`
	PackageUrl             string             `json:"package_url,omitempty" yaml:"package_url,omitempty"`
	Platform               string             `json:"platform,omitempty" yaml:"platform,omitempty"`
	ProjectUrl             string             `json:"project_url,omitempty" yaml:"project_url,omitempty"`
	ProjectUrls            map[string]string  `json:"project_urls,omitempty" yaml:"project_urls,omitempty"`
	ReleaseUrl             string             `json:"release_url,omitempty" yaml:"release_url,omitempty"`
	RequiresDist           []string           `json:"requires_dist,omitempty" yaml:"requires_dist,omitempty"`
	RequiresPython         string             `json:"requires_python,omitempty" yaml:"requires_python,omitempty"`
	Summary                string             `json:"summary,omitempty" yaml:"summary,omitempty"`
	Version                string             `json:"version,omitempty" yaml:"version,omitempty"`
	Yanked                 bool               `json:"yanked,omitempty" yaml:"yanked,omitempty"`
	YankedReason           string             `json:"yanked_reason,omitempty" yaml:"yanked_reason,omitempty"`
}

type PypiReleaseFile added in v0.13.0

type PypiReleaseFile struct {
	CommentText string            `json:"comment_text,omitempty" yaml:"comment_text,omitempty"`
	Digests     map[string]string `json:"digests,omitempty" yaml:"digests,omitempty"`
	Downloads   *int              `json:"downloads,omitempty" yaml:"downloads,omitempty"`
	Filename    string            `json:"filename,omitempty" yaml:"filename,omitempty"`
	HasSig      bool              `json:"has_sig,omitempty" yaml:"has_sig,omitempty"`
	Md5Digest   string            `json:"md5_digest,omitempty" yaml:"md5_digest,omitempty"`
	// Type: sdist (source)|bdist_wheel
	PackageType       string `json:"packagetype,omitempty" yaml:"packagetype,omitempty"`
	PythonVersion     string `json:"python_version,omitempty" yaml:"python_version,omitempty"`
	RequiresPython    string `json:"requires_python,omitempty" yaml:"requires_python,omitempty"`
	Size              int    `json:"size,omitempty" yaml:"size,omitempty"`
	UploadTime        string `json:"upload_time,omitempty" yaml:"upload_time,omitempty"`
	UploadTimeIso8601 string `json:"upload_time_iso_8901,omitempty" yaml:"upload_time_iso_8901,omitempty"`
	Url               string `json:"url,omitempty" yaml:"url,omitempty'`
	Yanked            bool   `json:"yanked,omitempty" yaml:"yanked,omitempty"`
	YankedReason      string `json:"yanked_reason,omitempty" yaml:"yanked_reason,omitempty"`
}

type PythonDep added in v0.13.0

type PythonDep struct {
	Use        string                `json:"use,omitempty" yaml:"use,omitempty"`
	PyVersions []string              `json:"py_versions,omitempty" yaml:"py_versions,omitempty"`
	Dependency *gentoo.GentooPackage `json:"dep,omitempty" yaml:"dep,omitempty"`
}

type RepoScanAtom added in v0.5.0

type RepoScanAtom struct {
	Atom string `json:"atom,omitempty" yaml:"atom,omitempty"`

	Category string     `json:"category,omitempty" yaml:"category,omitempty"`
	Package  string     `json:"package,omitempty" yaml:"package,omitempty"`
	Revision string     `json:"revision,omitempty" yaml:"revision,omitempty"`
	CatPkg   string     `json:"catpkg,omitempty" yaml:"catpkg,omitempty"`
	Eclasses [][]string `json:"eclasses,omitempty" yaml:"eclasses,omitempty"`

	Kit    string `json:"kit,omitempty" yaml:"kit,omitempty"`
	Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`

	// Relations contains the list of the keys defined on
	// relations_by_kind. The values could be RDEPEND, DEPEND, BDEPEND
	Relations       []string            `json:"relations,omitempty" yaml:"relations,omitempty"`
	RelationsByKind map[string][]string `json:"relations_by_kind,omitempty" yaml:"relations_by_kind,omitempty"`

	// Metadata contains ebuild variables.
	// Ex: SLOT, SRC_URI, HOMEPAGE, etc.
	Metadata    map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	MetadataOut string            `json:"metadata_out,omitempty" yaml:"metadata_out,omitempty"`

	ManifestMd5 string `json:"manifest_md5,omitempty" yaml:"manifest_md5,omitempty"`
	Md5         string `json:"md5,omitempty" yaml:"md5,omitempty"`

	// Fields present on failure
	Status string `json:"status,omitempty" yaml:"status,omitempty"`
	Output string `json:"output,omitempty" yaml:"output,omitempty"`

	Files []RepoScanFile `json:"files,omitempty" yaml:"files,omitempty"`
}

func (*RepoScanAtom) AddRelations added in v0.5.0

func (r *RepoScanAtom) AddRelations(pkgname string)

func (*RepoScanAtom) AddRelationsByKind added in v0.5.0

func (r *RepoScanAtom) AddRelationsByKind(kind, pkgname string)

func (*RepoScanAtom) GetBuildtimeDeps added in v0.5.0

func (r *RepoScanAtom) GetBuildtimeDeps() ([]gentoo.GentooPackage, error)

func (*RepoScanAtom) GetCategory added in v0.5.0

func (r *RepoScanAtom) GetCategory() string

func (*RepoScanAtom) GetMetadataValue added in v0.5.0

func (r *RepoScanAtom) GetMetadataValue(k string) string

func (*RepoScanAtom) GetPackageName added in v0.5.0

func (r *RepoScanAtom) GetPackageName() string

func (*RepoScanAtom) GetRuntimeDeps added in v0.5.0

func (r *RepoScanAtom) GetRuntimeDeps() ([]gentoo.GentooPackage, error)

func (*RepoScanAtom) HasFile added in v0.9.0

func (r *RepoScanAtom) HasFile(name string) bool

func (*RepoScanAtom) HasMetadataKey added in v0.5.0

func (r *RepoScanAtom) HasMetadataKey(k string) bool

func (*RepoScanAtom) Json added in v0.5.0

func (r *RepoScanAtom) Json() (string, error)

func (*RepoScanAtom) ToGentooPackage added in v0.5.0

func (r *RepoScanAtom) ToGentooPackage() (*gentoo.GentooPackage, error)

func (*RepoScanAtom) Yaml added in v0.5.0

func (r *RepoScanAtom) Yaml() (string, error)

type RepoScanFile added in v0.5.0

type RepoScanFile struct {
	SrcUri []string          `json:"src_uri" yaml:"src_uri"`
	Size   string            `json:"size" yaml:"size"`
	Hashes map[string]string `json:"hashes" yaml:"hashes"`
	Name   string            `json:"name" yaml:"name"`
}

type RepoScanSpec added in v0.5.0

type RepoScanSpec struct {
	CacheDataVersion string                  `json:"cache_data_version" yaml:"cache_data_version"`
	Atoms            map[string]RepoScanAtom `json:"atoms" yaml:"atoms"`
	MetadataErrors   map[string]RepoScanAtom `json:"metadata_errors,omitempty" yaml:"metadata_errors,omitempty"`

	File string `json:"-"`
}

func (*RepoScanSpec) Json added in v0.5.0

func (r *RepoScanSpec) Json() (string, error)

func (*RepoScanSpec) WriteJsonFile added in v0.5.0

func (r *RepoScanSpec) WriteJsonFile(f string) error

func (*RepoScanSpec) Yaml added in v0.5.0

func (r *RepoScanSpec) Yaml() (string, error)

type ReposcanAnalysis added in v0.5.0

type ReposcanAnalysis struct {
	Kits []*ReposcanKit `yaml:"sources,omitempty" json:"sources,omitempty"`
}

func NewReposcanAnalysis added in v0.5.0

func NewReposcanAnalysis(file string) (*ReposcanAnalysis, error)

func (*ReposcanAnalysis) GetKitsEclassDirs added in v0.8.1

func (ra *ReposcanAnalysis) GetKitsEclassDirs(cloneDir string) ([]string, error)

func (*ReposcanAnalysis) Json added in v0.5.0

func (ra *ReposcanAnalysis) Json() ([]byte, error)

func (*ReposcanAnalysis) WriteYamlFile added in v0.5.0

func (ra *ReposcanAnalysis) WriteYamlFile(file string) error

func (*ReposcanAnalysis) Yaml added in v0.5.0

func (ra *ReposcanAnalysis) Yaml() ([]byte, error)

type ReposcanKit added in v0.5.0

type ReposcanKit struct {
	Name       string `yaml:"name,omitempty" json:"name,omitempty"`
	Url        string `yaml:"url,omitempty" json:"url,omitempty"`
	Branch     string `yaml:"branch,omitempty" json:"branch,omitempty"`
	CommitSha1 string `yaml:"commit_sha1,omitempty" json:"commit_sha1,omitempty"`
	Depth      *int   `yaml:"depth,omitempty" json:"depth,omitempty"`
	Priority   *int   `yaml:"priority,omitempty" json:"priority,omitempty"`
}

func NewReposcanKit added in v0.5.0

func NewReposcanKit(name, url, branch, commit string) *ReposcanKit

func (*ReposcanKit) GetPriority added in v0.5.0

func (r *ReposcanKit) GetPriority() int

Jump to

Keyboard shortcuts

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