1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Files
go-chasquid-smtp/internal/queue/queue.proto
Alberto Bertogli 50986a7b7e Update protobuf library to v2
There is a new protobuf library (and corresponding code generator) for
Go: google.golang.org/protobuf.

It is fairly compatible with the previous v1 API
(github.com/golang/protobuf), but there are some changes.

This patch adjusts the code and generated files to the new API.

The on-wire/on-disk format remains unchanged so this should be
transparent to the users.
2020-05-16 10:12:51 +01:00

51 lines
984 B
Protocol Buffer

syntax = "proto3";
package queue;
option go_package = "blitiri.com.ar/go/chasquid/internal/queue";
import "github.com/golang/protobuf/ptypes/timestamp/timestamp.proto";
message Message {
// Message ID. Uniquely identifies this message, it is used for
// auditing and troubleshooting.
string ID = 1;
// The envelope for this message.
string from = 2;
repeated string To = 3;
repeated Recipient rcpt = 4;
bytes data = 5;
// Creation timestamp.
google.protobuf.Timestamp created_at_ts = 6;
}
message Recipient {
// Address to send the message to.
// This is the final one, after expanding aliases.
string address = 1;
enum Type {
EMAIL = 0;
PIPE = 1;
}
Type type = 2;
enum Status {
PENDING = 0;
SENT = 1;
FAILED = 2;
}
Status status = 3;
string last_failure_message = 4;
// Address that this recipient was originally intended to.
// This is before expanding aliases and only used in very particular
// cases.
string original_address = 5;
}