yaml

package
v0.0.0-...-7cba79b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package yaml provides a read only storage implementation which sources its URLs from a YAML file. THe file is expected to be in the format:

---
- from: //x40/foo
- to: //x40/bar

Where there is no scheme (assumed to be the default case), the "//" is required to clearly indicate this is a schemeless URL.

Index

Constants

This section is empty.

Variables

View Source
var Log = slog.Default()

Log is the logger for the library. Uses the default structured logger, but can be overridden to disable the output for this package.

Functions

func New

func New(str storage.Storer, src io.Reader) (*yaml, error)

New generates the storer. It receives another storer which it will enrich with the content from the YAML, and an io.reader which is expected to supply the YAML (typically a file).

Returns an error in the case there is a failure to store the URL or to wholely fail the YAML parsing, but ignores single line failures (simply skipping the record)

Types

This section is empty.

Jump to

Keyboard shortcuts

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