config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find() (string, error)

Find returns the pdcli configuration filepath. If the config filepath doesn't exist, the desired config filepath string is created and returned.

func Save

func Save(cfg *Config) error

Save saves the given configuration data to the config file. It creates a new directory to store the config file.

Types

type Config

type Config struct {
	ApiKey      string `json:"api_key,omitempty"`
	AccessToken string `json:"gh_token,omitempty"`
	TeamID      string `json:"team_id,omitempty"`
	Team        string `json:"team,omitempty"`
	Terminal    string `json:"terminal,omitempty"`
}

Configuration struct to store user configuration.

func Load

func Load() (config *Config, err error)

Load loads the configuration file and parses it.

Jump to

Keyboard shortcuts

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