dsync

package
v0.0.0-...-61f35a2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnTypeWIFI = "wifi"
)

Variables

View Source
var (
	ErrConnUnsupportedType = errors.New("unsupported connection type")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(name string, core Interface, sessionSigLoop *dbusutil.SignalLoop,
	path dbus.ObjectPath, logger *log.Logger) *Config

func (*Config) Destroy

func (c *Config) Destroy()

func (*Config) Get

func (c *Config) Get() (data []byte, busErr *dbus.Error)

func (*Config) GetExportedMethods

func (v *Config) GetExportedMethods() dbusutil.ExportedMethods

func (*Config) GetInterfaceName

func (*Config) GetInterfaceName() string

func (*Config) Register

func (c *Config) Register() error

func (*Config) Set

func (c *Config) Set(data []byte) *dbus.Error

type Connection

type Connection struct {
	Type     string `json:"type"`
	Filename string `json:"filename"`
	Contents []byte `json:"contents"`
}

func (*Connection) Check

func (data *Connection) Check() error

func (*Connection) Equal

func (data *Connection) Equal(info *Connection) bool

func (*Connection) RemoveFile

func (data *Connection) RemoveFile(dir string) error

func (*Connection) WriteFile

func (data *Connection) WriteFile(dir string) error

type ConnectionList

type ConnectionList []*Connection

func (ConnectionList) Check

func (datas ConnectionList) Check() error

func (ConnectionList) Diff

func (datas ConnectionList) Diff(list ConnectionList) ConnectionList

func (ConnectionList) Exists

func (datas ConnectionList) Exists(data *Connection) bool

func (ConnectionList) Get

func (datas ConnectionList) Get(ty, filename string) *Connection

func (ConnectionList) Len

func (datas ConnectionList) Len() int

func (ConnectionList) Less

func (datas ConnectionList) Less(i, j int) bool

func (ConnectionList) Swap

func (datas ConnectionList) Swap(i, j int)

type Interface

type Interface interface {
	Get() (interface{}, error)
	Set(data []byte) error
}

type NetworkData

type NetworkData struct {
	Version     string         `json:"version"`
	Connections ConnectionList `json:"connections"`
}

Jump to

Keyboard shortcuts

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