Documentation

Index

Constants

This section is empty.

Variables

View Source
var CodeReply_Status_name = map[int32]string{
	0: "Unknown",
	1: "Success",
	2: "Fail",
}
View Source
var CodeReply_Status_value = map[string]int32{
	"Unknown": 0,
	"Success": 1,
	"Fail":    2,
}
View Source
var EmailReply_Status_name = map[int32]string{
	0: "Unknown",
	1: "Success",
	2: "Fail",
}
View Source
var EmailReply_Status_value = map[string]int32{
	"Unknown": 0,
	"Success": 1,
	"Fail":    2,
}

Functions

func RegisterMessageServer

func RegisterMessageServer(s *grpc.Server, srv MessageServer)

Types

type CodeReply

type CodeReply struct {
	Status               CodeReply_Status `protobuf:"varint,1,opt,name=status,proto3,enum=pb.CodeReply_Status" json:"status,omitempty"`
	Message              string           `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

    The response message containing the sendcode

    func (*CodeReply) Descriptor

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

    func (*CodeReply) GetMessage

    func (m *CodeReply) GetMessage() string

    func (*CodeReply) GetStatus

    func (m *CodeReply) GetStatus() CodeReply_Status

    func (*CodeReply) ProtoMessage

    func (*CodeReply) ProtoMessage()

    func (*CodeReply) Reset

    func (m *CodeReply) Reset()

    func (*CodeReply) String

    func (m *CodeReply) String() string

    func (*CodeReply) XXX_DiscardUnknown

    func (m *CodeReply) XXX_DiscardUnknown()

    func (*CodeReply) XXX_Marshal

    func (m *CodeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

    func (*CodeReply) XXX_Merge

    func (m *CodeReply) XXX_Merge(src proto.Message)

    func (*CodeReply) XXX_Size

    func (m *CodeReply) XXX_Size() int

    func (*CodeReply) XXX_Unmarshal

    func (m *CodeReply) XXX_Unmarshal(b []byte) error

    type CodeReply_Status

    type CodeReply_Status int32
    const (
    	CodeReply_Unknown CodeReply_Status = 0
    	CodeReply_Success CodeReply_Status = 1
    	CodeReply_Fail    CodeReply_Status = 2
    )

    func (CodeReply_Status) EnumDescriptor

    func (CodeReply_Status) EnumDescriptor() ([]byte, []int)

    func (CodeReply_Status) String

    func (x CodeReply_Status) String() string

    type CodeRequest

    type CodeRequest struct {
    	From                 string   `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
    	To                   []string `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty"`
    	Message              string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
    	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    	XXX_unrecognized     []byte   `json:"-"`
    	XXX_sizecache        int32    `json:"-"`
    }

      The request message containing code message.

      func (*CodeRequest) Descriptor

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

      func (*CodeRequest) GetFrom

      func (m *CodeRequest) GetFrom() string

      func (*CodeRequest) GetMessage

      func (m *CodeRequest) GetMessage() string

      func (*CodeRequest) GetTo

      func (m *CodeRequest) GetTo() []string

      func (*CodeRequest) ProtoMessage

      func (*CodeRequest) ProtoMessage()

      func (*CodeRequest) Reset

      func (m *CodeRequest) Reset()

      func (*CodeRequest) String

      func (m *CodeRequest) String() string

      func (*CodeRequest) XXX_DiscardUnknown

      func (m *CodeRequest) XXX_DiscardUnknown()

      func (*CodeRequest) XXX_Marshal

      func (m *CodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

      func (*CodeRequest) XXX_Merge

      func (m *CodeRequest) XXX_Merge(src proto.Message)

      func (*CodeRequest) XXX_Size

      func (m *CodeRequest) XXX_Size() int

      func (*CodeRequest) XXX_Unmarshal

      func (m *CodeRequest) XXX_Unmarshal(b []byte) error

      type EmailReply

      type EmailReply struct {
      	Status               EmailReply_Status `protobuf:"varint,1,opt,name=status,proto3,enum=pb.EmailReply_Status" json:"status,omitempty"`
      	Message              string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
      	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
      	XXX_unrecognized     []byte            `json:"-"`
      	XXX_sizecache        int32             `json:"-"`
      }

        The response message containing the sendmessage

        func (*EmailReply) Descriptor

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

        func (*EmailReply) GetMessage

        func (m *EmailReply) GetMessage() string

        func (*EmailReply) GetStatus

        func (m *EmailReply) GetStatus() EmailReply_Status

        func (*EmailReply) ProtoMessage

        func (*EmailReply) ProtoMessage()

        func (*EmailReply) Reset

        func (m *EmailReply) Reset()

        func (*EmailReply) String

        func (m *EmailReply) String() string

        func (*EmailReply) XXX_DiscardUnknown

        func (m *EmailReply) XXX_DiscardUnknown()

        func (*EmailReply) XXX_Marshal

        func (m *EmailReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

        func (*EmailReply) XXX_Merge

        func (m *EmailReply) XXX_Merge(src proto.Message)

        func (*EmailReply) XXX_Size

        func (m *EmailReply) XXX_Size() int

        func (*EmailReply) XXX_Unmarshal

        func (m *EmailReply) XXX_Unmarshal(b []byte) error

        type EmailReply_Status

        type EmailReply_Status int32
        const (
        	EmailReply_Unknown EmailReply_Status = 0
        	EmailReply_Success EmailReply_Status = 1
        	EmailReply_Fail    EmailReply_Status = 2
        )

        func (EmailReply_Status) EnumDescriptor

        func (EmailReply_Status) EnumDescriptor() ([]byte, []int)

        func (EmailReply_Status) String

        func (x EmailReply_Status) String() string

        type EmailRequest

        type EmailRequest struct {
        	From                 string   `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
        	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"`
        	Subject              string   `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
        	Html                 string   `protobuf:"bytes,6,opt,name=html,proto3" json:"html,omitempty"`
        	Filename             []string `protobuf:"bytes,7,rep,name=filename,proto3" json:"filename,omitempty"`
        	XXX_NoUnkeyedLiteral struct{} `json:"-"`
        	XXX_unrecognized     []byte   `json:"-"`
        	XXX_sizecache        int32    `json:"-"`
        }

          The request message containing email message.

          func (*EmailRequest) Descriptor

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

          func (*EmailRequest) GetBcc

          func (m *EmailRequest) GetBcc() []string

          func (*EmailRequest) GetCc

          func (m *EmailRequest) GetCc() []string

          func (*EmailRequest) GetFilename

          func (m *EmailRequest) GetFilename() []string

          func (*EmailRequest) GetFrom

          func (m *EmailRequest) GetFrom() string

          func (*EmailRequest) GetHtml

          func (m *EmailRequest) GetHtml() string

          func (*EmailRequest) GetSubject

          func (m *EmailRequest) GetSubject() string

          func (*EmailRequest) GetTo

          func (m *EmailRequest) GetTo() []string

          func (*EmailRequest) ProtoMessage

          func (*EmailRequest) ProtoMessage()

          func (*EmailRequest) Reset

          func (m *EmailRequest) Reset()

          func (*EmailRequest) String

          func (m *EmailRequest) String() string

          func (*EmailRequest) XXX_DiscardUnknown

          func (m *EmailRequest) XXX_DiscardUnknown()

          func (*EmailRequest) XXX_Marshal

          func (m *EmailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

          func (*EmailRequest) XXX_Merge

          func (m *EmailRequest) XXX_Merge(src proto.Message)

          func (*EmailRequest) XXX_Size

          func (m *EmailRequest) XXX_Size() int

          func (*EmailRequest) XXX_Unmarshal

          func (m *EmailRequest) XXX_Unmarshal(b []byte) error

          type MessageClient

          type MessageClient interface {
          	// Sends a greeting
          	SendEmail(ctx context.Context, in *EmailRequest, opts ...grpc.CallOption) (*EmailReply, error)
          	SendCode(ctx context.Context, in *CodeRequest, opts ...grpc.CallOption) (*CodeReply, error)
          }

            MessageClient is the client API for Message service.

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

            func NewMessageClient

            func NewMessageClient(cc *grpc.ClientConn) MessageClient

            type MessageServer

            type MessageServer interface {
            	// Sends a greeting
            	SendEmail(context.Context, *EmailRequest) (*EmailReply, error)
            	SendCode(context.Context, *CodeRequest) (*CodeReply, error)
            }

              MessageServer is the server API for Message service.

              type UnimplementedMessageServer

              type UnimplementedMessageServer struct {
              }

                UnimplementedMessageServer can be embedded to have forward compatible implementations.

                func (*UnimplementedMessageServer) SendCode

                func (*UnimplementedMessageServer) SendEmail

                Source Files