conf

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path added in v1.5.0

func Path() string

Types

type Config

type Config struct {
	Endpoints struct {
		BaseAPI   string `toml:"base_api"`
		BaseFeeds string `toml:"base_feeds"`
		BaseGRPC  string `toml:"base_grpc"`
	} `toml:"endpoints"`

	// fields that are created based on existing fields
	BaseApiURL   *url.URL `toml:"-"`
	BaseFeedsURL *url.URL `toml:"-"`

	Profiles map[string]ProfileConfig `toml:"profiles"`
	Path     string                   `toml:"-"`
	Profile  string                   `toml:"-"`
}

func Read

func Read() (Config, error)

func (Config) ApplyToClient added in v0.2.0

func (config Config) ApplyToClient(client *synthient.Client)

func (Config) GRPCEndpoint added in v1.5.0

func (config Config) GRPCEndpoint(defaultEndpoint string) string

type ProfileConfig added in v1.5.0

type ProfileConfig struct {
	Endpoints struct {
		BaseAPI   string `toml:"base_api"`
		BaseFeeds string `toml:"base_feeds"`
		BaseGRPC  string `toml:"base_grpc"`
	} `toml:"endpoints"`
}

Jump to

Keyboard shortcuts

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