mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-10-05 08:47:03 +08:00
424 lines
12 KiB
Go
424 lines
12 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.27.1
|
|
// protoc v3.19.4
|
|
// source: common.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// ICE Connection state from pion/ice/ice.go
|
|
type ConnectionState int32
|
|
|
|
const (
|
|
ConnectionState_NEW ConnectionState = 0 // ConnectionStateNew ICE agent is gathering addresses
|
|
ConnectionState_CHECKING ConnectionState = 1 // ConnectionStateChecking ICE agent has been given local and remote candidates, and is attempting to find a match
|
|
ConnectionState_CONNECTED ConnectionState = 2 // ConnectionStateConnected ICE agent has a pairing, but is still checking other pairs
|
|
ConnectionState_COMPLETED ConnectionState = 3 // ConnectionStateCompleted ICE agent has finished
|
|
ConnectionState_FAILED ConnectionState = 4 // ConnectionStateFailed ICE agent never could successfully connect
|
|
ConnectionState_DISCONNECTED ConnectionState = 5 // ConnectionStateDisconnected ICE agent connected successfully, but has entered a failed state
|
|
ConnectionState_CLOSED ConnectionState = 6 // ConnectionStateClosed ICE agent has finished and is no longer handling requests
|
|
)
|
|
|
|
// Enum value maps for ConnectionState.
|
|
var (
|
|
ConnectionState_name = map[int32]string{
|
|
0: "NEW",
|
|
1: "CHECKING",
|
|
2: "CONNECTED",
|
|
3: "COMPLETED",
|
|
4: "FAILED",
|
|
5: "DISCONNECTED",
|
|
6: "CLOSED",
|
|
}
|
|
ConnectionState_value = map[string]int32{
|
|
"NEW": 0,
|
|
"CHECKING": 1,
|
|
"CONNECTED": 2,
|
|
"COMPLETED": 3,
|
|
"FAILED": 4,
|
|
"DISCONNECTED": 5,
|
|
"CLOSED": 6,
|
|
}
|
|
)
|
|
|
|
func (x ConnectionState) Enum() *ConnectionState {
|
|
p := new(ConnectionState)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x ConnectionState) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (ConnectionState) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_common_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (ConnectionState) Type() protoreflect.EnumType {
|
|
return &file_common_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x ConnectionState) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use ConnectionState.Descriptor instead.
|
|
func (ConnectionState) EnumDescriptor() ([]byte, []int) {
|
|
return file_common_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
// The Error code inspired by POSIX's errno
|
|
// See: https://pubs.opengroup.org/onlinepubs/009696899/functions/xsh_chap02_03.html
|
|
type Error_Code int32
|
|
|
|
const (
|
|
Error_SUCCESS Error_Code = 0
|
|
Error_EPERM Error_Code = 1
|
|
Error_ENOENT Error_Code = 2
|
|
Error_EEXIST Error_Code = 17
|
|
Error_EALREADY Error_Code = 18
|
|
Error_ENOTSUP Error_Code = 10
|
|
Error_EUNKNOWN Error_Code = 255
|
|
)
|
|
|
|
// Enum value maps for Error_Code.
|
|
var (
|
|
Error_Code_name = map[int32]string{
|
|
0: "SUCCESS",
|
|
1: "EPERM",
|
|
2: "ENOENT",
|
|
17: "EEXIST",
|
|
18: "EALREADY",
|
|
10: "ENOTSUP",
|
|
255: "EUNKNOWN",
|
|
}
|
|
Error_Code_value = map[string]int32{
|
|
"SUCCESS": 0,
|
|
"EPERM": 1,
|
|
"ENOENT": 2,
|
|
"EEXIST": 17,
|
|
"EALREADY": 18,
|
|
"ENOTSUP": 10,
|
|
"EUNKNOWN": 255,
|
|
}
|
|
)
|
|
|
|
func (x Error_Code) Enum() *Error_Code {
|
|
p := new(Error_Code)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x Error_Code) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (Error_Code) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_common_proto_enumTypes[1].Descriptor()
|
|
}
|
|
|
|
func (Error_Code) Type() protoreflect.EnumType {
|
|
return &file_common_proto_enumTypes[1]
|
|
}
|
|
|
|
func (x Error_Code) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use Error_Code.Descriptor instead.
|
|
func (Error_Code) EnumDescriptor() ([]byte, []int) {
|
|
return file_common_proto_rawDescGZIP(), []int{2, 0}
|
|
}
|
|
|
|
type Void struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *Void) Reset() {
|
|
*x = Void{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_common_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Void) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Void) ProtoMessage() {}
|
|
|
|
func (x *Void) ProtoReflect() protoreflect.Message {
|
|
mi := &file_common_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Void.ProtoReflect.Descriptor instead.
|
|
func (*Void) Descriptor() ([]byte, []int) {
|
|
return file_common_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
// An UNIX timestamp since 1970-01-01 (UTC)
|
|
type Timestamp struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
|
|
Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
|
|
}
|
|
|
|
func (x *Timestamp) Reset() {
|
|
*x = Timestamp{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_common_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Timestamp) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Timestamp) ProtoMessage() {}
|
|
|
|
func (x *Timestamp) ProtoReflect() protoreflect.Message {
|
|
mi := &file_common_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.
|
|
func (*Timestamp) Descriptor() ([]byte, []int) {
|
|
return file_common_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Timestamp) GetSeconds() int64 {
|
|
if x != nil {
|
|
return x.Seconds
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Timestamp) GetNanos() int32 {
|
|
if x != nil {
|
|
return x.Nanos
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// A common error type used as return value for gRPC calls
|
|
type Error struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// The error code
|
|
Code Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=wice.Error_Code" json:"code,omitempty"`
|
|
// A human readable error message
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
}
|
|
|
|
func (x *Error) Reset() {
|
|
*x = Error{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_common_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Error) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Error) ProtoMessage() {}
|
|
|
|
func (x *Error) ProtoReflect() protoreflect.Message {
|
|
mi := &file_common_proto_msgTypes[2]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Error.ProtoReflect.Descriptor instead.
|
|
func (*Error) Descriptor() ([]byte, []int) {
|
|
return file_common_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Error) GetCode() Error_Code {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return Error_SUCCESS
|
|
}
|
|
|
|
func (x *Error) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_common_proto protoreflect.FileDescriptor
|
|
|
|
var file_common_proto_rawDesc = []byte{
|
|
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04,
|
|
0x77, 0x69, 0x63, 0x65, 0x22, 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x09,
|
|
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63,
|
|
0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f,
|
|
0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01,
|
|
0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x05, 0x45, 0x72,
|
|
0x72, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
0x0e, 0x32, 0x10, 0x2e, 0x77, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x43,
|
|
0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
|
|
0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
|
0x61, 0x67, 0x65, 0x22, 0x60, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53,
|
|
0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x50, 0x45, 0x52,
|
|
0x4d, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x4f, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12,
|
|
0x0a, 0x0a, 0x06, 0x45, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x11, 0x12, 0x0c, 0x0a, 0x08, 0x45,
|
|
0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x12, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x4f,
|
|
0x54, 0x53, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x0d, 0x0a, 0x08, 0x45, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
|
|
0x57, 0x4e, 0x10, 0xff, 0x01, 0x2a, 0x70, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
|
|
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10,
|
|
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12,
|
|
0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d,
|
|
0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a,
|
|
0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53,
|
|
0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x43,
|
|
0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x06, 0x42, 0x16, 0x5a, 0x14, 0x72, 0x69, 0x61, 0x73, 0x63,
|
|
0x2e, 0x65, 0x75, 0x2f, 0x77, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x62,
|
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_common_proto_rawDescOnce sync.Once
|
|
file_common_proto_rawDescData = file_common_proto_rawDesc
|
|
)
|
|
|
|
func file_common_proto_rawDescGZIP() []byte {
|
|
file_common_proto_rawDescOnce.Do(func() {
|
|
file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData)
|
|
})
|
|
return file_common_proto_rawDescData
|
|
}
|
|
|
|
var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
|
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_common_proto_goTypes = []interface{}{
|
|
(ConnectionState)(0), // 0: wice.ConnectionState
|
|
(Error_Code)(0), // 1: wice.Error.Code
|
|
(*Void)(nil), // 2: wice.Void
|
|
(*Timestamp)(nil), // 3: wice.Timestamp
|
|
(*Error)(nil), // 4: wice.Error
|
|
}
|
|
var file_common_proto_depIdxs = []int32{
|
|
1, // 0: wice.Error.code:type_name -> wice.Error.Code
|
|
1, // [1:1] is the sub-list for method output_type
|
|
1, // [1:1] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_common_proto_init() }
|
|
func file_common_proto_init() {
|
|
if File_common_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Void); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Timestamp); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Error); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_common_proto_rawDesc,
|
|
NumEnums: 2,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_common_proto_goTypes,
|
|
DependencyIndexes: file_common_proto_depIdxs,
|
|
EnumInfos: file_common_proto_enumTypes,
|
|
MessageInfos: file_common_proto_msgTypes,
|
|
}.Build()
|
|
File_common_proto = out.File
|
|
file_common_proto_rawDesc = nil
|
|
file_common_proto_goTypes = nil
|
|
file_common_proto_depIdxs = nil
|
|
}
|