emailservice

package
v0.0.0-...-0616b42 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HealthCheckResponse_ServingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	HealthCheckResponse_ServingStatus_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for HealthCheckResponse_ServingStatus.

View Source
var EmailService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "emailservice.EmailService",
	HandlerType: (*EmailServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendOrderConfirmation",
			Handler:    _EmailService_SendOrderConfirmation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/proto/emailservice.proto",
}

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

View Source
var File_pkg_proto_emailservice_proto protoreflect.FileDescriptor
View Source
var File_pkg_proto_health_proto protoreflect.FileDescriptor
View Source
var Health_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "emailservice.Health",
	HandlerType: (*HealthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _Health_Check_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _Health_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/proto/health.proto",
}

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

Functions

func NewEmailServiceEndpoints

func NewEmailServiceEndpoints() []*api.Endpoint

func NewHealthEndpoints

func NewHealthEndpoints() []*api.Endpoint

func RegisterEmailServiceHandler

func RegisterEmailServiceHandler(s server.Server, hdlr EmailServiceHandler, opts ...server.HandlerOption) error

func RegisterEmailServiceServer

func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)

func RegisterHealthHandler

func RegisterHealthHandler(s server.Server, hdlr HealthHandler, opts ...server.HandlerOption) error

func RegisterHealthServer

func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)

Types

type EmailService

type EmailService interface {
	SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...client.CallOption) (*Empty, error)
}

func NewEmailService

func NewEmailService(name string, c client.Client) EmailService

type EmailServiceClient

type EmailServiceClient interface {
	SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...grpc.CallOption) (*Empty, error)
}

EmailServiceClient is the client API for EmailService 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 EmailServiceHandler

type EmailServiceHandler interface {
	SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest, *Empty) error
}

type EmailServiceServer

type EmailServiceServer interface {
	SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
}

EmailServiceServer is the server API for EmailService service. All implementations should embed UnimplementedEmailServiceServer for forward compatibility

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type HealthCheckRequest

type HealthCheckRequest struct {
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckRequest) Descriptor deprecated

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

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

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=emailservice.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_ServingStatus

type HealthCheckResponse_ServingStatus int32
const (
	HealthCheckResponse_UNKNOWN         HealthCheckResponse_ServingStatus = 0
	HealthCheckResponse_SERVING         HealthCheckResponse_ServingStatus = 1
	HealthCheckResponse_NOT_SERVING     HealthCheckResponse_ServingStatus = 2
	HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3
)

func (HealthCheckResponse_ServingStatus) Descriptor

func (HealthCheckResponse_ServingStatus) Enum

func (HealthCheckResponse_ServingStatus) EnumDescriptor deprecated

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

Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.

func (HealthCheckResponse_ServingStatus) Number

func (HealthCheckResponse_ServingStatus) String

func (HealthCheckResponse_ServingStatus) Type

type HealthClient

type HealthClient interface {
	Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error)
}

HealthClient is the client API for Health 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 NewHealthClient

func NewHealthClient(cc grpc.ClientConnInterface) HealthClient

type HealthServer

HealthServer is the server API for Health service. All implementations should embed UnimplementedHealthServer for forward compatibility

type HealthService

type HealthService interface {
	Check(ctx context.Context, in *HealthCheckRequest, opts ...client.CallOption) (*HealthCheckResponse, error)
	Watch(ctx context.Context, in *HealthCheckRequest, opts ...client.CallOption) (Health_WatchService, error)
}

func NewHealthService

func NewHealthService(name string, c client.Client) HealthService

type Health_WatchClient

type Health_WatchClient interface {
	Recv() (*HealthCheckResponse, error)
	grpc.ClientStream
}

type Health_WatchServer

type Health_WatchServer interface {
	Send(*HealthCheckResponse) error
	grpc.ServerStream
}

type Health_WatchService

type Health_WatchService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	CloseSend() error
	Close() error
	Recv() (*HealthCheckResponse, error)
}

