config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Filename = ".ldcli-config.yml"

Variables

This section is empty.

Functions

func GetConfigFile

func GetConfigFile() string

GetConfigFile gets the full path to the config file.

Types

type ConfigFile

type ConfigFile struct {
	AccessToken     string `json:"access-token,omitempty" yaml:"access-token,omitempty"`
	AnalyticsOptOut *bool  `json:"analytics-opt-out,omitempty" yaml:"analytics-opt-out,omitempty"`
	BaseURI         string `json:"base-uri,omitempty" yaml:"base-uri,omitempty"`
	Flag            string `json:"flag,omitempty" yaml:"flag,omitempty"`
	Environment     string `json:"environment,omitempty" yaml:"environment,omitempty"`
	Output          string `json:"output,omitempty" yaml:"output,omitempty"`
	Project         string `json:"project,omitempty" yaml:"project,omitempty"`
}

ConfigFile represents the data stored in the config file.

func NewConfig

func NewConfig(rawConfig map[string]interface{}) (ConfigFile, error)

type Service added in v1.1.0

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

func NewService added in v1.1.0

func NewService(client resources.Client) Service

func (Service) VerifyAccessToken added in v1.1.0

func (s Service) VerifyAccessToken(accessToken string, baseURI string) bool

VerifyAccessToken is true if the given access token is valid to make API requests.

Jump to

Keyboard shortcuts

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