viper

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 11

README

KrakenD viper

A config parser for the KrakenD framework

How to use it

Import the package

import "github.com/devopsfaith/krakend-viper"

And you are ready for building a parser and get the config from any format supported by viper

parser := viper.New()
serviceConfig, err := parser.Parse(*configFile)
if err != nil {
	log.Fatal("ERROR:", err.Error())
}

Documentation

Overview

Package viper defines a config parser implementation based on the viper pkg

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser is a config parser using the viper library

func New

func New() Parser

New creates a new parser using the viper library

func (Parser) Parse

func (p Parser) Parse(configFile string) (config.ServiceConfig, error)

Parser implements the Parse interface

Jump to

Keyboard shortcuts

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