type Health_WatchStream

type Health_WatchStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*HealthCheckResponse) error
}

type Money

type Money struct {
	CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	Units        int64  `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
	Nanos        int32  `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// contains filtered or unexported fields
}

func (*Money) Descriptor deprecated

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

Deprecated: Use Money.ProtoReflect.Descriptor instead.

func (*Money) GetCurrencyCode

func (x *Money) GetCurrencyCode() string

func (*Money) GetNanos

func (x *Money) GetNanos() int32

func (*Money) GetUnits

func (x *Money) GetUnits() int64

func (*Money) ProtoMessage

func (*Money) ProtoMessage()

func (*Money) ProtoReflect

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

func (*Money) Reset

func (x *Money) Reset()

func (*Money) String

func (x *Money) String() string

type OrderItem

type OrderItem struct {
	Physical bool  `protobuf:"varint,2,opt,name=physical,proto3" json:"physical,omitempty"`
	Nodes    int64 `protobuf:"varint,3,opt,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderItem) Descriptor deprecated

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

Deprecated: Use OrderItem.ProtoReflect.Descriptor instead.

func (*OrderItem) GetNodes

func (x *OrderItem) GetNodes() int64

func (*OrderItem) GetPhysical

func (x *OrderItem) GetPhysical() bool

func (*OrderItem) ProtoMessage

func (*OrderItem) ProtoMessage()

func (*OrderItem) ProtoReflect

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

func (*OrderItem) Reset

func (x *OrderItem) Reset()

func (*OrderItem) String

func (x *OrderItem) String() string

type OrderResult

type OrderResult struct {
	OrderId   string     `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	OrderCost *Money     `protobuf:"bytes,2,opt,name=order_cost,json=orderCost,proto3" json:"order_cost,omitempty"`
	Item      *OrderItem `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderResult) Descriptor deprecated

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

Deprecated: Use OrderResult.ProtoReflect.Descriptor instead.

func (*OrderResult) GetItem

func (x *OrderResult) GetItem() *OrderItem

func (*OrderResult) GetOrderCost

func (x *OrderResult) GetOrderCost() *Money

func (*OrderResult) GetOrderId

func (x *OrderResult) GetOrderId() string

func (*OrderResult) ProtoMessage

func (*OrderResult) ProtoMessage()

func (*OrderResult) ProtoReflect

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

func (*OrderResult) Reset

func (x *OrderResult) Reset()

func (*OrderResult) String

func (x *OrderResult) String() string

type SendOrderConfirmationRequest

type SendOrderConfirmationRequest struct {
	Email string       `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Order *OrderResult `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*SendOrderConfirmationRequest) Descriptor deprecated

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

Deprecated: Use SendOrderConfirmationRequest.ProtoReflect.Descriptor instead.

func (*SendOrderConfirmationRequest) GetEmail

func (x *SendOrderConfirmationRequest) GetEmail() string

func (*SendOrderConfirmationRequest) GetOrder

func (*SendOrderConfirmationRequest) ProtoMessage

func (*SendOrderConfirmationRequest) ProtoMessage()

func (*SendOrderConfirmationRequest) ProtoReflect

func (*SendOrderConfirmationRequest) Reset

func (x *SendOrderConfirmationRequest) Reset()

func (*SendOrderConfirmationRequest) String

type UnimplementedEmailServiceServer

type UnimplementedEmailServiceServer struct {
}

UnimplementedEmailServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedEmailServiceServer) SendOrderConfirmation

type UnimplementedHealthServer

type UnimplementedHealthServer struct {
}

UnimplementedHealthServer should be embedded to have forward compatible implementations.

func (UnimplementedHealthServer) Check

func (UnimplementedHealthServer) Watch

type UnsafeEmailServiceServer

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

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

type UnsafeHealthServer

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

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

Jump to

Keyboard shortcuts

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