Documentation ¶
Index ¶
- Variables
- func RegisterPostarServiceServer(s grpc.ServiceRegistrar, srv PostarServiceServer)
- type Email
- func (*Email) Descriptor() ([]byte, []int)deprecated
- func (x *Email) GetBody() string
- func (x *Email) GetBodyType() string
- func (x *Email) GetReceivers() []string
- func (x *Email) GetSubject() string
- func (*Email) ProtoMessage()
- func (x *Email) ProtoReflect() protoreflect.Message
- func (x *Email) Reset()
- func (x *Email) String() string
- type PostarServiceClient
- type PostarServiceServer
- type SendEmailOptions
- func (*SendEmailOptions) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailOptions) GetAsync() bool
- func (x *SendEmailOptions) GetTimeoutMillis() int32
- func (*SendEmailOptions) ProtoMessage()
- func (x *SendEmailOptions) ProtoReflect() protoreflect.Message
- func (x *SendEmailOptions) Reset()
- func (x *SendEmailOptions) String() string
- type SendEmailRequest
- func (*SendEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailRequest) GetEmail() *Email
- func (x *SendEmailRequest) GetOptions() *SendEmailOptions
- func (*SendEmailRequest) ProtoMessage()
- func (x *SendEmailRequest) ProtoReflect() protoreflect.Message
- func (x *SendEmailRequest) Reset()
- func (x *SendEmailRequest) String() string
- type SendEmailResponse
- func (*SendEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailResponse) GetCode() base.ServerCode
- func (x *SendEmailResponse) GetMsg() string
- func (x *SendEmailResponse) GetTraceId() string
- func (*SendEmailResponse) ProtoMessage()
- func (x *SendEmailResponse) ProtoReflect() protoreflect.Message
- func (x *SendEmailResponse) Reset()
- func (x *SendEmailResponse) String() string
- type UnimplementedPostarServiceServer
- type UnsafePostarServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_postar_proto protoreflect.FileDescriptor
var PostarService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "github.com.avinoplan.api.postar.PostarService", HandlerType: (*PostarServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendEmail", Handler: _PostarService_SendEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "postar.proto", }
PostarService_ServiceDesc is the grpc.ServiceDesc for PostarService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPostarServiceServer ¶
func RegisterPostarServiceServer(s grpc.ServiceRegistrar, srv PostarServiceServer)
Types ¶
type Email ¶
type Email struct { Receivers []string `protobuf:"bytes,1,rep,name=receivers,proto3" json:"receivers,omitempty"` // Receivers. Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` // Subject. BodyType string `protobuf:"bytes,3,opt,name=body_type,json=bodyType,proto3" json:"body_type,omitempty"` // Body type. Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // Body. // contains filtered or unexported fields }
Email wraps all information of using smtp service.
func (*Email) Descriptor
deprecated
func (*Email) GetBodyType ¶
func (*Email) GetReceivers ¶
func (*Email) GetSubject ¶
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
type PostarServiceClient ¶
type PostarServiceClient interface { // SendEmail send one email. SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*SendEmailResponse, error) }
PostarServiceClient is the client API for PostarService 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 NewPostarServiceClient ¶
func NewPostarServiceClient(cc grpc.ClientConnInterface) PostarServiceClient
type PostarServiceServer ¶
type PostarServiceServer interface { // SendEmail send one email. SendEmail(context.Context, *SendEmailRequest) (*SendEmailResponse, error) // contains filtered or unexported methods }
PostarServiceServer is the server API for PostarService service. All implementations must embed UnimplementedPostarServiceServer for forward compatibility
type SendEmailOptions ¶
type SendEmailOptions struct { Async bool `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"` // Sending this email asynchronously. TimeoutMillis int32 `protobuf:"varint,2,opt,name=timeout_millis,json=timeoutMillis,proto3" json:"timeout_millis,omitempty"` // Sending timeout in ms. // contains filtered or unexported fields }
SendEmailOptions is the options of sending emails.
func (*SendEmailOptions) Descriptor
deprecated
func (*SendEmailOptions) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailOptions.ProtoReflect.Descriptor instead.
func (*SendEmailOptions) GetAsync ¶
func (x *SendEmailOptions) GetAsync() bool
func (*SendEmailOptions) GetTimeoutMillis ¶ added in v0.0.5
func (x *SendEmailOptions) GetTimeoutMillis() int32
func (*SendEmailOptions) ProtoMessage ¶
func (*SendEmailOptions) ProtoMessage()
func (*SendEmailOptions) ProtoReflect ¶
func (x *SendEmailOptions) ProtoReflect() protoreflect.Message
func (*SendEmailOptions) Reset ¶
func (x *SendEmailOptions) Reset()
func (*SendEmailOptions) String ¶
func (x *SendEmailOptions) String() string
type SendEmailRequest ¶
type SendEmailRequest struct { Email *Email `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // Sending email. Options *SendEmailOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // Sending options. // contains filtered or unexported fields }
SendEmailRequest is the request of SendEmail.
func (*SendEmailRequest) Descriptor
deprecated
func (*SendEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead.
func (*SendEmailRequest) GetEmail ¶
func (x *SendEmailRequest) GetEmail() *Email
func (*SendEmailRequest) GetOptions ¶
func (x *SendEmailRequest) GetOptions() *SendEmailOptions
func (*SendEmailRequest) ProtoMessage ¶
func (*SendEmailRequest) ProtoMessage()
func (*SendEmailRequest) ProtoReflect ¶
func (x *SendEmailRequest) ProtoReflect() protoreflect.Message
func (*SendEmailRequest) Reset ¶
func (x *SendEmailRequest) Reset()
func (*SendEmailRequest) String ¶
func (x *SendEmailRequest) String() string
type SendEmailResponse ¶
type SendEmailResponse struct { Code base.ServerCode `protobuf:"varint,1,opt,name=code,proto3,enum=github.com.avinoplan.api.base.ServerCode" json:"code,omitempty"` // 0 is ok. Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // For messaging. TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // For tracing. // contains filtered or unexported fields }
SendEmailResponse is the response of SendEmail.
func (*SendEmailResponse) Descriptor
deprecated
func (*SendEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailResponse.ProtoReflect.Descriptor instead.
func (*SendEmailResponse) GetCode ¶
func (x *SendEmailResponse) GetCode() base.ServerCode
func (*SendEmailResponse) GetMsg ¶
func (x *SendEmailResponse) GetMsg() string
func (*SendEmailResponse) GetTraceId ¶
func (x *SendEmailResponse) GetTraceId() string
func (*SendEmailResponse) ProtoMessage ¶
func (*SendEmailResponse) ProtoMessage()
func (*SendEmailResponse) ProtoReflect ¶
func (x *SendEmailResponse) ProtoReflect() protoreflect.Message
func (*SendEmailResponse) Reset ¶
func (x *SendEmailResponse) Reset()
func (*SendEmailResponse) String ¶
func (x *SendEmailResponse) String() string
type UnimplementedPostarServiceServer ¶
type UnimplementedPostarServiceServer struct { }
UnimplementedPostarServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPostarServiceServer) SendEmail ¶
func (UnimplementedPostarServiceServer) SendEmail(context.Context, *SendEmailRequest) (*SendEmailResponse, error)
type UnsafePostarServiceServer ¶
type UnsafePostarServiceServer interface {
// contains filtered or unexported methods
}
UnsafePostarServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostarServiceServer will result in compilation errors.