package infrastructure

import (
	"io/ioutil"

	"gopkg.in/yaml.v2"
)

type Configuration struct {
	Port         string   `yaml:"port"`
	ClientID     string   `yaml:"clientID"`
	ClientSecret string   `yaml:"clientSecret"`
	Scopes       []string `yaml:"scopes,flow"`
}

func GetConfiguration(path string) (*Configuration, error) {

	data, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}

	conf := &Configuration{}

	err = yaml.Unmarshal(data, conf)
	if err != nil {
		return nil, err
	}

	return conf, nil

}

package infrastructure

import (
	"io/ioutil"

	"gopkg.in/yaml.v2"
)

type Configuration struct {
	Port         string   `yaml:"port"`
	ClientID     string   `yaml:"clientID"`
	ClientSecret string   `yaml:"clientSecret"`
	Salt         string   `yaml:"salt"`
	Host         string   `yaml:"host"`
	Scopes       []string `yaml:"scopes,flow"`
}

func GetConfiguration(path string) (*Configuration, error) {

	data, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}

	conf := &Configuration{}

	err = yaml.Unmarshal(data, conf)
	if err != nil {
		return nil, err
	}

	return conf, nil

}

Add new necessary configuration fields
Add new necessary configuration fields
