config

package
v0.0.0-...-447d7c9 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Enabled bool   `default:"false"`
	Address string `default:"0.0.0.0:8080"`
}

APIConfig contains configuration data for the API module

type Config

type Config struct {
	LogLevel      string `default:"debug"`
	DefaultDomain string `default:"oakmail.io"`

	API    APIConfig
	Filer  FilerConfig
	Mailer MailerConfig
	Worker WorkerConfig

	Database *Database `default:"sqlite"`
	Postgres PostgresConfig
	SQLite   SQLiteConfig

	Filesystem *Filesystem `default:"flat"`
	Flat       FlatConfig
	Seaweed    SeaweedConfig

	Queue *Queue `default:"memory"`
	NSQ   NSQConfig
}

Config is the root config structure

type Database

type Database string

Database is a database type enum

const (
	Postgres Database = "postgres"
	SQLite   Database = "sqlite"
)

Available databases

func (*Database) Set

func (d *Database) Set(value string) error

Set implements flag.Value

func (*Database) String

func (d *Database) String() string

String implements flag.Value

type FilerConfig

type FilerConfig struct {
	Enabled bool   `default:"false"`
	Address string `default:"0.0.0.0:8081"`
}

FilerConfig contains configuration data for the Filer module

type Filesystem

type Filesystem string

Filesystem is a filesystem type enum

const (
	Flat    Filesystem = "flat"
	Seaweed Filesystem = "seaweed"
)

Available filesystems

func (*Filesystem) Set

func (f *Filesystem) Set(value string) error

Set implements flag.Value

func (*Filesystem) String

func (f *Filesystem) String() string

String implements flag.Value

type FlatConfig

type FlatConfig struct {
	Path string `default:"./_runtime/files"`
}

FlatConfig contains all configuration data for the flat filesystem

type MailerConfig

type MailerConfig struct {
	Enabled bool   `default:"false"`
	Address string `default:"0.0.0.0:8025"`
}

MailerConfig contains configuration data for the mailer module

type NSQConfig

type NSQConfig struct {
	NSQdAddresses    []string
	LookupdAddresses []string
}

NSQConfig contains all configuration data for the NSQ clients

type PostgresConfig

type PostgresConfig struct {
	ConnectionString string
}

PostgresConfig contains all configuration data for a PostgreSQL connection

type Queue

type Queue string

Queue is a queue type enum

const (
	NSQ    Queue = "nsq"
	Memory Queue = "memory"
)

Available queues

func (*Queue) Set

func (q *Queue) Set(value string) error

Set implements flag.Value

func (*Queue) String

func (q *Queue) String() string

String implements flag.Value

type SQLiteConfig

type SQLiteConfig struct {
	ConnectionString string `default:"./_runtime/database.db"`
}

SQLiteConfig contains all configuration data for SQLite adapter setup

type SeaweedConfig

type SeaweedConfig struct {
	MasterURL  string
	Collection string
}

SeaweedConfig contains all configuration data for the SeaweedFS client

type WorkerConfig

type WorkerConfig struct {
	Enabled bool `default:"false"`
}

WorkerConfig contains configuration data for the worker module

Jump to

Keyboard shortcuts

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