local

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

README

local

Internal package local provides local file-based catalog source implementation.

local

import "github.com/agentstation/starmap/internal/sources/local"

Index

type Option

Option configures a local source.

type Option func(*Source)

func WithCatalog
func WithCatalog(catalog *catalogs.Catalog) Option

WithCatalog sets a pre-loaded human workspace catalog to reuse.

func WithCatalogPath
func WithCatalogPath(path string) Option

WithCatalogPath sets the catalog path.

func WithCatalogReport
func WithCatalogReport(catalog *catalogs.Catalog, report catalogs.LoadReport) Option

WithCatalogReport sets a pre-loaded catalog and its source load diagnostics.

type Source

Source observes a human workspace catalog, either injected after validated loading or loaded from its configured path.

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

func New
func New(opts ...Option) *Source

New creates a new local source.

func (*Source) Cleanup
func (s *Source) Cleanup() error

Cleanup releases any resources.

func (*Source) Dependencies
func (s *Source) Dependencies() []sources.Dependency

Dependencies returns the list of external dependencies. Local source has no external dependencies.

func (*Source) ID
func (s *Source) ID() sources.ID

ID returns the ID of this source.

func (*Source) IsOptional
func (s *Source) IsOptional() bool

IsOptional reports that a human workspace observation is optional when the verified embedded observation is available.

func (*Source) Name
func (s *Source) Name() string

Name returns the human-friendly name of this source.

func (*Source) Observe
func (s *Source) Observe(_ context.Context, _ ...sources.Option) (sources.Observation, error)

Observe returns catalog data from the configured source without retaining result state.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Source)

Option configures a local source.

func WithCatalog added in v0.0.20

func WithCatalog(catalog *catalogs.Catalog) Option

WithCatalog sets a pre-loaded human workspace catalog to reuse.

func WithCatalogPath

func WithCatalogPath(path string) Option

WithCatalogPath sets the catalog path.

func WithCatalogReport added in v0.2.0

func WithCatalogReport(catalog *catalogs.Catalog, report catalogs.LoadReport) Option

WithCatalogReport sets a pre-loaded catalog and its source load diagnostics.

type Source

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

Source observes a human workspace catalog, either injected after validated loading or loaded from its configured path.

func New

func New(opts ...Option) *Source

New creates a new local source.

func (*Source) Cleanup

func (s *Source) Cleanup() error

Cleanup releases any resources.

func (*Source) Dependencies added in v0.0.17

func (s *Source) Dependencies() []sources.Dependency

Dependencies returns the list of external dependencies. Local source has no external dependencies.

func (*Source) ID added in v0.0.15

func (s *Source) ID() sources.ID

ID returns the ID of this source.

func (*Source) IsOptional added in v0.0.17

func (s *Source) IsOptional() bool

IsOptional reports that a human workspace observation is optional when the verified embedded observation is available.

func (*Source) Name added in v0.0.17

func (s *Source) Name() string

Name returns the human-friendly name of this source.

func (*Source) Observe added in v0.1.0

func (s *Source) Observe(_ context.Context, _ ...sources.Option) (sources.Observation, error)

Observe returns catalog data from the configured source without retaining result state.

Jump to

Keyboard shortcuts

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