ricochet protobuf files, for completeness
This commit is contained in:
parent
cc6076760f
commit
b3c09e5409
|
@ -39,8 +39,8 @@ pipeline:
|
|||
notify-gogs:
|
||||
image: golang
|
||||
when:
|
||||
event: pull-request
|
||||
event: pull_request
|
||||
secrets: [BUILDBOT]
|
||||
commands:
|
||||
- echo "Notifying"
|
||||
- sh gogs-notify.sh
|
||||
- sh gogs-notify.sh
|
||||
|
|
4
LICENSE
4
LICENSE
|
@ -25,7 +25,7 @@ SOFTWARE.
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Autogenerated protobuf code was generated using the proto file from Ricochet.
|
||||
Autogenerated protobuf code was generated using the proto files from Ricochet.
|
||||
They are covered under the following license.
|
||||
|
||||
Ricochet - https://ricochet.im/
|
||||
|
@ -61,4 +61,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
go-ricochet is not affiliated with or endorsed by Ricochet.im or the Tor Project.
|
||||
libricochet-go is not affiliated with or endorsed by Ricochet.im or the Tor Project.
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package Protocol.Data.AuthHiddenService;
|
||||
import "ControlChannel.proto";
|
||||
|
||||
extend Control.OpenChannel {
|
||||
optional bytes client_cookie = 7200; // 16 random bytes
|
||||
}
|
||||
|
||||
extend Control.ChannelResult {
|
||||
optional bytes server_cookie = 7200; // 16 random bytes
|
||||
}
|
||||
|
||||
message Packet {
|
||||
optional Proof proof = 1;
|
||||
optional Result result = 2;
|
||||
}
|
||||
|
||||
message Proof {
|
||||
optional bytes public_key = 1; // DER encoded public key
|
||||
optional bytes signature = 2; // RSA signature
|
||||
}
|
||||
|
||||
message Result {
|
||||
required bool accepted = 1;
|
||||
optional bool is_known_contact = 2;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package Protocol.Data.Chat;
|
||||
|
||||
message Packet {
|
||||
optional ChatMessage chat_message = 1;
|
||||
optional ChatAcknowledge chat_acknowledge = 2;
|
||||
}
|
||||
|
||||
message ChatMessage {
|
||||
required string message_text = 1;
|
||||
optional uint32 message_id = 2; // Random ID for ack
|
||||
optional int64 time_delta = 3; // Delta in seconds between now and when message was written
|
||||
}
|
||||
|
||||
message ChatAcknowledge {
|
||||
optional uint32 message_id = 1;
|
||||
optional bool accepted = 2 [default = true];
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package Protocol.Data.ContactRequest;
|
||||
import "ControlChannel.proto";
|
||||
|
||||
enum Limits {
|
||||
MessageMaxCharacters = 2000;
|
||||
NicknameMaxCharacters = 30;
|
||||
}
|
||||
|
||||
extend Control.OpenChannel {
|
||||
optional ContactRequest contact_request = 200;
|
||||
}
|
||||
|
||||
extend Control.ChannelResult {
|
||||
optional Response response = 201;
|
||||
}
|
||||
|
||||
// Sent only as an attachment to OpenChannel
|
||||
message ContactRequest {
|
||||
optional string nickname = 1;
|
||||
optional string message_text = 2;
|
||||
}
|
||||
|
||||
// Response is the only valid message to send on the channel
|
||||
message Response {
|
||||
enum Status {
|
||||
Undefined = 0; // Not valid on the wire
|
||||
Pending = 1;
|
||||
Accepted = 2;
|
||||
Rejected = 3;
|
||||
Error = 4;
|
||||
}
|
||||
|
||||
required Status status = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package Protocol.Data.Control;
|
||||
|
||||
message Packet {
|
||||
// Must contain exactly one field
|
||||
optional OpenChannel open_channel = 1;
|
||||
optional ChannelResult channel_result = 2;
|
||||
optional KeepAlive keep_alive = 3;
|
||||
optional EnableFeatures enable_features = 4;
|
||||
optional FeaturesEnabled features_enabled = 5;
|
||||
}
|
||||
|
||||
message OpenChannel {
|
||||
required int32 channel_identifier = 1; // Arbitrary unique identifier for this channel instance
|
||||
required string channel_type = 2; // String identifying channel type; e.g. im.ricochet.chat
|
||||
|
||||
// It is valid to extend the OpenChannel message to add fields specific
|
||||
// to the requested channel_type.
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
message ChannelResult {
|
||||
required int32 channel_identifier = 1; // Matching the value from OpenChannel
|
||||
required bool opened = 2; // If the channel is now open
|
||||
|
||||
enum CommonError {
|
||||
GenericError = 0;
|
||||
UnknownTypeError = 1;
|
||||
UnauthorizedError = 2;
|
||||
BadUsageError = 3;
|
||||
FailedError = 4;
|
||||
}
|
||||
|
||||
optional CommonError common_error = 3;
|
||||
|
||||
// As with OpenChannel, it is valid to extend this message with fields specific
|
||||
// to the channel type.
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
message KeepAlive {
|
||||
required bool response_requested = 1;
|
||||
}
|
||||
|
||||
message EnableFeatures {
|
||||
repeated string feature = 1;
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
message FeaturesEnabled {
|
||||
repeated string feature = 1;
|
||||
extensions 100 to max;
|
||||
}
|
Reference in New Issue