config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// KeyURL is the config name for a connection URL.
	KeyURL = "url"
	// KeyTable is the config name for a table.
	KeyTable = "table"
	// KeyKey is the config name for a key.
	KeyKey = "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