config

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPath

func GetDefaultPath() string

func Init

func Init(configPath string)

func SetProject

func SetProject(project string) error

func Write

func Write(config *Config) error

Write writes the configuration file in the path {USER_HOME}/.perses/config if the directory doesn't exist, the function will create it

Types

type Config

type Config struct {
	RestClientConfig perseshttp.RestConfigClient `json:"rest_client_config"`
	Project          string                      `json:"project"`
	// contains filtered or unexported fields
}
var Global *Config

func (*Config) GetAPIClient

func (c *Config) GetAPIClient() (api.ClientInterface, error)

func (*Config) SetAPIClient

func (c *Config) SetAPIClient(apiClient api.ClientInterface)

Jump to

Keyboard shortcuts

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