Files
cunicu/pkg/pb/common.proto
Steffen Vogel c73c8b4262 pb: harmonization of protobuf package name
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-05-04 14:05:51 +02:00

47 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package wice;
option go_package = "riasc.eu/wice/pkg/pb";
message Void {}
// ICE Connection state from pion/ice/ice.go
enum ConnectionState {
NEW = 0; // ConnectionStateNew ICE agent is gathering addresses
CHECKING = 1; // ConnectionStateChecking ICE agent has been given local and remote candidates, and is attempting to find a match
CONNECTED = 2; // ConnectionStateConnected ICE agent has a pairing, but is still checking other pairs
COMPLETED = 3; // ConnectionStateCompleted ICE agent has finished
FAILED = 4; // ConnectionStateFailed ICE agent never could successfully connect
DISCONNECTED = 5; // ConnectionStateDisconnected ICE agent connected successfully, but has entered a failed state
CLOSED = 6; // ConnectionStateClosed ICE agent has finished and is no longer handling requests
}
// An UNIX timestamp since 1970-01-01 (UTC)
message Timestamp {
int64 seconds = 1;
int32 nanos = 2;
}
// A common error type used as return value for gRPC calls
message Error {
// The Error code inspired by POSIX's errno
// See: https://pubs.opengroup.org/onlinepubs/009696899/functions/xsh_chap02_03.html
enum Code {
SUCCESS = 0;
EPERM = 1;
ENOENT = 2;
EEXIST = 17;
EALREADY = 18;
ENOTSUP = 10;
EUNKNOWN = 255;
}
// The error code
Code code = 1;
// A human readable error message
string message = 2;
}