services

package
v0.0.0-...-b178966 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileEnv = "STAKING_CONFIG"

Variables

This section is empty.

Functions

This section is empty.

Types

type FigmentConfig

type FigmentConfig struct {
	BaseUrl  string        `mapstructure:"base_url,omitempty" json:"base_url,omitempty" yaml:"base_url,omitempty" toml:"base_url,omitempty"`
	ApiToken config.Secret `mapstructure:"api_token,omitempty" json:"api_token,omitempty" yaml:"api_token,omitempty" toml:"api_token,omitempty"`
	Network  string        `mapstructure:"network,omitempty" json:"network,omitempty" yaml:"network,omitempty" toml:"network,omitempty"`
}

type KilnConfig

type KilnConfig struct {
	BaseUrl  string        `mapstructure:"base_url,omitempty" json:"base_url,omitempty" yaml:"base_url,omitempty" toml:"base_url,omitempty"`
	ApiToken config.Secret `mapstructure:"api_token,omitempty" json:"api_token,omitempty" yaml:"api_token,omitempty" toml:"api_token,omitempty"`
}

type ServicesConfig

type ServicesConfig struct {
	Kiln      KilnConfig      `mapstructure:"kiln" json:"kiln" yaml:"kiln" toml:"kiln"`
	Twinstake TwinstakeConfig `mapstructure:"twinstake" json:"twinstake" yaml:"twinstake" toml:"twinstake"`
	Figment   FigmentConfig   `mapstructure:"figment" json:"figment" yaml:"figment" toml:"figment"`
}

func DefaultConfig

func DefaultConfig(network xc.NetworkSelector) *ServicesConfig

func LoadConfig

func LoadConfig(network xc.NetworkSelector) (*ServicesConfig, error)

func LoadConfigFromFile

func LoadConfigFromFile(network xc.NetworkSelector, file string) (*ServicesConfig, error)

func (*ServicesConfig) GetApiSecret

func (c *ServicesConfig) GetApiSecret(provider xc.StakingProvider) config.Secret

type TwinstakeConfig

type TwinstakeConfig struct {
	BaseUrl string `mapstructure:"base_url,omitempty" json:"base_url,omitempty" yaml:"base_url,omitempty" toml:"base_url,omitempty"`

	Username string        `mapstructure:"username" json:"username" yaml:"username" toml:"username"`
	Password config.Secret `mapstructure:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty" toml:"password,omitempty"`
	ClientId string        `mapstructure:"client_id" json:"client_id" yaml:"client_id" toml:"client_id"`
	Region   string        `mapstructure:"region" json:"region" yaml:"region" toml:"region"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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