Documentation
¶
Index ¶
- Variables
- func GenerateDefaultTemplate(configPath string) error
- func GenerateInteractiveConfig(configPath string) error
- func GeneratePeerIdentity() (string, string, error)
- func HashPassword(password string) string
- func LoadPrivateKeyFromB64(privKeyB64 string) (crypto.PrivKey, error)
- func Save(cfg *Config, configPath string) error
- func VerifyPassword(password, storedHash string) bool
- type ClientConfig
- type CommonConfig
- type Config
- type IdentityConfig
- type LocalServiceConfig
- type ServerConfig
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var True = true
Functions ¶
func GenerateDefaultTemplate ¶
func GeneratePeerIdentity ¶
func HashPassword ¶
HashPassword now uses bcrypt for new hashes. Old salt:sha256 hashes remain valid (backward compatible).
func VerifyPassword ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct {
ServerID string `toml:"server_id"`
Services []LocalServiceConfig `toml:"services"`
}
type CommonConfig ¶
type Config ¶
type Config struct {
IsServer bool `toml:"is_server"`
Identity IdentityConfig `toml:"identity"`
Server ServerConfig `toml:"server,omitempty"`
Client ClientConfig `toml:"client,omitempty"`
Common CommonConfig `toml:"common"`
}
func (*Config) ValidateConfig ¶
type IdentityConfig ¶
type LocalServiceConfig ¶
type ServerConfig ¶
type ServerConfig struct {
PasswordHash string `toml:"password_hash"`
Compress bool `toml:"compress"` // General compression behavior, enforced by the server
// Considering low-CPU client devices, may add client-side switch in the future.
Services []ServiceConfig `toml:"services"`
}
type ServiceConfig ¶
Click to show internal directories.
Click to hide internal directories.