446 lines
12 KiB
Go
446 lines
12 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.10
|
|
// protoc v3.21.12
|
|
// source: queue.proto
|
|
|
|
package queue
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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)
|
|
)
|
|
|
|
type Recipient_Type int32
|
|
|
|
const (
|
|
Recipient_EMAIL Recipient_Type = 0
|
|
Recipient_PIPE Recipient_Type = 1
|
|
Recipient_FORWARD Recipient_Type = 2
|
|
)
|
|
|
|
// Enum value maps for Recipient_Type.
|
|
var (
|
|
Recipient_Type_name = map[int32]string{
|
|
0: "EMAIL",
|
|
1: "PIPE",
|
|
2: "FORWARD",
|
|
}
|
|
Recipient_Type_value = map[string]int32{
|
|
"EMAIL": 0,
|
|
"PIPE": 1,
|
|
"FORWARD": 2,
|
|
}
|
|
)
|
|
|
|
func (x Recipient_Type) Enum() *Recipient_Type {
|
|
p := new(Recipient_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x Recipient_Type) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (Recipient_Type) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_queue_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (Recipient_Type) Type() protoreflect.EnumType {
|
|
return &file_queue_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x Recipient_Type) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use Recipient_Type.Descriptor instead.
|
|
func (Recipient_Type) EnumDescriptor() ([]byte, []int) {
|
|
return file_queue_proto_rawDescGZIP(), []int{1, 0}
|
|
}
|
|
|
|
type Recipient_Status int32
|
|
|
|
const (
|
|
Recipient_PENDING Recipient_Status = 0
|
|
Recipient_SENT Recipient_Status = 1
|
|
Recipient_FAILED Recipient_Status = 2
|
|
)
|
|
|
|
// Enum value maps for Recipient_Status.
|
|
var (
|
|
Recipient_Status_name = map[int32]string{
|
|
0: "PENDING",
|
|
1: "SENT",
|
|
2: "FAILED",
|
|
}
|
|
Recipient_Status_value = map[string]int32{
|
|
"PENDING": 0,
|
|
"SENT": 1,
|
|
"FAILED": 2,
|
|
}
|
|
)
|
|
|
|
func (x Recipient_Status) Enum() *Recipient_Status {
|
|
p := new(Recipient_Status)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x Recipient_Status) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (Recipient_Status) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_queue_proto_enumTypes[1].Descriptor()
|
|
}
|
|
|
|
func (Recipient_Status) Type() protoreflect.EnumType {
|
|
return &file_queue_proto_enumTypes[1]
|
|
}
|
|
|
|
func (x Recipient_Status) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use Recipient_Status.Descriptor instead.
|
|
func (Recipient_Status) EnumDescriptor() ([]byte, []int) {
|
|
return file_queue_proto_rawDescGZIP(), []int{1, 1}
|
|
}
|
|
|
|
type Message struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Message ID. Uniquely identifies this message, it is used for
|
|
// auditing and troubleshooting.
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
// The envelope for this message.
|
|
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
|
To []string `protobuf:"bytes,3,rep,name=To,proto3" json:"To,omitempty"`
|
|
Rcpt []*Recipient `protobuf:"bytes,4,rep,name=rcpt,proto3" json:"rcpt,omitempty"`
|
|
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
|
|
// Creation timestamp.
|
|
CreatedAtTs *Timestamp `protobuf:"bytes,6,opt,name=created_at_ts,json=createdAtTs,proto3" json:"created_at_ts,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Message) Reset() {
|
|
*x = Message{}
|
|
mi := &file_queue_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Message) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Message) ProtoMessage() {}
|
|
|
|
func (x *Message) ProtoReflect() protoreflect.Message {
|
|
mi := &file_queue_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return file_queue_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Message) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Message) GetFrom() string {
|
|
if x != nil {
|
|
return x.From
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Message) GetTo() []string {
|
|
if x != nil {
|
|
return x.To
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Message) GetRcpt() []*Recipient {
|
|
if x != nil {
|
|
return x.Rcpt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Message) GetData() []byte {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Message) GetCreatedAtTs() *Timestamp {
|
|
if x != nil {
|
|
return x.CreatedAtTs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Recipient struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Address to send the message to.
|
|
// This is the final one, after expanding aliases.
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
|
Type Recipient_Type `protobuf:"varint,2,opt,name=type,proto3,enum=queue.Recipient_Type" json:"type,omitempty"`
|
|
Status Recipient_Status `protobuf:"varint,3,opt,name=status,proto3,enum=queue.Recipient_Status" json:"status,omitempty"`
|
|
LastFailureMessage string `protobuf:"bytes,4,opt,name=last_failure_message,json=lastFailureMessage,proto3" json:"last_failure_message,omitempty"`
|
|
// Address that this recipient was originally intended to.
|
|
// This is before expanding aliases and only used in very particular
|
|
// cases.
|
|
OriginalAddress string `protobuf:"bytes,5,opt,name=original_address,json=originalAddress,proto3" json:"original_address,omitempty"`
|
|
// The list of servers to use, for recipients of type == FORWARD.
|
|
Via []string `protobuf:"bytes,6,rep,name=via,proto3" json:"via,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Recipient) Reset() {
|
|
*x = Recipient{}
|
|
mi := &file_queue_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Recipient) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Recipient) ProtoMessage() {}
|
|
|
|
func (x *Recipient) ProtoReflect() protoreflect.Message {
|
|
mi := &file_queue_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Recipient.ProtoReflect.Descriptor instead.
|
|
func (*Recipient) Descriptor() ([]byte, []int) {
|
|
return file_queue_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Recipient) GetAddress() string {
|
|
if x != nil {
|
|
return x.Address
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Recipient) GetType() Recipient_Type {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return Recipient_EMAIL
|
|
}
|
|
|
|
func (x *Recipient) GetStatus() Recipient_Status {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return Recipient_PENDING
|
|
}
|
|
|
|
func (x *Recipient) GetLastFailureMessage() string {
|
|
if x != nil {
|
|
return x.LastFailureMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Recipient) GetOriginalAddress() string {
|
|
if x != nil {
|
|
return x.OriginalAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Recipient) GetVia() []string {
|
|
if x != nil {
|
|
return x.Via
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Timestamp representation, for convenience.
|
|
// We used to use the well-known type, but the dependency makes packaging much
|
|
// more convoluted and adds very little value, so we now just include it here.
|
|
type Timestamp struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Represents seconds of UTC time since Unix epoch.
|
|
Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
|
|
// Non-negative fractions of a second at nanosecond resolution.
|
|
Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Timestamp) Reset() {
|
|
*x = Timestamp{}
|
|
mi := &file_queue_proto_msgTypes[2]
|
|
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_queue_proto_msgTypes[2]
|
|
if 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_queue_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
var File_queue_proto protoreflect.FileDescriptor
|
|
|
|
const file_queue_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\vqueue.proto\x12\x05queue\"\xad\x01\n" +
|
|
"\aMessage\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
|
|
"\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" +
|
|
"\x02To\x18\x03 \x03(\tR\x02To\x12$\n" +
|
|
"\x04rcpt\x18\x04 \x03(\v2\x10.queue.RecipientR\x04rcpt\x12\x12\n" +
|
|
"\x04data\x18\x05 \x01(\fR\x04data\x124\n" +
|
|
"\rcreated_at_ts\x18\x06 \x01(\v2\x10.queue.TimestampR\vcreatedAtTs\"\xc7\x02\n" +
|
|
"\tRecipient\x12\x18\n" +
|
|
"\aaddress\x18\x01 \x01(\tR\aaddress\x12)\n" +
|
|
"\x04type\x18\x02 \x01(\x0e2\x15.queue.Recipient.TypeR\x04type\x12/\n" +
|
|
"\x06status\x18\x03 \x01(\x0e2\x17.queue.Recipient.StatusR\x06status\x120\n" +
|
|
"\x14last_failure_message\x18\x04 \x01(\tR\x12lastFailureMessage\x12)\n" +
|
|
"\x10original_address\x18\x05 \x01(\tR\x0foriginalAddress\x12\x10\n" +
|
|
"\x03via\x18\x06 \x03(\tR\x03via\"(\n" +
|
|
"\x04Type\x12\t\n" +
|
|
"\x05EMAIL\x10\x00\x12\b\n" +
|
|
"\x04PIPE\x10\x01\x12\v\n" +
|
|
"\aFORWARD\x10\x02\"+\n" +
|
|
"\x06Status\x12\v\n" +
|
|
"\aPENDING\x10\x00\x12\b\n" +
|
|
"\x04SENT\x10\x01\x12\n" +
|
|
"\n" +
|
|
"\x06FAILED\x10\x02\";\n" +
|
|
"\tTimestamp\x12\x18\n" +
|
|
"\aseconds\x18\x01 \x01(\x03R\aseconds\x12\x14\n" +
|
|
"\x05nanos\x18\x02 \x01(\x05R\x05nanosB+Z)blitiri.com.ar/go/chasquid/internal/queueb\x06proto3"
|
|
|
|
var (
|
|
file_queue_proto_rawDescOnce sync.Once
|
|
file_queue_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_queue_proto_rawDescGZIP() []byte {
|
|
file_queue_proto_rawDescOnce.Do(func() {
|
|
file_queue_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_queue_proto_rawDesc), len(file_queue_proto_rawDesc)))
|
|
})
|
|
return file_queue_proto_rawDescData
|
|
}
|
|
|
|
var file_queue_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
|
var file_queue_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_queue_proto_goTypes = []any{
|
|
(Recipient_Type)(0), // 0: queue.Recipient.Type
|
|
(Recipient_Status)(0), // 1: queue.Recipient.Status
|
|
(*Message)(nil), // 2: queue.Message
|
|
(*Recipient)(nil), // 3: queue.Recipient
|
|
(*Timestamp)(nil), // 4: queue.Timestamp
|
|
}
|
|
var file_queue_proto_depIdxs = []int32{
|
|
3, // 0: queue.Message.rcpt:type_name -> queue.Recipient
|
|
4, // 1: queue.Message.created_at_ts:type_name -> queue.Timestamp
|
|
0, // 2: queue.Recipient.type:type_name -> queue.Recipient.Type
|
|
1, // 3: queue.Recipient.status:type_name -> queue.Recipient.Status
|
|
4, // [4:4] is the sub-list for method output_type
|
|
4, // [4:4] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_queue_proto_init() }
|
|
func file_queue_proto_init() {
|
|
if File_queue_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_queue_proto_rawDesc), len(file_queue_proto_rawDesc)),
|
|
NumEnums: 2,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_queue_proto_goTypes,
|
|
DependencyIndexes: file_queue_proto_depIdxs,
|
|
EnumInfos: file_queue_proto_enumTypes,
|
|
MessageInfos: file_queue_proto_msgTypes,
|
|
}.Build()
|
|
File_queue_proto = out.File
|
|
file_queue_proto_goTypes = nil
|
|
file_queue_proto_depIdxs = nil
|
|
}
|