Documentation ¶
Index ¶
- Variables
- func RegisterShippingServer(s grpc.ServiceRegistrar, srv ShippingServer)
- type CreateShippingRequest
- func (*CreateShippingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShippingRequest) GetOrderId() string
- func (*CreateShippingRequest) ProtoMessage()
- func (x *CreateShippingRequest) ProtoReflect() protoreflect.Message
- func (x *CreateShippingRequest) Reset()
- func (x *CreateShippingRequest) String() string
- type CreateShippingResponse
- func (*CreateShippingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShippingResponse) GetShippingId() string
- func (*CreateShippingResponse) ProtoMessage()
- func (x *CreateShippingResponse) ProtoReflect() protoreflect.Message
- func (x *CreateShippingResponse) Reset()
- func (x *CreateShippingResponse) String() string
- type ShippingClient
- type ShippingServer
- type ShippingStatusRequest
- func (*ShippingStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ShippingStatusRequest) GetShippingId() string
- func (*ShippingStatusRequest) ProtoMessage()
- func (x *ShippingStatusRequest) ProtoReflect() protoreflect.Message
- func (x *ShippingStatusRequest) Reset()
- func (x *ShippingStatusRequest) String() string
- type ShippingStatusResponse
- func (*ShippingStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShippingStatusResponse) GetShippidId() string
- func (x *ShippingStatusResponse) GetStatus() ShippingStatusResponse_Status
- func (*ShippingStatusResponse) ProtoMessage()
- func (x *ShippingStatusResponse) ProtoReflect() protoreflect.Message
- func (x *ShippingStatusResponse) Reset()
- func (x *ShippingStatusResponse) String() string
- type ShippingStatusResponse_Status
- func (ShippingStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
- func (x ShippingStatusResponse_Status) Enum() *ShippingStatusResponse_Status
- func (ShippingStatusResponse_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x ShippingStatusResponse_Status) Number() protoreflect.EnumNumber
- func (x ShippingStatusResponse_Status) String() string
- func (ShippingStatusResponse_Status) Type() protoreflect.EnumType
- type UnimplementedShippingServer
- type UnsafeShippingServer
Constants ¶
This section is empty.
Variables ¶
var ( ShippingStatusResponse_Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "AWAITING_SHIPMENT", 2: "OUT_FOR_DELIVERY", 3: "DELIVERED", } ShippingStatusResponse_Status_value = map[string]int32{ "UNSPECIFIED": 0, "AWAITING_SHIPMENT": 1, "OUT_FOR_DELIVERY": 2, "DELIVERED": 3, } )
Enum value maps for ShippingStatusResponse_Status.
var File_proto_shipping_v1_shipping_proto protoreflect.FileDescriptor
var Shipping_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yoshikishibata.courier.example.api.shipping.v1.Shipping", HandlerType: (*ShippingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Shipping_Create_Handler, }, { MethodName: "Status", Handler: _Shipping_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/shipping/v1/shipping.proto", }
Shipping_ServiceDesc is the grpc.ServiceDesc for Shipping service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterShippingServer ¶
func RegisterShippingServer(s grpc.ServiceRegistrar, srv ShippingServer)
Types ¶
type CreateShippingRequest ¶
type CreateShippingRequest struct { OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // contains filtered or unexported fields }
* CreateShippingは、発送する商品をまとめたパッケージを受け取り発送します。 - 発送のステータスを返すためのshipping_idを返します。
func (*CreateShippingRequest) Descriptor
deprecated
func (*CreateShippingRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateShippingRequest.ProtoReflect.Descriptor instead.
func (*CreateShippingRequest) GetOrderId ¶
func (x *CreateShippingRequest) GetOrderId() string
func (*CreateShippingRequest) ProtoMessage ¶
func (*CreateShippingRequest) ProtoMessage()
func (*CreateShippingRequest) ProtoReflect ¶
func (x *CreateShippingRequest) ProtoReflect() protoreflect.Message
func (*CreateShippingRequest) Reset ¶
func (x *CreateShippingRequest) Reset()
func (*CreateShippingRequest) String ¶
func (x *CreateShippingRequest) String() string
type CreateShippingResponse ¶
type CreateShippingResponse struct { ShippingId string `protobuf:"bytes,1,opt,name=shipping_id,json=shippingId,proto3" json:"shipping_id,omitempty"` // contains filtered or unexported fields }
func (*CreateShippingResponse) Descriptor
deprecated
func (*CreateShippingResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateShippingResponse.ProtoReflect.Descriptor instead.
func (*CreateShippingResponse) GetShippingId ¶
func (x *CreateShippingResponse) GetShippingId() string
func (*CreateShippingResponse) ProtoMessage ¶
func (*CreateShippingResponse) ProtoMessage()
func (*CreateShippingResponse) ProtoReflect ¶
func (x *CreateShippingResponse) ProtoReflect() protoreflect.Message
func (*CreateShippingResponse) Reset ¶
func (x *CreateShippingResponse) Reset()
func (*CreateShippingResponse) String ¶
func (x *CreateShippingResponse) String() string
type ShippingClient ¶
type ShippingClient interface { // 商品の発送処理を行います。 Create(ctx context.Context, in *CreateShippingRequest, opts ...grpc.CallOption) (*CreateShippingResponse, error) // 商品の発送ステータスを返します。 Status(ctx context.Context, in *ShippingStatusRequest, opts ...grpc.CallOption) (*ShippingStatusResponse, error) }
ShippingClient is the client API for Shipping 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 NewShippingClient ¶
func NewShippingClient(cc grpc.ClientConnInterface) ShippingClient
type ShippingServer ¶
type ShippingServer interface { // 商品の発送処理を行います。 Create(context.Context, *CreateShippingRequest) (*CreateShippingResponse, error) // 商品の発送ステータスを返します。 Status(context.Context, *ShippingStatusRequest) (*ShippingStatusResponse, error) // contains filtered or unexported methods }
ShippingServer is the server API for Shipping service. All implementations must embed UnimplementedShippingServer for forward compatibility
type ShippingStatusRequest ¶
type ShippingStatusRequest struct { ShippingId string `protobuf:"bytes,1,opt,name=shipping_id,json=shippingId,proto3" json:"shipping_id,omitempty"` // contains filtered or unexported fields }
* ShippingStatusは、商品の発送のステータスを返します。
[エラー] - InvalidArgument:
- shipping_idが空文字列
- NotFound:
- shipping_idで指定された発送がない
func (*ShippingStatusRequest) Descriptor
deprecated
func (*ShippingStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShippingStatusRequest.ProtoReflect.Descriptor instead.
func (*ShippingStatusRequest) GetShippingId ¶
func (x *ShippingStatusRequest) GetShippingId() string
func (*ShippingStatusRequest) ProtoMessage ¶
func (*ShippingStatusRequest) ProtoMessage()
func (*ShippingStatusRequest) ProtoReflect ¶
func (x *ShippingStatusRequest) ProtoReflect() protoreflect.Message
func (*ShippingStatusRequest) Reset ¶
func (x *ShippingStatusRequest) Reset()
func (*ShippingStatusRequest) String ¶
func (x *ShippingStatusRequest) String() string
type ShippingStatusResponse ¶
type ShippingStatusResponse struct { ShippidId string `protobuf:"bytes,1,opt,name=shippid_id,json=shippidId,proto3" json:"shippid_id,omitempty"` Status ShippingStatusResponse_Status `` /* 148-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ShippingStatusResponse) Descriptor
deprecated
func (*ShippingStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShippingStatusResponse.ProtoReflect.Descriptor instead.
func (*ShippingStatusResponse) GetShippidId ¶
func (x *ShippingStatusResponse) GetShippidId() string
func (*ShippingStatusResponse) GetStatus ¶
func (x *ShippingStatusResponse) GetStatus() ShippingStatusResponse_Status
func (*ShippingStatusResponse) ProtoMessage ¶
func (*ShippingStatusResponse) ProtoMessage()
func (*ShippingStatusResponse) ProtoReflect ¶
func (x *ShippingStatusResponse) ProtoReflect() protoreflect.Message
func (*ShippingStatusResponse) Reset ¶
func (x *ShippingStatusResponse) Reset()
func (*ShippingStatusResponse) String ¶
func (x *ShippingStatusResponse) String() string
type ShippingStatusResponse_Status ¶
type ShippingStatusResponse_Status int32
const ( ShippingStatusResponse_UNSPECIFIED ShippingStatusResponse_Status = 0 // 発送待ち ShippingStatusResponse_AWAITING_SHIPMENT ShippingStatusResponse_Status = 1 // 発送済み(配送中) ShippingStatusResponse_OUT_FOR_DELIVERY ShippingStatusResponse_Status = 2 // 配達済み ShippingStatusResponse_DELIVERED ShippingStatusResponse_Status = 3 )
func (ShippingStatusResponse_Status) Descriptor ¶
func (ShippingStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
func (ShippingStatusResponse_Status) Enum ¶
func (x ShippingStatusResponse_Status) Enum() *ShippingStatusResponse_Status
func (ShippingStatusResponse_Status) EnumDescriptor
deprecated
func (ShippingStatusResponse_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use ShippingStatusResponse_Status.Descriptor instead.
func (ShippingStatusResponse_Status) Number ¶
func (x ShippingStatusResponse_Status) Number() protoreflect.EnumNumber
func (ShippingStatusResponse_Status) String ¶
func (x ShippingStatusResponse_Status) String() string
func (ShippingStatusResponse_Status) Type ¶
func (ShippingStatusResponse_Status) Type() protoreflect.EnumType
type UnimplementedShippingServer ¶
type UnimplementedShippingServer struct { }
UnimplementedShippingServer must be embedded to have forward compatible implementations.
func (UnimplementedShippingServer) Create ¶
func (UnimplementedShippingServer) Create(context.Context, *CreateShippingRequest) (*CreateShippingResponse, error)
func (UnimplementedShippingServer) Status ¶
func (UnimplementedShippingServer) Status(context.Context, *ShippingStatusRequest) (*ShippingStatusResponse, error)
type UnsafeShippingServer ¶
type UnsafeShippingServer interface {
// contains filtered or unexported methods
}
UnsafeShippingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShippingServer will result in compilation errors.