config

package
v0.0.0-...-82860ec Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() error

Types

type SyncatAuthConfig

type SyncatAuthConfig struct {
	// Token for authentication
	Token string `yaml:"token"`
}

type SyncatConfig

type SyncatConfig struct {
	// Database configuration
	Db SyncatDBConfig `yaml:"db"`
	// Sync configuration
	Sync SyncatSyncConfig `yaml:"sync"`
	// Protocol configuration
	Protocol SyncatProtocolConfig `yaml:"protocol"`
	// Authentication configuration
	Auth SyncatAuthConfig `yaml:"auth"`
}

func GetConfig

func GetConfig() SyncatConfig

type SyncatDBConfig

type SyncatDBConfig struct {
	// Database filename
	Filename string `yaml:"filename"`
}

SyncatDBConfig is the configuration for the database connection

type SyncatProtocolConfig

type SyncatProtocolConfig struct {
	// Buffer size for TCP server
	BufferSize int `yaml:"buffer_size"`
	// Timeout configuration for TCP server
	Timeout int `yaml:"timeout"`
	// Ping interval for TCP server
	PingInterval int `yaml:"ping_interval"`
}

type SyncatSyncConfig

type SyncatSyncConfig struct {
	// Directories to sync
	Directories []string `yaml:"directories"`
}

SyncatSyncConfig is the configuration for syncing

Jump to

Keyboard shortcuts

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