configuration

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration interface {
	Save(*Settings) error
	Load() (*Settings, error)
}

Configuration should be implemented for load and save of SM client config

func NewSMConfiguration

func NewSMConfiguration(viperEnv *viper.Viper, cfgFile string) (Configuration, error)

NewSMConfiguration returns implementation of Configuration interface

type Settings added in v1.5.0

type Settings struct {
	auth.Token

	ClientID              string
	ClientSecret          string
	AuthorizationEndpoint string
	TokenEndpoint         string
	IssuerURL             string
	AuthFlow              auth.Flow

	URL            string
	User           string
	TokenBasicAuth bool
	SSLDisabled    bool
}

Settings contains the information that will be saved/loaded in the CLI config file

func (Settings) GetToken added in v1.5.0

func (settings Settings) GetToken() auth.Token

GetToken returns the oauth token from the client configuration

func (Settings) Validate added in v1.5.0

func (settings Settings) Validate() error

Validate validates client config

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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