manifest

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager[T any] struct {
	// contains filtered or unexported fields
}

Manager handles loading and saving of manifest files.

func NewManager

func NewManager[T any](projectRoot, filename string, validator Validator[T]) *Manager[T]

NewManager creates a new manifest manager.

func (*Manager[T]) Exists

func (m *Manager[T]) Exists() bool

Exists checks if the manifest file exists.

func (*Manager[T]) Load

func (m *Manager[T]) Load() (T, error)

Load reads and parses the manifest file.

func (*Manager[T]) Path

func (m *Manager[T]) Path() string

Path returns the full path to the manifest file.

func (*Manager[T]) Save

func (m *Manager[T]) Save(manifest T) error

Save writes the manifest to the file.

type Validator

type Validator[T any] interface {
	Validate(manifest T) error
}

Validator validates a manifest of type T.

Jump to

Keyboard shortcuts

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