config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIs

type APIs struct {
	Phabricator Phabricator `yaml:"phabricator"`
}

type Config

type Config struct {
	APIs APIs `yaml:"apis"`
}

Config root configuration structure

func DefaultConfiguration

func DefaultConfiguration() *Config

DefaultConfiguration returns default configuration.

type Controller

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

Controller is the configuration controller it handles reading and writing configuration files.

func New

func New() *Controller

New returns a new configuration controller

func (*Controller) CreateDefaults

func (c *Controller) CreateDefaults(path string) error

CreateDefaults creates a new default configuration file at the given path

func (*Controller) Read

func (c *Controller) Read(path string) (*Config, error)

Read reads the configuration file at the given path

type Operations

type Operations interface {
	Read(path string) (*Config, error)
	CreateDefaults(path string) error
}

Operations is the interface for configuration operations.

type Phabricator

type Phabricator struct {
	URL            string `yaml:"base_url"`
	APIToken       string `yaml:"api_token"`
	APITokenEnv    string `yaml:"api_token_env"`
	AccessToken    string `yaml:"access_token"`
	AccessTokenEnv string `yaml:"access_token_env"`
}

Phabricator configuration to set a proper Phabricator Client

Directories

Path Synopsis
Package configmock is a generated GoMock package.
Package configmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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