config

package
v0.0.0-...-1dc00f2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TypeString = "string"
	TypeInt    = "int"
	TypeFloat  = "float"
	TypeBool   = "bool"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rules
}

func NewConfigFromEnv

func NewConfigFromEnv(ctx context.Context, key string) (*Config, error)

NewConfigFromEnv creates a new config from env

func NewConfigFromURL

func NewConfigFromURL(ctx context.Context, fs afs.Service, URL string) (*Config, error)

type Destination

type Destination struct {
	URL           string
	TableRoot     string
	TextPrefix    string
	IntPrefix     string
	FloatPrefix   string
	URIKeyName    string
	BooleanPrefix string
	Codec         string
}

func (*Destination) Init

func (d *Destination) Init()

func (*Destination) Validate

func (d *Destination) Validate() error

type Field

type Field struct {
	Name  string
	Type  string
	Index int
}

type Rule

type Rule struct {
	Disabled       bool
	SourceURL      string
	TimeField      string
	BatchField     string
	SequenceField  string
	PartitionField string
	IndexingFields []Field

	AllowQuotedNumbers bool
	Dest               Destination
	When               matcher.Basic
	RecordsField       string
	ValueField         string
	PreSorted          bool
	// contains filtered or unexported fields
}

func LoadRule

func LoadRule(data []byte, ext string) (*Rule, error)

func (*Rule) Fields

func (r *Rule) Fields() map[string]*Field

func (*Rule) HasMatch

func (r *Rule) HasMatch(URL string) bool

HasMatch returns true if URL matches prefix or suffix

func (*Rule) Init

func (r *Rule) Init()

func (*Rule) Validate

func (r *Rule) Validate() error

type Rules

type Rules struct {
	gcp.Config
	BaseURL          string
	CheckFrequencyMs int
	Indexes          []*Rule
	*resource.Tracker

	PreSorted *bool
	// contains filtered or unexported fields
}

func (*Rules) Init

func (r *Rules) Init()

func (*Rules) Match

func (r *Rules) Match(URL string) []*Rule

func (*Rules) ProcessorConfig

func (r *Rules) ProcessorConfig(rule *Rule) processor.Config

func (*Rules) ReloadIfNeeded

func (r *Rules) ReloadIfNeeded(ctx context.Context, fs afs.Service) error

Jump to

Keyboard shortcuts

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