Help us shape the future of Go! Take the 2026 Go Developer Survey

meta

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

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 represents a YAML loader that can resolve $import directives.

func New

func New(fs afs.Service, baseURL string, options ...storage.Option) *Service

New creates a new Service with the provided filesystem service.

func (*Service) Download

func (l *Service) Download(ctx context.Context, path string) ([]byte, error)

func (*Service) Exists

func (l *Service) Exists(ctx context.Context, path string) (bool, error)

func (*Service) List

func (l *Service) List(ctx context.Context, path string) ([]string, error)

func (*Service) Load

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

Load reads the YAML file at the given path, resolves $import directives, and decodes the result into the provided Go variable v.

func (*Service) LoadWithURL

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

Jump to

Keyboard shortcuts

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