config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigKeyURL is the config name for a connection URL.
	ConfigKeyURL = "url"
	// ConfigKeyTable is the config name for a table.
	ConfigKeyTable = "table"
	// ConfigKeyKey is the config name for a key.
	ConfigKeyKey = "key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL string `validate:"required,url"`
	// The maximum identifier length is 63.
	// See https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS.
	Table string `validate:"required,max=63"`
	Key   string `validate:"required,max=63"`
}

Config represents configuration needed for Materialize.

func Parse

func Parse(cfg map[string]string) (Config, error)

Parse attempts to parse a provided map[string]string into a Config struct.

func (Config) Validate

func (c Config) Validate() error

Validate validates the Config.

Jump to

Keyboard shortcuts

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