config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuditLogPath added in v0.0.4

func DefaultAuditLogPath() string

func DefaultConfigDir added in v0.0.4

func DefaultConfigDir() string

func DefaultConfigPath

func DefaultConfigPath() string

Types

type Config

type Config struct {
	Endpoints []Endpoint `yaml:"endpoints"`
}

func Load

func Load(path string) (*Config, error)

func (*Config) AddEndpoint

func (c *Config) AddEndpoint(ep Endpoint) error

func (*Config) GetEndpoint

func (c *Config) GetEndpoint(name string) (*Endpoint, error)

func (*Config) Save

func (c *Config) Save(path string) error

func (*Config) UpdateEndpoint added in v0.0.3

func (c *Config) UpdateEndpoint(name string, url *string, description *string, headers map[string]string) error

type Endpoint

type Endpoint struct {
	Name        string            `yaml:"name"`
	Description string            `yaml:"description,omitempty"`
	URL         string            `yaml:"url,omitempty"`
	SchemaFile  string            `yaml:"schema_file,omitempty"`
	Headers     map[string]string `yaml:"headers,omitempty"`
}

Jump to

Keyboard shortcuts

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