projectconfig

package
v0.139.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(path string, config Config) error

Save project config atomically to a file.

Types

type Config

type Config struct {
	Global  ConfigAndSecrets            `toml:"global"`
	Modules map[string]ConfigAndSecrets `toml:"modules"`
}

func Load

func Load(path string) (Config, error)

Load project config from a file.

type ConfigAndSecrets

type ConfigAndSecrets struct {
	Config  map[string]*URL `toml:"configuration"`
	Secrets map[string]*URL `toml:"secrets"`
}

type URL

type URL url.URL

A URL that supports marshalling and unmarshalling which is, very frustratingly, not possible with the stdlib url.URL.

func MustParseURL

func MustParseURL(rawurl string) *URL

func ParseURL

func ParseURL(rawurl string) (*URL, error)

func (URL) GoString

func (u URL) GoString() string

func (URL) MarshalText

func (u URL) MarshalText() ([]byte, error)

func (*URL) UnmarshalText

func (u *URL) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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