Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterEmailClassificationServiceServer(s grpc.ServiceRegistrar, srv EmailClassificationServiceServer)
- type EmailAddress
- func (*EmailAddress) Descriptor() ([]byte, []int)deprecated
- func (x *EmailAddress) GetDomain() string
- func (x *EmailAddress) GetEmail() string
- func (x *EmailAddress) GetName() string
- func (x *EmailAddress) GetUser() string
- func (*EmailAddress) ProtoMessage()
- func (x *EmailAddress) ProtoReflect() protoreflect.Message
- func (x *EmailAddress) Reset()
- func (x *EmailAddress) String() string
- type EmailClassification
- func (EmailClassification) Descriptor() protoreflect.EnumDescriptor
- func (x EmailClassification) Enum() *EmailClassification
- func (EmailClassification) EnumDescriptor() ([]byte, []int)deprecated
- func (x EmailClassification) Number() protoreflect.EnumNumber
- func (x EmailClassification) String() string
- func (EmailClassification) Type() protoreflect.EnumType
- type EmailClassificationRequest
- func (*EmailClassificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EmailClassificationRequest) GetAutoSubmitted() string
- func (x *EmailClassificationRequest) GetBcc() []*EmailAddress
- func (x *EmailClassificationRequest) GetCc() []*EmailAddress
- func (x *EmailClassificationRequest) GetContentDescription() string
- func (x *EmailClassificationRequest) GetDkim() string
- func (x *EmailClassificationRequest) GetDmarc() string
- func (x *EmailClassificationRequest) GetEmailId() string
- func (x *EmailClassificationRequest) GetFeedbackId() string
- func (x *EmailClassificationRequest) GetForwardedFor() string
- func (x *EmailClassificationRequest) GetFrom() *EmailAddress
- func (x *EmailClassificationRequest) GetListUnsubscribe() string
- func (x *EmailClassificationRequest) GetPrecedence() string
- func (x *EmailClassificationRequest) GetReplyTo() *EmailAddress
- func (x *EmailClassificationRequest) GetReturnPath() string
- func (x *EmailClassificationRequest) GetSender() string
- func (x *EmailClassificationRequest) GetSpf() string
- func (x *EmailClassificationRequest) GetSubject() string
- func (x *EmailClassificationRequest) GetTo() []*EmailAddress
- func (x *EmailClassificationRequest) GetUnsubscribe() string
- func (x *EmailClassificationRequest) GetXAutoReply() string
- func (x *EmailClassificationRequest) GetXAutoResponse() string
- func (x *EmailClassificationRequest) GetXFailedRecipients() string
- func (x *EmailClassificationRequest) GetXLoop() string
- func (*EmailClassificationRequest) ProtoMessage()
- func (x *EmailClassificationRequest) ProtoReflect() protoreflect.Message
- func (x *EmailClassificationRequest) Reset()
- func (x *EmailClassificationRequest) String() string
- type EmailClassificationResponse
- func (*EmailClassificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EmailClassificationResponse) GetClassification() EmailClassification
- func (x *EmailClassificationResponse) GetDetails() string
- func (x *EmailClassificationResponse) GetEmailId() string
- func (x *EmailClassificationResponse) GetErrorMessage() string
- func (*EmailClassificationResponse) ProtoMessage()
- func (x *EmailClassificationResponse) ProtoReflect() protoreflect.Message
- func (x *EmailClassificationResponse) Reset()
- func (x *EmailClassificationResponse) String() string
- type EmailClassificationServiceClient
- type EmailClassificationServiceServer
- type EmailEvent
- type UnimplementedEmailClassificationServiceServer
- type UnsafeEmailClassificationServiceServer
Constants ¶
const (
EmailClassificationService_ClassifyEmail_FullMethodName = "/mailstack.EmailClassificationService/ClassifyEmail"
)
Variables ¶
var ( EmailClassification_name = map[int32]string{ 0: "CLASSIFICATION_UNKNOWN", 1: "CLASSIFICATION_INBOUND", 2: "CLASSIFICATION_OUTBOUND", 3: "CLASSIFICATION_BOUNCE", 4: "CLASSIFICATION_AUTO_REPLY", 5: "CLASSIFICATION_SPAM", } EmailClassification_value = map[string]int32{ "CLASSIFICATION_UNKNOWN": 0, "CLASSIFICATION_INBOUND": 1, "CLASSIFICATION_OUTBOUND": 2, "CLASSIFICATION_BOUNCE": 3, "CLASSIFICATION_AUTO_REPLY": 4, "CLASSIFICATION_SPAM": 5, } )
Enum value maps for EmailClassification.
var ( EmailEvent_name = map[int32]string{ 0: "EVENT_UNKNOWN", 1: "EVENT_EMAIL_INBOUND_CLASSIFY", } EmailEvent_value = map[string]int32{ "EVENT_UNKNOWN": 0, "EVENT_EMAIL_INBOUND_CLASSIFY": 1, } )
Enum value maps for EmailEvent.
var EmailClassificationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mailstack.EmailClassificationService", HandlerType: (*EmailClassificationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ClassifyEmail", Handler: _EmailClassificationService_ClassifyEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "schema/email_classification.proto", }
EmailClassificationService_ServiceDesc is the grpc.ServiceDesc for EmailClassificationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_schema_email_classification_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEmailClassificationServiceServer ¶
func RegisterEmailClassificationServiceServer(s grpc.ServiceRegistrar, srv EmailClassificationServiceServer)
Types ¶
type EmailAddress ¶
type EmailAddress struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain,omitempty"`
// contains filtered or unexported fields
}
EmailAddress message represents an email address with additional details
func (*EmailAddress) Descriptor
deprecated
func (*EmailAddress) Descriptor() ([]byte, []int)
Deprecated: Use EmailAddress.ProtoReflect.Descriptor instead.
func (*EmailAddress) GetDomain ¶
func (x *EmailAddress) GetDomain() string
func (*EmailAddress) GetEmail ¶
func (x *EmailAddress) GetEmail() string
func (*EmailAddress) GetName ¶
func (x *EmailAddress) GetName() string
func (*EmailAddress) GetUser ¶
func (x *EmailAddress) GetUser() string
func (*EmailAddress) ProtoMessage ¶
func (*EmailAddress) ProtoMessage()
func (*EmailAddress) ProtoReflect ¶
func (x *EmailAddress) ProtoReflect() protoreflect.Message
func (*EmailAddress) Reset ¶
func (x *EmailAddress) Reset()
func (*EmailAddress) String ¶
func (x *EmailAddress) String() string
type EmailClassification ¶
type EmailClassification int32
Enum for email classification types
const ( EmailClassification_CLASSIFICATION_UNKNOWN EmailClassification = 0 EmailClassification_CLASSIFICATION_INBOUND EmailClassification = 1 EmailClassification_CLASSIFICATION_OUTBOUND EmailClassification = 2 EmailClassification_CLASSIFICATION_BOUNCE EmailClassification = 3 EmailClassification_CLASSIFICATION_AUTO_REPLY EmailClassification = 4 EmailClassification_CLASSIFICATION_SPAM EmailClassification = 5 // Add other classification types as needed )
func (EmailClassification) Descriptor ¶
func (EmailClassification) Descriptor() protoreflect.EnumDescriptor
func (EmailClassification) Enum ¶
func (x EmailClassification) Enum() *EmailClassification
func (EmailClassification) EnumDescriptor
deprecated
func (EmailClassification) EnumDescriptor() ([]byte, []int)
Deprecated: Use EmailClassification.Descriptor instead.
func (EmailClassification) Number ¶
func (x EmailClassification) Number() protoreflect.EnumNumber
func (EmailClassification) String ¶
func (x EmailClassification) String() string
func (EmailClassification) Type ¶
func (EmailClassification) Type() protoreflect.EnumType
type EmailClassificationRequest ¶
type EmailClassificationRequest struct {
EmailId string `protobuf:"bytes,1,opt,name=email_id,json=emailId,proto3" json:"email_id,omitempty"`
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
From *EmailAddress `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
To []*EmailAddress `protobuf:"bytes,4,rep,name=to,proto3" json:"to,omitempty"`
Cc []*EmailAddress `protobuf:"bytes,5,rep,name=cc,proto3" json:"cc,omitempty"`
Bcc []*EmailAddress `protobuf:"bytes,6,rep,name=bcc,proto3" json:"bcc,omitempty"`
ReplyTo *EmailAddress `protobuf:"bytes,7,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"`
ReturnPath string `protobuf:"bytes,8,opt,name=return_path,json=returnPath,proto3" json:"return_path,omitempty"`
Unsubscribe string `protobuf:"bytes,9,opt,name=unsubscribe,proto3" json:"unsubscribe,omitempty"`
Precedence string `protobuf:"bytes,10,opt,name=precedence,proto3" json:"precedence,omitempty"`
Sender string `protobuf:"bytes,11,opt,name=sender,proto3" json:"sender,omitempty"`
XAutoReply string `protobuf:"bytes,12,opt,name=x_auto_reply,json=xAutoReply,proto3" json:"x_auto_reply,omitempty"`
XAutoResponse string `protobuf:"bytes,13,opt,name=x_auto_response,json=xAutoResponse,proto3" json:"x_auto_response,omitempty"`
XLoop string `protobuf:"bytes,14,opt,name=x_loop,json=xLoop,proto3" json:"x_loop,omitempty"`
XFailedRecipients string `protobuf:"bytes,15,opt,name=x_failed_recipients,json=xFailedRecipients,proto3" json:"x_failed_recipients,omitempty"`
ContentDescription string `protobuf:"bytes,16,opt,name=content_description,json=contentDescription,proto3" json:"content_description,omitempty"`
FeedbackId string `protobuf:"bytes,17,opt,name=feedback_id,json=feedbackId,proto3" json:"feedback_id,omitempty"`
ForwardedFor string `protobuf:"bytes,18,opt,name=forwarded_for,json=forwardedFor,proto3" json:"forwarded_for,omitempty"`
Dkim string `protobuf:"bytes,19,opt,name=dkim,proto3" json:"dkim,omitempty"`
Spf string `protobuf:"bytes,20,opt,name=spf,proto3" json:"spf,omitempty"`
Dmarc string `protobuf:"bytes,21,opt,name=dmarc,proto3" json:"dmarc,omitempty"`
ListUnsubscribe string `protobuf:"bytes,22,opt,name=list_unsubscribe,json=listUnsubscribe,proto3" json:"list_unsubscribe,omitempty"`
AutoSubmitted string `protobuf:"bytes,23,opt,name=auto_submitted,json=autoSubmitted,proto3" json:"auto_submitted,omitempty"`
// contains filtered or unexported fields
}
Request message for email classification
func (*EmailClassificationRequest) Descriptor
deprecated
func (*EmailClassificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmailClassificationRequest.ProtoReflect.Descriptor instead.
func (*EmailClassificationRequest) GetAutoSubmitted ¶
func (x *EmailClassificationRequest) GetAutoSubmitted() string
func (*EmailClassificationRequest) GetBcc ¶
func (x *EmailClassificationRequest) GetBcc() []*EmailAddress
func (*EmailClassificationRequest) GetCc ¶
func (x *EmailClassificationRequest) GetCc() []*EmailAddress
func (*EmailClassificationRequest) GetContentDescription ¶
func (x *EmailClassificationRequest) GetContentDescription() string
func (*EmailClassificationRequest) GetDkim ¶
func (x *EmailClassificationRequest) GetDkim() string
func (*EmailClassificationRequest) GetDmarc ¶
func (x *EmailClassificationRequest) GetDmarc() string
func (*EmailClassificationRequest) GetEmailId ¶
func (x *EmailClassificationRequest) GetEmailId() string
func (*EmailClassificationRequest) GetFeedbackId ¶
func (x *EmailClassificationRequest) GetFeedbackId() string
func (*EmailClassificationRequest) GetForwardedFor ¶
func (x *EmailClassificationRequest) GetForwardedFor() string
func (*EmailClassificationRequest) GetFrom ¶
func (x *EmailClassificationRequest) GetFrom() *EmailAddress
func (*EmailClassificationRequest) GetListUnsubscribe ¶
func (x *EmailClassificationRequest) GetListUnsubscribe() string
func (*EmailClassificationRequest) GetPrecedence ¶
func (x *EmailClassificationRequest) GetPrecedence() string
func (*EmailClassificationRequest) GetReplyTo ¶
func (x *EmailClassificationRequest) GetReplyTo() *EmailAddress
func (*EmailClassificationRequest) GetReturnPath ¶
func (x *EmailClassificationRequest) GetReturnPath() string
func (*EmailClassificationRequest) GetSender ¶
func (x *EmailClassificationRequest) GetSender() string
func (*EmailClassificationRequest) GetSpf ¶
func (x *EmailClassificationRequest) GetSpf() string
func (*EmailClassificationRequest) GetSubject ¶
func (x *EmailClassificationRequest) GetSubject() string
func (*EmailClassificationRequest) GetTo ¶
func (x *EmailClassificationRequest) GetTo() []*EmailAddress
func (*EmailClassificationRequest) GetUnsubscribe ¶
func (x *EmailClassificationRequest) GetUnsubscribe() string
func (*EmailClassificationRequest) GetXAutoReply ¶
func (x *EmailClassificationRequest) GetXAutoReply() string
func (*EmailClassificationRequest) GetXAutoResponse ¶
func (x *EmailClassificationRequest) GetXAutoResponse() string
func (*EmailClassificationRequest) GetXFailedRecipients ¶
func (x *EmailClassificationRequest) GetXFailedRecipients() string
func (*EmailClassificationRequest) GetXLoop ¶
func (x *EmailClassificationRequest) GetXLoop() string
func (*EmailClassificationRequest) ProtoMessage ¶
func (*EmailClassificationRequest) ProtoMessage()
func (*EmailClassificationRequest) ProtoReflect ¶
func (x *EmailClassificationRequest) ProtoReflect() protoreflect.Message
func (*EmailClassificationRequest) Reset ¶
func (x *EmailClassificationRequest) Reset()
func (*EmailClassificationRequest) String ¶
func (x *EmailClassificationRequest) String() string
type EmailClassificationResponse ¶
type EmailClassificationResponse struct {
EmailId string `protobuf:"bytes,1,opt,name=email_id,json=emailId,proto3" json:"email_id,omitempty"`
Classification EmailClassification `protobuf:"varint,2,opt,name=classification,proto3,enum=mailstack.EmailClassification" json:"classification,omitempty"`
Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
Response message for email classification
func (*EmailClassificationResponse) Descriptor
deprecated
func (*EmailClassificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmailClassificationResponse.ProtoReflect.Descriptor instead.
func (*EmailClassificationResponse) GetClassification ¶
func (x *EmailClassificationResponse) GetClassification() EmailClassification
func (*EmailClassificationResponse) GetDetails ¶
func (x *EmailClassificationResponse) GetDetails() string
func (*EmailClassificationResponse) GetEmailId ¶
func (x *EmailClassificationResponse) GetEmailId() string
func (*EmailClassificationResponse) GetErrorMessage ¶
func (x *EmailClassificationResponse) GetErrorMessage() string
func (*EmailClassificationResponse) ProtoMessage ¶
func (*EmailClassificationResponse) ProtoMessage()
func (*EmailClassificationResponse) ProtoReflect ¶
func (x *EmailClassificationResponse) ProtoReflect() protoreflect.Message
func (*EmailClassificationResponse) Reset ¶
func (x *EmailClassificationResponse) Reset()
func (*EmailClassificationResponse) String ¶
func (x *EmailClassificationResponse) String() string
type EmailClassificationServiceClient ¶
type EmailClassificationServiceClient interface {
ClassifyEmail(ctx context.Context, in *EmailClassificationRequest, opts ...grpc.CallOption) (*EmailClassificationResponse, error)
}
EmailClassificationServiceClient is the client API for EmailClassificationService 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.
Service definition
func NewEmailClassificationServiceClient ¶
func NewEmailClassificationServiceClient(cc grpc.ClientConnInterface) EmailClassificationServiceClient
type EmailClassificationServiceServer ¶
type EmailClassificationServiceServer interface {
ClassifyEmail(context.Context, *EmailClassificationRequest) (*EmailClassificationResponse, error)
// contains filtered or unexported methods
}
EmailClassificationServiceServer is the server API for EmailClassificationService service. All implementations must embed UnimplementedEmailClassificationServiceServer for forward compatibility.
Service definition
type EmailEvent ¶
type EmailEvent int32
Enum for email event types
const ( EmailEvent_EVENT_UNKNOWN EmailEvent = 0 EmailEvent_EVENT_EMAIL_INBOUND_CLASSIFY EmailEvent = 1 // Add other event types as needed )
func (EmailEvent) Descriptor ¶
func (EmailEvent) Descriptor() protoreflect.EnumDescriptor
func (EmailEvent) Enum ¶
func (x EmailEvent) Enum() *EmailEvent
func (EmailEvent) EnumDescriptor
deprecated
func (EmailEvent) EnumDescriptor() ([]byte, []int)
Deprecated: Use EmailEvent.Descriptor instead.
func (EmailEvent) Number ¶
func (x EmailEvent) Number() protoreflect.EnumNumber
func (EmailEvent) String ¶
func (x EmailEvent) String() string
func (EmailEvent) Type ¶
func (EmailEvent) Type() protoreflect.EnumType
type UnimplementedEmailClassificationServiceServer ¶
type UnimplementedEmailClassificationServiceServer struct{}
UnimplementedEmailClassificationServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedEmailClassificationServiceServer) ClassifyEmail ¶
func (UnimplementedEmailClassificationServiceServer) ClassifyEmail(context.Context, *EmailClassificationRequest) (*EmailClassificationResponse, error)
type UnsafeEmailClassificationServiceServer ¶
type UnsafeEmailClassificationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEmailClassificationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EmailClassificationServiceServer will result in compilation errors.