settings

package
v0.0.0-...-33dfd9e Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Global gateway
)

Functions

func CriticalEnvironmentSettingsCheck

func CriticalEnvironmentSettingsCheck()

func DefaultSettings

func DefaultSettings() ([]byte, error)

func HasCustomSettings

func HasCustomSettings() bool

func OperatingSystem

func OperatingSystem() string

Types

type Api

type Api interface {
	Name() string
	Description() string
	TemplatesYamlURL() string
	Diagnostics(target *common.DiagnosticStatus)
	Endpoint(string) string
	Option(string) bool
	DefaultEndpoint() string
	IssuesURL() string
	TelemetryURL() string
	PypiURL() string
	PypiTrustedHost() string
	CondaURL() string
	DownloadsLink(resource string) string
	DocsLink(page string) string
	PypiLink(page string) string
	CondaLink(page string) string
	Hostnames() []string
	ConfiguredHttpTransport() *http.Transport
	NoProxy() string
	HttpsProxy() string
	HttpProxy() string
	HasPipRc() bool
	HasMicroMambaRc() bool
	HasCaBundle() bool
	VerifySsl() bool
	NoRevocation() bool
	LegacyRenegotiation() bool
	NoBuid() bool
}

type BoolMap

type BoolMap map[string]bool

type Certificates

type Certificates struct {
	VerifySsl           bool   `yaml:"verify-ssl" json:"verify-ssl"`
	SslNoRevoke         bool   `yaml:"ssl-no-revoke" json:"ssl-no-revoke"`
	LegacyRenegotiation bool   `yaml:"legacy-renegotiation-allowed" json:"legacy-renegotiation-allowed"`
	CaBundle            string `yaml:"ca-bundle,omitempty" json:"ca-bundle,omitempty"`
}

type EndpointsApi

type EndpointsApi func(string) string

type Meta

type Meta struct {
	Name        string `yaml:"name" json:"name"`
	Description string `yaml:"description" json:"description"`
	Source      string `yaml:"source" json:"source"`
	Version     string `yaml:"version" json:"version"`
}

type Network

type Network struct {
	NoProxy    string `yaml:"no-proxy" json:"no-proxy"`
	HttpsProxy string `yaml:"https-proxy" json:"https-proxy"`
	HttpProxy  string `yaml:"http-proxy" json:"http-proxy"`
}

type Profile

type Profile struct {
	Name         string    `yaml:"name" json:"name"`
	Description  string    `yaml:"description" json:"description"`
	Settings     *Settings `yaml:"settings,omitempty" json:"settings,omitempty"`
	PipRc        string    `yaml:"piprc,omitempty" json:"piprc,omitempty"`
	MicroMambaRc string    `yaml:"micromambarc,omitempty" json:"micromambarc,omitempty"`
	CaBundle     string    `yaml:"ca-bundle,omitempty" json:"ca-bundle,omitempty"`
}

func (*Profile) Activate

func (it *Profile) Activate() (err error)

func (*Profile) AsYaml

func (it *Profile) AsYaml() ([]byte, error)

func (*Profile) Import

func (it *Profile) Import() (err error)

func (*Profile) LoadFrom

func (it *Profile) LoadFrom(filename string) error

func (*Profile) Remove

func (it *Profile) Remove() (err error)

func (*Profile) SaveAs

func (it *Profile) SaveAs(filename string) error

type Settings

type Settings struct {
	Autoupdates  StringMap     `yaml:"autoupdates,omitempty" json:"autoupdates,omitempty"`
	Branding     StringMap     `yaml:"branding,omitempty" json:"branding,omitempty"`
	Certificates *Certificates `yaml:"certificates,omitempty" json:"certificates,omitempty"`
	Network      *Network      `yaml:"network,omitempty" json:"network,omitempty"`
	Endpoints    StringMap     `yaml:"endpoints,omitempty" json:"endpoints,omitempty"`
	Hosts        []string      `yaml:"diagnostics-hosts,omitempty" json:"diagnostics-hosts,omitempty"`
	Options      BoolMap       `yaml:"options,omitempty" json:"options,omitempty"`
	Meta         *Meta         `yaml:"meta,omitempty" json:"meta,omitempty"`
}

func CustomSettingsLayer

func CustomSettingsLayer() *Settings

func DefaultSettingsLayer

func DefaultSettingsLayer() *Settings

func Empty

func Empty() *Settings

func FromBytes

func FromBytes(raw []byte) (*Settings, error)

func LoadSetting

func LoadSetting(filename string) (*Settings, error)

func SummonSettings

func SummonSettings() (*Settings, error)

func (*Settings) AsJson

func (it *Settings) AsJson() ([]byte, error)

func (*Settings) AsYaml

func (it *Settings) AsYaml() ([]byte, error)

func (*Settings) CriticalEnvironmentDiagnostics

func (it *Settings) CriticalEnvironmentDiagnostics(target *common.DiagnosticStatus)

func (*Settings) Diagnostics

func (it *Settings) Diagnostics(target *common.DiagnosticStatus)

func (*Settings) Hostnames

func (it *Settings) Hostnames() []string

func (*Settings) Source

func (it *Settings) Source(filename string) *Settings

type SettingsLayers

type SettingsLayers [3]*Settings

layer 0 is defaults from assets layer 1 is settings.yaml from disk layer 2 is "temporary" update layer

func (SettingsLayers) Effective

func (it SettingsLayers) Effective() *Settings

type StringMap

type StringMap map[string]string

func (StringMap) Lookup

func (it StringMap) Lookup(key string) string

Jump to

Keyboard shortcuts

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