Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRemoteSyncStore ¶
func NewRemoteSyncStore(username, password string, rsCert []byte, rsId *id.ID, rsHost *connect.Host, rng csprng.Source) (collective.RemoteStore, error)
NewRemoteSyncStore returns a collective.RemoteStore interface which can be used to interact with a remote sync server. This accepts a username and password for the remote sync server, an ID, a host for the server connection, and an RNG source.
Types ¶
type Comms ¶
type Comms interface { Login(host *connect.Host, msg *pb.RsAuthenticationRequest) ( *pb.RsAuthenticationResponse, error) Read(host *connect.Host, msg *pb.RsReadRequest) (*pb.RsReadResponse, error) Write(host *connect.Host, msg *pb.RsWriteRequest) (*messages.Ack, error) GetLastModified(host *connect.Host, msg *pb.RsReadRequest) ( *pb.RsTimestampResponse, error) GetLastWrite(host *connect.Host, msg *pb.RsLastWriteRequest) ( *pb.RsTimestampResponse, error) ReadDir(host *connect.Host, msg *pb.RsReadRequest) ( *pb.RsReadDirResponse, error) }
Comms interface for remote sync, allowing us to mock the comms for testing.
Click to show internal directories.
Click to hide internal directories.