Documentation ¶
Overview ¶
Package mailer contains the public API protobuf messages.
Index ¶
- Constants
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterMailerServer(s grpc.ServiceRegistrar, srv MailerServer)
- type MailerClient
- type MailerServer
- type SendMailRequest
- func (*SendMailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendMailRequest) GetBcc() []string
- func (x *SendMailRequest) GetCc() []string
- func (x *SendMailRequest) GetHtmlBody() string
- func (x *SendMailRequest) GetReplyTo() string
- func (x *SendMailRequest) GetRequestId() string
- func (x *SendMailRequest) GetSender() string
- func (x *SendMailRequest) GetSubject() string
- func (x *SendMailRequest) GetTextBody() string
- func (x *SendMailRequest) GetTo() []string
- func (*SendMailRequest) ProtoMessage()
- func (x *SendMailRequest) ProtoReflect() protoreflect.Message
- func (x *SendMailRequest) Reset()
- func (x *SendMailRequest) String() string
- type SendMailResponse
- type UnimplementedMailerServer
- type UnsafeMailerServer
Constants ¶
const (
Mailer_SendMail_FullMethodName = "/luci.mailer.v1.Mailer/SendMail"
)
Variables ¶
var File_go_chromium_org_luci_mailer_api_mailer_mailer_proto protoreflect.FileDescriptor
var Mailer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "luci.mailer.v1.Mailer", HandlerType: (*MailerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMail", Handler: _Mailer_SendMail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "go.chromium.org/luci/mailer/api/mailer/mailer.proto", }
Mailer_ServiceDesc is the grpc.ServiceDesc for Mailer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptorpb.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterMailerServer ¶
func RegisterMailerServer(s grpc.ServiceRegistrar, srv MailerServer)
Types ¶
type MailerClient ¶
type MailerClient interface { // SendMail enqueues an email for sending. // // On OK RPC status code, the email was enqueued and will eventually be sent. // The response contains an opaque identifier that can be used to trace this // operation in logs. // // Transient error status codes (INTERNAL, UNKNOWN, etc.) indicate that the // email may or may not been enqueued. The caller should retry, passing the // exact same `request_id`. // // Non-retryable errors (per https://google.aip.dev/194) indicate that the // email was rejected and retries won't help. SendMail(ctx context.Context, in *SendMailRequest, opts ...grpc.CallOption) (*SendMailResponse, error) }
MailerClient is the client API for Mailer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMailerClient ¶
func NewMailerClient(cc grpc.ClientConnInterface) MailerClient
type MailerServer ¶
type MailerServer interface { // SendMail enqueues an email for sending. // // On OK RPC status code, the email was enqueued and will eventually be sent. // The response contains an opaque identifier that can be used to trace this // operation in logs. // // Transient error status codes (INTERNAL, UNKNOWN, etc.) indicate that the // email may or may not been enqueued. The caller should retry, passing the // exact same `request_id`. // // Non-retryable errors (per https://google.aip.dev/194) indicate that the // email was rejected and retries won't help. SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error) // contains filtered or unexported methods }
MailerServer is the server API for Mailer service. All implementations must embed UnimplementedMailerServer for forward compatibility
type SendMailRequest ¶
type SendMailRequest struct { // A unique identifier for this request to guarantee idempotency. // // Restricted to 36 ASCII characters. A random UUID is recommended. This // request is only idempotent if a `request_id` is provided. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Sender is put into "From" email header field. // // The server will validate this field and reject requests that use disallowed // values (based on the authenticated identity of the caller). Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // ReplyTo is put into "Reply-To" email header field. ReplyTo string `protobuf:"bytes,3,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"` // To is put into "To" email header field. To []string `protobuf:"bytes,4,rep,name=to,proto3" json:"to,omitempty"` // Cc is put into "Cc" email header field. Cc []string `protobuf:"bytes,5,rep,name=cc,proto3" json:"cc,omitempty"` // Bcc is put into "Bcc" email header field. Bcc []string `protobuf:"bytes,6,rep,name=bcc,proto3" json:"bcc,omitempty"` // Subject is put into "Subject" email header field. Subject string `protobuf:"bytes,7,opt,name=subject,proto3" json:"subject,omitempty"` // TextBody contains a plaintext body of the email message. TextBody string `protobuf:"bytes,8,opt,name=text_body,json=textBody,proto3" json:"text_body,omitempty"` // HtmlBody contains an HTML body of the email message. HtmlBody string `protobuf:"bytes,9,opt,name=html_body,json=htmlBody,proto3" json:"html_body,omitempty"` // contains filtered or unexported fields }
SendMailRequest is passed to SendMail RPC and contains the email to send.
Addresses may be of any form permitted by RFC 822. At least one of To, Cc, or Bcc must be non-empty.
At least one of TextBody or HtmlBody must be non-empty.
func (*SendMailRequest) Descriptor
deprecated
func (*SendMailRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendMailRequest.ProtoReflect.Descriptor instead.
func (*SendMailRequest) GetBcc ¶
func (x *SendMailRequest) GetBcc() []string
func (*SendMailRequest) GetCc ¶
func (x *SendMailRequest) GetCc() []string
func (*SendMailRequest) GetHtmlBody ¶
func (x *SendMailRequest) GetHtmlBody() string
func (*SendMailRequest) GetReplyTo ¶
func (x *SendMailRequest) GetReplyTo() string
func (*SendMailRequest) GetRequestId ¶
func (x *SendMailRequest) GetRequestId() string
func (*SendMailRequest) GetSender ¶
func (x *SendMailRequest) GetSender() string
func (*SendMailRequest) GetSubject ¶
func (x *SendMailRequest) GetSubject() string
func (*SendMailRequest) GetTextBody ¶
func (x *SendMailRequest) GetTextBody() string
func (*SendMailRequest) GetTo ¶
func (x *SendMailRequest) GetTo() []string
func (*SendMailRequest) ProtoMessage ¶
func (*SendMailRequest) ProtoMessage()
func (*SendMailRequest) ProtoReflect ¶
func (x *SendMailRequest) ProtoReflect() protoreflect.Message
func (*SendMailRequest) Reset ¶
func (x *SendMailRequest) Reset()
func (*SendMailRequest) String ¶
func (x *SendMailRequest) String() string
type SendMailResponse ¶
type SendMailResponse struct { // MessageId as an opaque identifier of the enqueued email. MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
SendMailResponse is returned by SendMail RPC.
func (*SendMailResponse) Descriptor
deprecated
func (*SendMailResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendMailResponse.ProtoReflect.Descriptor instead.
func (*SendMailResponse) GetMessageId ¶
func (x *SendMailResponse) GetMessageId() string
func (*SendMailResponse) ProtoMessage ¶
func (*SendMailResponse) ProtoMessage()
func (*SendMailResponse) ProtoReflect ¶
func (x *SendMailResponse) ProtoReflect() protoreflect.Message
func (*SendMailResponse) Reset ¶
func (x *SendMailResponse) Reset()
func (*SendMailResponse) String ¶
func (x *SendMailResponse) String() string
type UnimplementedMailerServer ¶
type UnimplementedMailerServer struct { }
UnimplementedMailerServer must be embedded to have forward compatible implementations.
func (UnimplementedMailerServer) SendMail ¶
func (UnimplementedMailerServer) SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error)
type UnsafeMailerServer ¶
type UnsafeMailerServer interface {
// contains filtered or unexported methods
}
UnsafeMailerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MailerServer will result in compilation errors.