config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Network Config
	GroupName  string `mapstructure:"group_name"`
	ListenHost string `mapstructure:"listen_host"`
	ListenPort int    `mapstructure:"listen_port"`

	// Clipbaord Config
	MaxSize    int `mapstructure:"max_size"`    // limit clipboard size (bytes) to send
	MaxHistory int `mapstructure:"max_history"` // limit number of clipboard history

	// UI Config
	HiddenText bool `mapstructure:"hidden_text"` // hidden clipboard text in UI

	// Device Config
	Username             string            `mapstructure:"-"`           // username of the device
	ID                   p2pcrypto.PrivKey `mapstructure:"-"`           // id private key of this device
	IDPem                string            `mapstructure:"id"`          // id private key pem
	PGPPrivateKey        *gopenpgp.Key     `mapstructure:"-"`           // pgp private key for e2e encryption
	PGPPrivateKeyArmored string            `mapstructure:"private_key"` // armor pgp private key
	AutoTrust            bool              `mapstructure:"auto_trust"`  // auto trust device

	ConfigDirPath string `mapstructure:"config_dir_path"` // config directory path
}

Config config struct for cross clipbaord

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) ResetToDefault

func (c *Config) ResetToDefault() error

Save save config to file

func (*Config) Save

func (c *Config) Save() error

Save save config to file

Jump to

Keyboard shortcuts

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