config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

func DefaultConfigFile

func DefaultConfigFile() (string, error)

func WriteAPIWithName

func WriteAPIWithName(file string, api API, overwrite bool) error

WriteAPIWithName writes a new API configuration to the specified config file.

Types

type API

type API struct {
	Name        string
	OpenAPIPath string
	ServerURL   string
	Headers     []string
	PathPrefix  string
}

func ListAPIs

func ListAPIs(file string) ([]API, error)

ListAPIs returns a slice of all API configurations in the specified config file.

type Config

type Config struct {
	APIs map[string]API
}

func ReadConfigFromFile

func ReadConfigFromFile(file string) (*Config, error)

Jump to

Keyboard shortcuts

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