generators

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGenerator added in v0.22.0

type BaseGenerator struct {
	Opts map[string]string
}

func NewBaseGenerator added in v0.22.0

func NewBaseGenerator(opts map[string]string) *BaseGenerator

func (*BaseGenerator) GetOpts added in v0.22.0

func (g *BaseGenerator) GetOpts() map[string]string

type CustomGenerator added in v0.16.0

type CustomGenerator struct {
	*BaseGenerator
}

func NewCustomGenerator added in v0.16.0

func NewCustomGenerator(opts map[string]string) *CustomGenerator

func (*CustomGenerator) GetElabPaths added in v0.16.0

func (g *CustomGenerator) GetElabPaths(pkgname string) (string, string, string, string)

func (*CustomGenerator) GetType added in v0.16.0

func (g *CustomGenerator) GetType() string

func (*CustomGenerator) Process added in v0.16.0

func (g *CustomGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

Retrieve metadata and all availables tags/releases

func (*CustomGenerator) SetVersion added in v0.16.0

func (g *CustomGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

type CustomGeneratorValues added in v0.16.0

type CustomGeneratorValues struct {
	Name      string                  `json:"name" yaml:"name"`
	Atom      *specs.AutogenAtom      `json:"atom,omitempty" yaml:"atom,omitempty"`
	Values    *map[string]interface{} `json:"vars,omitempty" yaml:"vars,omitempty"`
	Artefacts []*specs.AutogenAsset   `json:"artefacts,omitempty" yaml:"artefacts,omitempty"`
}

func ReadVars added in v0.16.0

func ReadVars(file string) (*CustomGeneratorValues, error)

func (*CustomGeneratorValues) WriteYamlFile added in v0.16.0

func (v *CustomGeneratorValues) WriteYamlFile(f string) error

type DirlistingGenerator

type DirlistingGenerator struct {
	*BaseGenerator
	RestGuard   *guard.RestGuard
	MapServices map[string]*guard_specs.RestService
	RateLimit   string
}

func NewDirlistingGenerator

func NewDirlistingGenerator(opts map[string]string) *DirlistingGenerator

func (*DirlistingGenerator) GetRestGuardService added in v0.18.0

func (g *DirlistingGenerator) GetRestGuardService(service string) *guard_specs.RestService

func (*DirlistingGenerator) GetType

func (g *DirlistingGenerator) GetType() string

func (*DirlistingGenerator) Process

func (g *DirlistingGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

func (*DirlistingGenerator) SetVersion

func (g *DirlistingGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

type Generator

type Generator interface {
	Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)
	GetType() string
	SetVersion(atom *specs.AutogenAtom, v string, mapref *map[string]interface{}) error
}

func NewGenerator

func NewGenerator(t string, opts map[string]string) (Generator, error)

type GithubGenerator

type GithubGenerator struct {
	Client *github.Client
}

func NewGithubGenerator

func NewGithubGenerator() *GithubGenerator

func (*GithubGenerator) GetAssets

func (g *GithubGenerator) GetAssets(atom *specs.AutogenAtom,
	release *github.RepositoryRelease,
	mapref *map[string]interface{}) ([]*specs.AutogenArtefact, error)

func (*GithubGenerator) GetType

func (g *GithubGenerator) GetType() string

func (*GithubGenerator) Process

func (g *GithubGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

func (*GithubGenerator) SetClient

func (g *GithubGenerator) SetClient(c *github.Client)

func (*GithubGenerator) SetVersion

func (g *GithubGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

type JsonGenerator added in v0.22.0

type JsonGenerator struct {
	*BaseGenerator
	RestGuard   *guard.RestGuard
	MapServices map[string]*guard_specs.RestService
	RateLimit   string
}

func NewJsonGenerator added in v0.22.0

func NewJsonGenerator(opts map[string]string) *JsonGenerator

func (*JsonGenerator) GetRestGuardService added in v0.22.0

func (g *JsonGenerator) GetRestGuardService(service string) *guard_specs.RestService

func (*JsonGenerator) GetType added in v0.22.0

func (g *JsonGenerator) GetType() string

func (*JsonGenerator) Process added in v0.22.0

func (g *JsonGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

func (*JsonGenerator) SetVersion added in v0.22.0

func (g *JsonGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

type NoopGenerator

type NoopGenerator struct {
	*BaseGenerator
}

func NewNoopGenerator

func NewNoopGenerator() *NoopGenerator

func (*NoopGenerator) GetType

func (g *NoopGenerator) GetType() string

func (*NoopGenerator) Process

func (g *NoopGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

func (*NoopGenerator) SetVersion

func (g *NoopGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

type PypiGenerator added in v0.13.0

type PypiGenerator struct {
	RestGuard *guard.RestGuard
}

func NewPypiGenerator added in v0.13.0

func NewPypiGenerator() *PypiGenerator

func (*PypiGenerator) GetType added in v0.13.0

func (g *PypiGenerator) GetType() string

func (*PypiGenerator) Process added in v0.13.0

func (g *PypiGenerator) Process(atom *specs.AutogenAtom) (*map[string]interface{}, error)

func (*PypiGenerator) SetVersion added in v0.13.0

func (g *PypiGenerator) SetVersion(atom *specs.AutogenAtom, version string,
	mapref *map[string]interface{}) error

Jump to

Keyboard shortcuts

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