client

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comms

type Comms struct {
	*connect.ProtoComms
}

Comms is an object used for top-level remote sync client calls.

func NewClientComms

func NewClientComms(id *id.ID, pubKeyPem, privKeyPem, salt []byte) (*Comms, error)

NewClientComms returns a Comms object with given attributes.

func (*Comms) GetLastModified

func (rc *Comms) GetLastModified(host *connect.Host, msg *pb.RsReadRequest) (*pb.RsTimestampResponse, error)

GetLastModified returns the last time a path was modified.

func (*Comms) GetLastWrite

func (rc *Comms) GetLastWrite(host *connect.Host, msg *pb.RsLastWriteRequest) (*pb.RsTimestampResponse, error)

GetLastWrite returns the last time a remote sync server was modified.

func (*Comms) Login

Login to the server, receiving an authentication token

func (*Comms) Read

func (rc *Comms) Read(host *connect.Host, msg *pb.RsReadRequest) (*pb.RsReadResponse, error)

Read a resource from a RemoteSync server.

func (*Comms) ReadDir

func (rc *Comms) ReadDir(host *connect.Host, msg *pb.RsReadRequest) (*pb.RsReadDirResponse, error)

ReadDir returns all entries in a given path.

func (*Comms) Write

func (rc *Comms) Write(host *connect.Host, msg *pb.RsWriteRequest) (*messages.Ack, error)

Write data to a path at a RemoteSync server

Jump to

Keyboard shortcuts

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