syntax = "proto3";

package remoteks;

import "google/protobuf/Empty.proto";

// N.B. GRPC for Go will always add an error to the generated
// signatures, Empty is used in responses where we don't need
// additional information beyond this error.
service Store {
    rpc Set (SetMsg) returns (google.protobuf.Empty) {
    }

    rpc Remove (FileNameMsg) returns (google.protobuf.Empty) {
    }

    rpc Get (FileNameMsg) returns (ByteMsg) {
    }

    rpc ListFiles (google.protobuf.Empty) returns (StringListMsg) {
    }
}

message SetMsg {
    string FileName = 1;
    bytes Data = 2;
}

message FileNameMsg {
    string FileName = 1;
}

message ByteMsg {
    bytes Data = 1;
}

message StringListMsg {
    repeated string FileNames = 1;
}
