datasrc

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(ds *DataSources) error

Types

type DataSources

type DataSources struct {
	Version string   `yaml:"version"`
	Sources []Source `yaml:"sources"`
}

func Parse

func Parse(data []byte) (*DataSources, error)

func ParseFile

func ParseFile(fn string) (*DataSources, error)

type DataSrc

type DataSrc interface {
	Type() string
	Meta() map[string]string
}

type Location

type Location struct {
	Path      string        `yaml:"path,omitempty"`
	Type      string        `yaml:"type,omitempty"`
	Window    time.Duration `yaml:"window,omitempty"`
	Timestamp *Timestamp    `yaml:"timestamp,omitempty"`
}

type Source

type Source struct {
	Type      string        `yaml:"type"`
	Name      string        `yaml:"name,omitempty"`
	Desc      string        `yaml:"desc,omitempty"`
	Window    time.Duration `yaml:"window,omitempty"`
	Timestamp *Timestamp    `yaml:"timestamp,omitempty"`
	Locations []Location    `yaml:"locations"`
}

type Timestamp

type Timestamp struct {
	Regex  string `yaml:"regex"`
	Format string `yaml:"format"`
}

Jump to

Keyboard shortcuts

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