ansible

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxArchiveBytes = 128 << 20
)

Variables

View Source
var (
	ErrArchive = errors.New("invalid Ansible collection archive")
)

Functions

func ParsePath

func ParsePath(p string) (namespace, name, version string, ok bool)

func Path

func Path(namespace, name, version string) string

func Serves

func Serves(t repo.PackageType) bool

func ValidDependencies

func ValidDependencies(deps map[string]string) bool

ValidDependencies accepts Galaxy's comma-separated semantic-version ranges.

func ValidName

func ValidName(v string) bool

func ValidVersion

func ValidVersion(v string) bool

Types

type Handler

type Handler struct{ generic.Handler }

func (Handler) Admit

func (Handler) Admit(
	ctx context.Context,
	env format.Env,
	c repo.Config,
	w format.Write,
) (format.Write, error)

func (Handler) Deleted

func (Handler) Deleting

func (Handler) Deployed

func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error

func (Handler) Inspect

func (Handler) Inspect(
	ctx context.Context,
	env format.Env,
	_ repo.Config,
	w format.Write,
) (any, error)

func (Handler) Reindex

func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error

type Metadata

type Metadata struct {
	Namespace    string            `json:"namespace"`
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Dependencies map[string]string `json:"dependencies"`
	Description  string            `json:"description,omitempty"`
	SHA256       string            `json:"sha256"`
}

Metadata is extracted from the Ansible collection's MANIFEST.json.

func ReadArchive

func ReadArchive(r io.Reader, size int64) (Metadata, error)

ReadArchive validates a bounded release archive before it can become a package. It verifies the FILES.json digest and every listed file digest.

Jump to

Keyboard shortcuts

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