meta

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service provides minimal meta loading and listing with a base directory.

func New

func New(fs afs.Service, base string) *Service

New constructs a meta Service with the given filesystem and base directory/URL.

func (*Service) Exists

func (s *Service) Exists(ctx context.Context, URL string) (bool, error)

Exists checks if the resolved URL exists.

func (*Service) GetURL

func (s *Service) GetURL(p string) string

GetURL returns the resolved absolute URL/path for a possibly relative path.

func (*Service) List

func (s *Service) List(ctx context.Context, URL string) ([]string, error)

List returns YAML candidates under a directory or the file itself when URL points to a file.

func (*Service) Load

func (s *Service) Load(ctx context.Context, URL string, v interface{}) error

Load reads URL and unmarshals into v. Supports *yaml.Node or a struct pointer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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