config

package
v0.0.0-...-9090b94 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfigFile

func ReadConfigFile(cfg *Config, path string)

ReadConfigFile reads the config file and merges with DefaultConfig, taking precedence

Types

type Config

type Config struct {
	Server struct {
		Address string
		Port    int
	}

	Logging struct {
		Format string
		Level  string
	}

	Metadata map[string]string

	GoogleCloudDatastore DatastoreConf
	PostgreSQL           SQLConf

	Crawler struct {
		LogPattern string
	}
}

Config struct holds the current configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a Config struct with default values

func Initialize

func Initialize(configFile string) *Config

Initialize a new Config

type DatastoreConf

type DatastoreConf struct {
	Namespace string
	Project   string
}

DatastoreConf holds the config values for Datastore

type SQLConf

type SQLConf struct {
	Username     string
	PasswordFile string
	Host         string
	Port         int
	Database     string
	DisableSSL   bool
}

SQLConf holds the config values for SQL databases

Jump to

Keyboard shortcuts

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