transfer

package
v0.0.0-...-f1366d8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 2 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 {
	NTP        bool   `yaml:"ntp"`
	Timezone   string `yaml:"timezone,omitempty"`
	ProxyHTTP  string `yaml:"http,omitempty"`
	ProxyHTTPS string `yaml:"https,omitempty"`
	ProxyFTP   string `yaml:"ftp,omitempty"`
}

Config holds the configuration data for export/import

type Service

type Service interface {
	Export() (*Config, error)
	Import(cfg Config) error
}

Service is the interface for export and import of the configuration

type Transfer

type Transfer struct {
	DBusSrv dbus.Service
	SnapSrv snapd.Client
}

Transfer is the implementation of the transfer config service

func NewTransfer

func NewTransfer(dbusSrv dbus.Service, snapSrv snapd.Client) *Transfer

NewTransfer creates a new transfer service

func (*Transfer) Export

func (x *Transfer) Export() (*Config, error)

Export generates an export representation of the configuration

func (*Transfer) Import

func (x *Transfer) Import(cfg Config) error

Import sets the configuration from the export format

Jump to

Keyboard shortcuts

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