Documentation ¶
Index ¶
- Variables
- func NewEmailServiceEndpoints() []*api.Endpoint
- func NewHealthEndpoints() []*api.Endpoint
- func RegisterEmailServiceHandler(s server.Server, hdlr EmailServiceHandler, opts ...server.HandlerOption) error
- func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)
- func RegisterHealthHandler(s server.Server, hdlr HealthHandler, opts ...server.HandlerOption) error
- func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)
- type EmailService
- type EmailServiceClient
- type EmailServiceHandler
- type EmailServiceServer
- type Empty
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckRequest) GetService() string
- func (*HealthCheckRequest) ProtoMessage()
- func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
- func (x *HealthCheckRequest) Reset()
- func (x *HealthCheckRequest) String() string
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- type HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
- func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
- func (x HealthCheckResponse_ServingStatus) String() string
- func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
- type HealthClient
- type HealthHandler
- type HealthServer
- type HealthService
- type Health_WatchClient
- type Health_WatchServer
- type Health_WatchService
- type Health_WatchStream
- type Money
- type OrderItem
- type OrderResult
- func (*OrderResult) Descriptor() ([]byte, []int)deprecated
- func (x *OrderResult) GetItem() *OrderItem
- func (x *OrderResult) GetOrderCost() *Money
- func (x *OrderResult) GetOrderId() string
- func (*OrderResult) ProtoMessage()
- func (x *OrderResult) ProtoReflect() protoreflect.Message
- func (x *OrderResult) Reset()
- func (x *OrderResult) String() string
- type SendOrderConfirmationRequest
- func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendOrderConfirmationRequest) GetEmail() string
- func (x *SendOrderConfirmationRequest) GetOrder() *OrderResult
- func (*SendOrderConfirmationRequest) ProtoMessage()
- func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message
- func (x *SendOrderConfirmationRequest) Reset()
- func (x *SendOrderConfirmationRequest) String() string
- type UnimplementedEmailServiceServer
- type UnimplementedHealthServer
- type UnsafeEmailServiceServer
- type UnsafeHealthServer
Constants ¶
This section is empty.
Variables ¶
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.
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)
var File_pkg_proto_emailservice_proto protoreflect.FileDescriptor
var File_pkg_proto_health_proto protoreflect.FileDescriptor
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 NewHealthEndpoints ¶
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.
func NewEmailServiceClient ¶
func NewEmailServiceClient(cc grpc.ClientConnInterface) EmailServiceClient
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) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
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 (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
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) Descriptor() protoreflect.EnumDescriptor
func (HealthCheckResponse_ServingStatus) Enum ¶
func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
func (HealthCheckResponse_ServingStatus) EnumDescriptor
deprecated
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.
func (HealthCheckResponse_ServingStatus) Number ¶
func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
func (HealthCheckResponse_ServingStatus) Type ¶
func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
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 HealthHandler ¶
type HealthHandler interface { Check(context.Context, *HealthCheckRequest, *HealthCheckResponse) error Watch(context.Context, *HealthCheckRequest, Health_WatchStream) error }
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) Watch(*HealthCheckRequest, Health_WatchServer) error }
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_WatchStream ¶
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) GetCurrencyCode ¶
func (*Money) ProtoMessage ¶
func (*Money) ProtoMessage()
func (*Money) ProtoReflect ¶
func (x *Money) ProtoReflect() protoreflect.Message
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) GetPhysical ¶
func (*OrderItem) ProtoMessage ¶
func (*OrderItem) ProtoMessage()
func (*OrderItem) ProtoReflect ¶
func (x *OrderItem) ProtoReflect() protoreflect.Message
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 (x *SendOrderConfirmationRequest) GetOrder() *OrderResult
func (*SendOrderConfirmationRequest) ProtoMessage ¶
func (*SendOrderConfirmationRequest) ProtoMessage()
func (*SendOrderConfirmationRequest) ProtoReflect ¶
func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message
func (*SendOrderConfirmationRequest) Reset ¶
func (x *SendOrderConfirmationRequest) Reset()
func (*SendOrderConfirmationRequest) String ¶
func (x *SendOrderConfirmationRequest) String() string
type UnimplementedEmailServiceServer ¶
type UnimplementedEmailServiceServer struct { }
UnimplementedEmailServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedEmailServiceServer) SendOrderConfirmation ¶
func (UnimplementedEmailServiceServer) SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error)
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct { }
UnimplementedHealthServer should be embedded to have forward compatible implementations.
func (UnimplementedHealthServer) Check ¶
func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
func (UnimplementedHealthServer) Watch ¶
func (UnimplementedHealthServer) Watch(*HealthCheckRequest, Health_WatchServer) error
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.