palantir

package module
v0.0.0-...-ed65877 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

Palantir

Description

Yet Another Go Config Library

Usage

go get github.com/gojektech/palantir

or, add github.com/gojektech/palantir to a dependency manager and preferably fix a version.

License

Copyright 2018, GO-JEK Tech (http://gojek.tech)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
}

func (BaseConfig) DBConfig

func (self BaseConfig) DBConfig() *DBConfig

func (BaseConfig) GetFeature

func (self BaseConfig) GetFeature(key string) bool

func (BaseConfig) GetIntValue

func (self BaseConfig) GetIntValue(key string) int

func (BaseConfig) GetOptionalIntValue

func (self BaseConfig) GetOptionalIntValue(key string, defaultValue int) int

func (BaseConfig) GetOptionalValue

func (self BaseConfig) GetOptionalValue(key string, defaultValue string) string

func (BaseConfig) GetValue

func (self BaseConfig) GetValue(key string) string

func (BaseConfig) Load

func (self BaseConfig) Load()

func (BaseConfig) LoadTestConfig

func (self BaseConfig) LoadTestConfig(options map[string]interface{}) error

func (BaseConfig) LoadWithOptions

func (self BaseConfig) LoadWithOptions(options map[string]interface{})

func (BaseConfig) Newrelic

func (self BaseConfig) Newrelic() newrelic.Config

type Config

type Config interface {
	GetValue(string) string
	GetIntValue(string) int
}

type DBConfig

type DBConfig struct {
	// contains filtered or unexported fields
}

func LoadDbConf

func LoadDbConf() *DBConfig

func (*DBConfig) ConnMaxLifetime

func (self *DBConfig) ConnMaxLifetime() time.Duration

func (*DBConfig) Driver

func (self *DBConfig) Driver() string

func (*DBConfig) IdleConn

func (self *DBConfig) IdleConn() int

func (*DBConfig) MaxConn

func (self *DBConfig) MaxConn() int

func (*DBConfig) SlaveUrl

func (self *DBConfig) SlaveUrl() string

func (*DBConfig) Url

func (self *DBConfig) Url() string

Jump to

Keyboard shortcuts

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