mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
When we permanently failed to deliver to one or more recipients, send delivery status notifications back to the sender. To do this, we need to extend a couple of internal structures, to keep track of the original destinations (so we can include them in the message, for reference), and the hostname we're identifying ourselves as (this is arguable but we're going with it for now, may change later).
160 lines
6.6 KiB
Go
160 lines
6.6 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: queue.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package queue is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
queue.proto
|
|
|
|
It has these top-level messages:
|
|
Message
|
|
Recipient
|
|
*/
|
|
package queue
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Recipient_Type int32
|
|
|
|
const (
|
|
Recipient_EMAIL Recipient_Type = 0
|
|
Recipient_PIPE Recipient_Type = 1
|
|
)
|
|
|
|
var Recipient_Type_name = map[int32]string{
|
|
0: "EMAIL",
|
|
1: "PIPE",
|
|
}
|
|
var Recipient_Type_value = map[string]int32{
|
|
"EMAIL": 0,
|
|
"PIPE": 1,
|
|
}
|
|
|
|
func (x Recipient_Type) String() string {
|
|
return proto.EnumName(Recipient_Type_name, int32(x))
|
|
}
|
|
func (Recipient_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
|
|
|
|
type Recipient_Status int32
|
|
|
|
const (
|
|
Recipient_PENDING Recipient_Status = 0
|
|
Recipient_SENT Recipient_Status = 1
|
|
Recipient_FAILED Recipient_Status = 2
|
|
)
|
|
|
|
var Recipient_Status_name = map[int32]string{
|
|
0: "PENDING",
|
|
1: "SENT",
|
|
2: "FAILED",
|
|
}
|
|
var Recipient_Status_value = map[string]int32{
|
|
"PENDING": 0,
|
|
"SENT": 1,
|
|
"FAILED": 2,
|
|
}
|
|
|
|
func (x Recipient_Status) String() string {
|
|
return proto.EnumName(Recipient_Status_name, int32(x))
|
|
}
|
|
func (Recipient_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} }
|
|
|
|
type Message struct {
|
|
// Message ID. Uniquely identifies this message, it is used for
|
|
// auditing and troubleshooting.
|
|
ID string `protobuf:"bytes,1,opt,name=ID,json=iD" json:"ID,omitempty"`
|
|
// The envelope for this message.
|
|
From string `protobuf:"bytes,2,opt,name=from" json:"from,omitempty"`
|
|
To []string `protobuf:"bytes,3,rep,name=To,json=to" json:"To,omitempty"`
|
|
Rcpt []*Recipient `protobuf:"bytes,4,rep,name=rcpt" json:"rcpt,omitempty"`
|
|
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
|
|
// Creation timestamp.
|
|
CreatedAtTs *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=created_at_ts,json=createdAtTs" json:"created_at_ts,omitempty"`
|
|
// Hostname of the server receiving this message.
|
|
Hostname string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"`
|
|
}
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
func (*Message) ProtoMessage() {}
|
|
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *Message) GetRcpt() []*Recipient {
|
|
if m != nil {
|
|
return m.Rcpt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetCreatedAtTs() *google_protobuf.Timestamp {
|
|
if m != nil {
|
|
return m.CreatedAtTs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Recipient struct {
|
|
Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
|
|
Type Recipient_Type `protobuf:"varint,2,opt,name=type,enum=queue.Recipient_Type" json:"type,omitempty"`
|
|
Status Recipient_Status `protobuf:"varint,3,opt,name=status,enum=queue.Recipient_Status" json:"status,omitempty"`
|
|
LastFailureMessage string `protobuf:"bytes,4,opt,name=last_failure_message,json=lastFailureMessage" json:"last_failure_message,omitempty"`
|
|
}
|
|
|
|
func (m *Recipient) Reset() { *m = Recipient{} }
|
|
func (m *Recipient) String() string { return proto.CompactTextString(m) }
|
|
func (*Recipient) ProtoMessage() {}
|
|
func (*Recipient) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func init() {
|
|
proto.RegisterType((*Message)(nil), "queue.Message")
|
|
proto.RegisterType((*Recipient)(nil), "queue.Recipient")
|
|
proto.RegisterEnum("queue.Recipient_Type", Recipient_Type_name, Recipient_Type_value)
|
|
proto.RegisterEnum("queue.Recipient_Status", Recipient_Status_name, Recipient_Status_value)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("queue.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 382 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x50, 0x41, 0xcb, 0x9b, 0x40,
|
|
0x10, 0xad, 0x7e, 0x46, 0x93, 0xb1, 0x0d, 0xb2, 0xb4, 0x74, 0x49, 0x2f, 0x41, 0x7a, 0x68, 0x29,
|
|
0x68, 0x49, 0x8f, 0x85, 0x42, 0x40, 0x53, 0x84, 0x26, 0x04, 0xe3, 0x5d, 0x36, 0xba, 0x31, 0x82,
|
|
0x66, 0xad, 0xbb, 0x1e, 0xfa, 0x3b, 0xfb, 0x7b, 0x0a, 0xdd, 0x5d, 0x4d, 0x0a, 0xfd, 0x6e, 0x33,
|
|
0xf3, 0xde, 0x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