suitecatalog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package suitecatalog owns the shareable filesystem suite catalog. Built-in suites and executable-relative user suites use the same group/suite layout.

Index

Constants

View Source
const CurrentSchemaVersion = 1

Variables

View Source
var (
	ErrInvalid   = errors.New("suite catalog: invalid input")
	ErrCollision = errors.New("suite catalog: duplicate suite identity")
)

Functions

func UserRootForExecutable

func UserRootForExecutable(executablePath string) (string, error)

Types

type Entry

type Entry struct {
	Group     string
	Directory string
	Source    Source
	Suite     domain.Suite
}

type Options

type Options struct {
	Builtin  fs.FS
	UserRoot string
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(options Options) (*Service, error)

func (*Service) Count

func (service *Service) Count(ctx context.Context) (int, error)

Count validates current content and counts metadata without cloning authored bodies.

func (*Service) Delete

func (service *Service) Delete(ctx context.Context, id string, expectedRevision uint64) error

func (*Service) Entries

func (service *Service) Entries(ctx context.Context) ([]Entry, error)

func (*Service) Find

func (service *Service) Find(ctx context.Context, id string) (Entry, error)

func (*Service) Save

func (service *Service) Save(ctx context.Context, group, directory string, raw []byte) error

func (*Service) SaveSuite

func (service *Service) SaveSuite(ctx context.Context, group, directory string, suite domain.Suite) error

type Source

type Source string
const (
	SourceBuiltin Source = "builtin"
	SourceUser    Source = "user"
)

Jump to

Keyboard shortcuts

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