ricochet-go/vendor/github.com/s-rah/go-ricochet/wire/contact/request.go

166 lines
4.3 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go.
// source: ContactRequestChannel.proto
// DO NOT EDIT!
/*
Package Protocol_Data_ContactRequest is a generated protocol buffer package.
It is generated from these files:
ContactRequestChannel.proto
It has these top-level messages:
ContactRequest
Response
*/
package Protocol_Data_ContactRequest
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import Protocol_Data_Control "github.com/s-rah/go-ricochet/wire/control"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Limits int32
const (
Limits_MessageMaxCharacters Limits = 2000
Limits_NicknameMaxCharacters Limits = 30
)
var Limits_name = map[int32]string{
2000: "MessageMaxCharacters",
30: "NicknameMaxCharacters",
}
var Limits_value = map[string]int32{
"MessageMaxCharacters": 2000,
"NicknameMaxCharacters": 30,
}
func (x Limits) Enum() *Limits {
p := new(Limits)
*p = x
return p
}
func (x Limits) String() string {
return proto.EnumName(Limits_name, int32(x))
}
func (x *Limits) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Limits_value, data, "Limits")
if err != nil {
return err
}
*x = Limits(value)
return nil
}
type Response_Status int32
const (
Response_Undefined Response_Status = 0
Response_Pending Response_Status = 1
Response_Accepted Response_Status = 2
Response_Rejected Response_Status = 3
Response_Error Response_Status = 4
)
var Response_Status_name = map[int32]string{
0: "Undefined",
1: "Pending",
2: "Accepted",
3: "Rejected",
4: "Error",
}
var Response_Status_value = map[string]int32{
"Undefined": 0,
"Pending": 1,
"Accepted": 2,
"Rejected": 3,
"Error": 4,
}
func (x Response_Status) Enum() *Response_Status {
p := new(Response_Status)
*p = x
return p
}
func (x Response_Status) String() string {
return proto.EnumName(Response_Status_name, int32(x))
}
func (x *Response_Status) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Response_Status_value, data, "Response_Status")
if err != nil {
return err
}
*x = Response_Status(value)
return nil
}
// Sent only as an attachment to OpenChannel
type ContactRequest struct {
Nickname *string `protobuf:"bytes,1,opt,name=nickname" json:"nickname,omitempty"`
MessageText *string `protobuf:"bytes,2,opt,name=message_text" json:"message_text,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ContactRequest) Reset() { *m = ContactRequest{} }
func (m *ContactRequest) String() string { return proto.CompactTextString(m) }
func (*ContactRequest) ProtoMessage() {}
func (m *ContactRequest) GetNickname() string {
if m != nil && m.Nickname != nil {
return *m.Nickname
}
return ""
}
func (m *ContactRequest) GetMessageText() string {
if m != nil && m.MessageText != nil {
return *m.MessageText
}
return ""
}
// Response is the only valid message to send on the channel
type Response struct {
Status *Response_Status `protobuf:"varint,1,req,name=status,enum=Protocol.Data.ContactRequest.Response_Status" json:"status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (m *Response) GetStatus() Response_Status {
if m != nil && m.Status != nil {
return *m.Status
}
return Response_Undefined
}
var E_ContactRequest = &proto.ExtensionDesc{
ExtendedType: (*Protocol_Data_Control.OpenChannel)(nil),
ExtensionType: (*ContactRequest)(nil),
Field: 200,
Name: "Protocol.Data.ContactRequest.contact_request",
Tag: "bytes,200,opt,name=contact_request",
}
var E_Response = &proto.ExtensionDesc{
ExtendedType: (*Protocol_Data_Control.ChannelResult)(nil),
ExtensionType: (*Response)(nil),
Field: 201,
Name: "Protocol.Data.ContactRequest.response",
Tag: "bytes,201,opt,name=response",
}
func init() {
proto.RegisterEnum("Protocol.Data.ContactRequest.Limits", Limits_name, Limits_value)
proto.RegisterEnum("Protocol.Data.ContactRequest.Response_Status", Response_Status_name, Response_Status_value)
proto.RegisterExtension(E_ContactRequest)
proto.RegisterExtension(E_Response)
}