pb

package
v0.0.0-...-4047caf Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mail_ContentType_name = map[int32]string{
		0: "TEXTHTML",
		1: "TEXTPLAIN",
	}
	Mail_ContentType_value = map[string]int32{
		"TEXTHTML":  0,
		"TEXTPLAIN": 1,
	}
)

Enum value maps for Mail_ContentType.

View Source
var File_notification_proto protoreflect.FileDescriptor
View Source
var Notification_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notification.Notification",
	HandlerType: (*NotificationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVersion",
			Handler:    _Notification_GetVersion_Handler,
		},
		{
			MethodName: "SendEmail",
			Handler:    _Notification_SendEmail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "notification.proto",
}

Notification_ServiceDesc is the grpc.ServiceDesc for Notification service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNotificationServer

func RegisterNotificationServer(s grpc.ServiceRegistrar, srv NotificationServer)

Types

type Contact

type Contact struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*Contact) Descriptor deprecated

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

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetAddress

func (x *Contact) GetAddress() string

func (*Contact) GetName

func (x *Contact) GetName() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

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

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) String

func (x *Contact) String() string

type Mail

type Mail struct {
	To          []*Contact       `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"`
	Cc          []*Contact       `protobuf:"bytes,2,rep,name=cc,proto3" json:"cc,omitempty"`
	Bcc         []*Contact       `protobuf:"bytes,3,rep,name=bcc,proto3" json:"bcc,omitempty"`
	Subject     string           `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
	Body        string           `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	ContentType Mail_ContentType `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Mail) Descriptor deprecated

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

Deprecated: Use Mail.ProtoReflect.Descriptor instead.

func (*Mail) GetBcc

func (x *Mail) GetBcc() []*Contact

func (*Mail) GetBody

func (x *Mail) GetBody() string

func (*Mail) GetCc

func (x *Mail) GetCc() []*Contact

func (*Mail) GetContentType

func (x *Mail) GetContentType() Mail_ContentType

func (*Mail) GetSubject

func (x *Mail) GetSubject() string

func (*Mail) GetTo

func (x *Mail) GetTo() []*Contact

func (*Mail) ProtoMessage

func (*Mail) ProtoMessage()

func (*Mail) ProtoReflect

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

func (*Mail) Reset

func (x *Mail) Reset()

func (*Mail) String

func (x *Mail) String() string

type Mail_ContentType

type Mail_ContentType int32
const (
	Mail_TEXTHTML  Mail_ContentType = 0
	Mail_TEXTPLAIN Mail_ContentType = 1
)

func (Mail_ContentType) Descriptor

func (Mail_ContentType) Enum

func (Mail_ContentType) EnumDescriptor deprecated

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

Deprecated: Use Mail_ContentType.Descriptor instead.

func (Mail_ContentType) Number

func (Mail_ContentType) String

func (x Mail_ContentType) String() string

func (Mail_ContentType) Type

type NotificationClient

type NotificationClient interface {
	GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
	SendEmail(ctx context.Context, in *Mail, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

NotificationClient is the client API for Notification 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 NotificationServer

type NotificationServer interface {
	GetVersion(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
	SendEmail(context.Context, *Mail) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

NotificationServer is the server API for Notification service. All implementations must embed UnimplementedNotificationServer for forward compatibility

type UnimplementedNotificationServer

type UnimplementedNotificationServer struct {
}

UnimplementedNotificationServer must be embedded to have forward compatible implementations.

func (UnimplementedNotificationServer) GetVersion

func (UnimplementedNotificationServer) SendEmail

type UnsafeNotificationServer

type UnsafeNotificationServer interface {
	// contains filtered or unexported methods
}

UnsafeNotificationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationServer will result in compilation errors.

Jump to

Keyboard shortcuts

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