messages

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: NCSA Imports: 9 Imported by: 0

README

protobuf messages

repo to store protobuf messages and compilation scripts

Only tested to work on Ubuntu

Requirements

  1. golang
  2. apt install protobuf-compiler
  3. go get github.com/golang/protobuf/protoc-gen-go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_messages_proto protoreflect.FileDescriptor

Functions

func RegisterEmailerServer

func RegisterEmailerServer(s *grpc.Server, srv EmailerServer)

Types

type EmailRequest

type EmailRequest struct {
	ToAddrs  []string `protobuf:"bytes,1,rep,name=to_addrs,json=toAddrs,proto3" json:"to_addrs,omitempty"`
	FromAddr string   `protobuf:"bytes,2,opt,name=from_addr,json=fromAddr,proto3" json:"from_addr,omitempty"`
	Subject  string   `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	Body     string   `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailRequest) Descriptor deprecated

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

Deprecated: Use EmailRequest.ProtoReflect.Descriptor instead.

func (*EmailRequest) GetBody

func (x *EmailRequest) GetBody() string

func (*EmailRequest) GetFromAddr

func (x *EmailRequest) GetFromAddr() string

func (*EmailRequest) GetSubject

func (x *EmailRequest) GetSubject() string

func (*EmailRequest) GetToAddrs

func (x *EmailRequest) GetToAddrs() []string

func (*EmailRequest) ProtoMessage

func (*EmailRequest) ProtoMessage()

func (*EmailRequest) ProtoReflect

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

func (*EmailRequest) Reset

func (x *EmailRequest) Reset()

func (*EmailRequest) String

func (x *EmailRequest) String() string

type EmailRequestResponse

type EmailRequestResponse struct {
	StatusCode int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Message    string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailRequestResponse) Descriptor deprecated

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

Deprecated: Use EmailRequestResponse.ProtoReflect.Descriptor instead.

func (*EmailRequestResponse) GetMessage

func (x *EmailRequestResponse) GetMessage() string

func (*EmailRequestResponse) GetStatusCode

func (x *EmailRequestResponse) GetStatusCode() int32

func (*EmailRequestResponse) ProtoMessage

func (*EmailRequestResponse) ProtoMessage()

func (*EmailRequestResponse) ProtoReflect

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

func (*EmailRequestResponse) Reset

func (x *EmailRequestResponse) Reset()

func (*EmailRequestResponse) String

func (x *EmailRequestResponse) String() string

type EmailerClient

type EmailerClient interface {
	// Sends an email
	DoEmail(ctx context.Context, in *EmailRequest, opts ...grpc.CallOption) (*EmailRequestResponse, error)
}

EmailerClient is the client API for Emailer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewEmailerClient

func NewEmailerClient(cc grpc.ClientConnInterface) EmailerClient

type EmailerServer

type EmailerServer interface {
	// Sends an email
	DoEmail(context.Context, *EmailRequest) (*EmailRequestResponse, error)
}

EmailerServer is the server API for Emailer service.

type UnimplementedEmailerServer

type UnimplementedEmailerServer struct {
}

UnimplementedEmailerServer can be embedded to have forward compatible implementations.

func (*UnimplementedEmailerServer) DoEmail

Jump to

Keyboard shortcuts

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