syncd

package
v0.0.0-...-96bf70c Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(config *Config) error

SaveConfig saves the configuration to the default location

Types

type Config

type Config struct {
	Repository struct {
		URL      string `json:"url" yaml:"url"`
		Branch   string `json:"branch" yaml:"branch"`
		AuthType string `json:"auth_type" yaml:"auth_type"` // token, ssh
		Token    string `json:"token" yaml:"token"`
		SSHKey   string `json:"ssh_key" yaml:"ssh_key"`
	} `json:"repository" yaml:"repository"`

	Sync struct {
		Frequency  string `json:"frequency" yaml:"frequency"` // e.g., "5m", "1h"
		LocalPath  string `json:"local_path" yaml:"local_path"`
		RemotePath string `json:"remote_path" yaml:"remote_path"`
	} `json:"sync" yaml:"sync"`
}

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the syncd configuration from the default location

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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