shipping_v1

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_proto_shipping_v1_shipping_proto protoreflect.FileDescriptor
View Source
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 (*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) Enum

func (ShippingStatusResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use ShippingStatusResponse_Status.Descriptor instead.

func (ShippingStatusResponse_Status) Number

func (ShippingStatusResponse_Status) String

func (ShippingStatusResponse_Status) Type

type UnimplementedShippingServer

type UnimplementedShippingServer struct {
}

UnimplementedShippingServer must be embedded to have forward compatible implementations.

func (UnimplementedShippingServer) Create

func (UnimplementedShippingServer) Status

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.

Jump to

Keyboard shortcuts

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