postar

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PostarService_SendEmail_FullMethodName = "/postar.PostarService/SendEmail"
)

Variables

View Source
var File_postar_postar_proto protoreflect.FileDescriptor
View Source
var PostarService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "postar.PostarService",
	HandlerType: (*PostarServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendEmail",
			Handler:    _PostarService_SendEmail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "postar/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 {
	TemplateId  int32        `protobuf:"varint,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
	TemplateKey string       `protobuf:"bytes,2,opt,name=template_key,json=templateKey,proto3" json:"template_key,omitempty"`
	Header      *EmailHeader `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"`
	Body        *EmailBody   `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Email) Descriptor deprecated

func (*Email) Descriptor() ([]byte, []int)

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetBody

func (x *Email) GetBody() *EmailBody

func (*Email) GetHeader added in v0.3.0

func (x *Email) GetHeader() *EmailHeader

func (*Email) GetTemplateId added in v0.3.0

func (x *Email) GetTemplateId() int32

func (*Email) GetTemplateKey added in v0.3.0

func (x *Email) GetTemplateKey() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

func (x *Email) ProtoReflect() protoreflect.Message

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string

type EmailBody added in v0.3.0

type EmailBody struct {
	Values map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EmailBody) Descriptor deprecated added in v0.3.0

func (*EmailBody) Descriptor() ([]byte, []int)

Deprecated: Use EmailBody.ProtoReflect.Descriptor instead.

func (*EmailBody) GetValues added in v0.3.0

func (x *EmailBody) GetValues() map[string]string

func (*EmailBody) ProtoMessage added in v0.3.0

func (*EmailBody) ProtoMessage()

func (*EmailBody) ProtoReflect added in v0.3.0

func (x *EmailBody) ProtoReflect() protoreflect.Message

func (*EmailBody) Reset added in v0.3.0

func (x *EmailBody) Reset()

func (*EmailBody) String added in v0.3.0

func (x *EmailBody) String() string

type EmailHeader added in v0.3.0

type EmailHeader struct {
	Values map[string]string `` /* 153-byte string literal not displayed */
	To     []string          `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty"`
	Cc     []string          `protobuf:"bytes,3,rep,name=cc,proto3" json:"cc,omitempty"`
	Bcc    []string          `protobuf:"bytes,4,rep,name=bcc,proto3" json:"bcc,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailHeader) Descriptor deprecated added in v0.3.0

func (*EmailHeader) Descriptor() ([]byte, []int)

Deprecated: Use EmailHeader.ProtoReflect.Descriptor instead.

func (*EmailHeader) GetBcc added in v0.3.0

func (x *EmailHeader) GetBcc() []string

func (*EmailHeader) GetCc added in v0.3.0

func (x *EmailHeader) GetCc() []string

func (*EmailHeader) GetTo added in v0.3.0

func (x *EmailHeader) GetTo() []string

func (*EmailHeader) GetValues added in v0.3.0

func (x *EmailHeader) GetValues() map[string]string

func (*EmailHeader) ProtoMessage added in v0.3.0

func (*EmailHeader) ProtoMessage()

func (*EmailHeader) ProtoReflect added in v0.3.0

func (x *EmailHeader) ProtoReflect() protoreflect.Message

func (*EmailHeader) Reset added in v0.3.0

func (x *EmailHeader) Reset()

func (*EmailHeader) String added in v0.3.0

func (x *EmailHeader) String() string

type PostarServiceClient

type PostarServiceClient interface {
	// Send an email with some options and returns the result of sending.
	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.

type PostarServiceServer

type PostarServiceServer interface {
	// Send an email with some options and returns the result of sending.
	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 SendEmailRequest

type SendEmailRequest struct {
	Base    *base.Request `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	Email   *Email        `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Options *SendOptions  `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*SendEmailRequest) Descriptor deprecated

func (*SendEmailRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead.

func (*SendEmailRequest) GetBase added in v0.2.0

func (x *SendEmailRequest) GetBase() *base.Request

func (*SendEmailRequest) GetEmail

func (x *SendEmailRequest) GetEmail() *Email

func (*SendEmailRequest) GetOptions

func (x *SendEmailRequest) GetOptions() *SendOptions

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 {
	Base *base.Response `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	// contains filtered or unexported fields
}

func (*SendEmailResponse) Descriptor deprecated

func (*SendEmailResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendEmailResponse.ProtoReflect.Descriptor instead.

func (*SendEmailResponse) GetBase added in v0.2.0

func (x *SendEmailResponse) GetBase() *base.Response

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 SendOptions added in v0.2.0

type SendOptions struct {
	Async bool `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"`
	// contains filtered or unexported fields
}

func (*SendOptions) Descriptor deprecated added in v0.2.0

func (*SendOptions) Descriptor() ([]byte, []int)

Deprecated: Use SendOptions.ProtoReflect.Descriptor instead.

func (*SendOptions) GetAsync added in v0.2.0

func (x *SendOptions) GetAsync() bool

func (*SendOptions) ProtoMessage added in v0.2.0

func (*SendOptions) ProtoMessage()

func (*SendOptions) ProtoReflect added in v0.2.0

func (x *SendOptions) ProtoReflect() protoreflect.Message

func (*SendOptions) Reset added in v0.2.0

func (x *SendOptions) Reset()

func (*SendOptions) String added in v0.2.0

func (x *SendOptions) String() string

type UnimplementedPostarServiceServer

type UnimplementedPostarServiceServer struct {
}

UnimplementedPostarServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPostarServiceServer) SendEmail

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL