config

package
v0.0.0-...-2f8753c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CONCURRENCY_LIMIT   = 4
	DEFAULT_RESULT_CHANNEL_SIZE = 10000
	DEFAULT_VERSION             = "UNVERSIONED"
)

--------------------------------- Constants -----------------------------------------

Variables

View Source
var DEFAULT_LOGGING_DIRECTORY = os.Getenv("HOME") + "/.plankton_logs/"
View Source
var DEFAULT_SQLITE_DATABASE = DatabaseConfig{
	Type: "sqlite3",
	Host: "/tmp/plankton.db",
}
View Source
var TEST_SQLITE_DATABASE = DatabaseConfig{
	Type: "sqlite3",
	Host: "/tmp/plankton_test.db",
}

Functions

func ReadAndSetConfig

func ReadAndSetConfig()

func ReadOrCreateLoggingDirectory

func ReadOrCreateLoggingDirectory()

func SetDatabaseConfig

func SetDatabaseConfig(db_config DatabaseConfig)

Types

type Config

type Config struct {
	DataBase          *gorm.DB
	DBConfig          DatabaseConfig
	ConcurrencyLimit  int
	ResultChannelSize int
	LoggingDirectory  string
	Version           string
}

func GetConfig

func GetConfig() Config

type DatabaseConfig

type DatabaseConfig struct {
	Type string
	Host string
}

Jump to

Keyboard shortcuts

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