local

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: AGPL-3.0 Imports: 4 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 WithCatalogPath
func WithCatalogPath(path string) Option

WithCatalogPath sets the catalog path.

type Source

Source loads a catalog from either a file path or embedded catalog.

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

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

New creates a new local source.

func (*Source) Catalog
func (s *Source) Catalog() catalogs.Catalog

Catalog returns the catalog of this source.

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

Cleanup releases any resources.

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

Fetch returns catalog data from configured source.

func (*Source) Setup
func (s *Source) Setup(_ *catalogs.Providers) error

Setup initializes the source with dependencies.

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

Type returns the type of this source.

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 WithCatalogPath

func WithCatalogPath(path string) Option

WithCatalogPath sets the catalog path.

type Source

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

Source loads a catalog from either a file path or embedded catalog.

func New

func New(opts ...Option) *Source

New creates a new local source.

func (*Source) Catalog

func (s *Source) Catalog() catalogs.Catalog

Catalog returns the catalog of this source.

func (*Source) Cleanup

func (s *Source) Cleanup() error

Cleanup releases any resources.

func (*Source) Fetch

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

Fetch returns catalog data from configured source.

func (*Source) Setup

func (s *Source) Setup(_ *catalogs.Providers) error

Setup initializes the source with dependencies.

func (*Source) Type

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

Type returns the type of this source.

Jump to

Keyboard shortcuts

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