config

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 7 Imported by: 25

Documentation

Overview

Package config provides functions for parsing command line args and JSON config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base added in v0.7.0

type Base struct {
	Connection          string
	CacheDir            string
	DiffDir             string
	MappingFile         string
	Srid                int
	LimitTo             string
	LimitToCacheBuffer  float64
	ConfigFile          string
	HTTPProfile         string
	Quiet               bool
	Schemas             Schemas
	ExpireTilesDir      string
	ExpireTilesZoom     int
	ReplicationURL      string
	ReplicationInterval time.Duration
	DiffStateBefore     time.Duration
	ForceDiffImport     bool
}

func ParseDiffImport

func ParseDiffImport(args []string) (Base, []string)

func ParseRunImport

func ParseRunImport(args []string) Base

type Config

type Config struct {
	CacheDir            string          `json:"cachedir"`
	DiffDir             string          `json:"diffdir"`
	Connection          string          `json:"connection"`
	MappingFile         string          `json:"mapping"`
	LimitTo             string          `json:"limitto"`
	LimitToCacheBuffer  float64         `json:"limitto_cache_buffer"`
	Srid                int             `json:"srid"`
	Schemas             Schemas         `json:"schemas"`
	ExpireTilesDir      string          `json:"expiretiles_dir"`
	ExpireTilesZoom     int             `json:"expiretiles_zoom"`
	ReplicationURL      string          `json:"replication_url"`
	ReplicationInterval MinutesInterval `json:"replication_interval"`
	DiffStateBefore     MinutesInterval `json:"diff_state_before"`
}

type Import added in v0.7.0

type Import struct {
	Base             Base
	Overwritecache   bool
	Appendcache      bool
	Read             string
	Write            bool
	Optimize         bool
	Diff             bool
	DeployProduction bool
	RevertDeploy     bool
	RemoveBackup     bool
}

func ParseImport

func ParseImport(args []string) Import

type MinutesInterval

type MinutesInterval struct {
	time.Duration
}

func (*MinutesInterval) UnmarshalJSON

func (d *MinutesInterval) UnmarshalJSON(b []byte) (err error)

type Schemas

type Schemas struct {
	Import     string `json:"import"`
	Production string `json:"production"`
	Backup     string `json:"backup"`
}

Jump to

Keyboard shortcuts

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