config

package
v0.0.0-...-39ba859 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server         Server `yaml:"server,omitempty"`
	SearchUser     Db     `yaml:"search_user,omitempty"`
	SearchRepo     Db     `yaml:"search_repo,omitempty"`
	AnalysisConfig Db     `yaml:"analysis_config,omitempty"`
	MongoAuth      Db     `yaml:"mongo_auth,omitempty"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig parses all flags from the command line and returns an initialized Settings object and an error object if any. For instance if it cannot find the SSL certificate file or the SSL key file it will set the returned error appropriately.

func (Config) GetEndpointConnectionString

func (c Config) GetEndpointConnectionString() string

GetEndpointConnectionString builds and returns a string with the IP and port separated by a colon. Nothing special but anyway.

type Db

type Db struct {
	DbInfo     mgo.DialInfo `yaml:"dial_info,omitempty"`
	Collection string       `yaml:"collection,omitempty"`
}

type Server

type Server struct {
	Address string `yaml:"address,omitempty"`
	Port    uint   `yaml:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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