config

package
v0.0.0-...-c88a890 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* Erascan - erasure protocol explorer * https://github.com/MikaelLazarev/erascan * * Copyright (c) 2019. Mikael Lazarev

* Erascan - erasure protocol explorer * https://github.com/MikaelLazarev/erascan * * Copyright (c) 2019. Mikael Lazarev

* Erascan - erasure protocol explorer * https://github.com/MikaelLazarev/erascan * * Copyright (c) 2019. Mikael Lazarev

* Erascan - erasure protocol explorer * https://github.com/MikaelLazarev/erascan * * Copyright (c) 2019. Mikael Lazarev

* Erascan - erasure protocol explorer * https://github.com/MikaelLazarev/erascan * * Copyright (c) 2019. Mikael Lazarev

Index

Constants

View Source
const (
	DEV = iota
	TEST
	PROD
)
View Source
const PaginationLimit int = 30

Define controller constants

View Source
const PaginationOffset int = 10

Variables

This section is empty.

Functions

func GetConfigType

func GetConfigType() int

func LoadConfigFromJSON

func LoadConfigFromJSON(filefname string, targetStruct interface{}) error

Gets config from file

Types

type DBConfig

type DBConfig struct {
	Host     string
	Port     string
	User     string
	DBname   string
	Password string
}

func GetDBConfig

func GetDBConfig(configT int) (*DBConfig, error)

Get Developers config from JSON files stored in config folder

func (DBConfig) String

func (c DBConfig) String() string

type SecurityConfig

type SecurityConfig struct {
	SigningKey string `json:"signing_key"`
	SentryDSN  string `json:"sentry_dsn"`
	PrivateKey string `json:"private_key"`
}

func GetSecurityConfig

func GetSecurityConfig() (*SecurityConfig, error)

Jump to

Keyboard shortcuts

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