order

package
v0.0.0-...-63088e7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package order is a generated protocol buffer package.

It is generated from these files:

order/order.proto

It has these top-level messages:

Order
CreateOrderRequest
GetOrderRequest
GetOrderDetailRequest
GetOrderDetailResponse
ListOrdersRequest
ListOrdersResponse
DeleteOrderRequest

Package order is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package order is a generated protocol buffer package.

It is generated from these files:

order/order.proto

It has these top-level messages:

Order
CreateOrderRequest
GetOrderRequest
GetOrderDetailRequest
GetOrderDetailResponse
ListOrdersRequest
ListOrdersResponse
DeleteOrderRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOrderServiceHandler

func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterOrderServiceHandler registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterOrderServiceHandlerFromEndpoint

func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterOrderServiceHandlerFromEndpoint is same as RegisterOrderServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterOrderServiceServer

func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)

Types

type CreateOrderRequest

type CreateOrderRequest struct {
	User  string   `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
	Items []string `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
}

func (*CreateOrderRequest) Descriptor

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

func (*CreateOrderRequest) GetItems

func (m *CreateOrderRequest) GetItems() []string

func (*CreateOrderRequest) GetUser

func (m *CreateOrderRequest) GetUser() string

func (*CreateOrderRequest) ProtoMessage

func (*CreateOrderRequest) ProtoMessage()

func (*CreateOrderRequest) Reset

func (m *CreateOrderRequest) Reset()

func (*CreateOrderRequest) String

func (m *CreateOrderRequest) String() string

func (*CreateOrderRequest) Validate

func (this *CreateOrderRequest) Validate() error

type DeleteOrderRequest

type DeleteOrderRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*DeleteOrderRequest) Descriptor

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

func (*DeleteOrderRequest) GetId

func (m *DeleteOrderRequest) GetId() string

func (*DeleteOrderRequest) ProtoMessage

func (*DeleteOrderRequest) ProtoMessage()

func (*DeleteOrderRequest) Reset

func (m *DeleteOrderRequest) Reset()

func (*DeleteOrderRequest) String

func (m *DeleteOrderRequest) String() string

func (*DeleteOrderRequest) Validate

func (this *DeleteOrderRequest) Validate() error

type GetOrderDetailRequest

type GetOrderDetailRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*GetOrderDetailRequest) Descriptor

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

func (*GetOrderDetailRequest) GetId

func (m *GetOrderDetailRequest) GetId() string

func (*GetOrderDetailRequest) ProtoMessage

func (*GetOrderDetailRequest) ProtoMessage()

func (*GetOrderDetailRequest) Reset

func (m *GetOrderDetailRequest) Reset()

func (*GetOrderDetailRequest) String

func (m *GetOrderDetailRequest) String() string

func (*GetOrderDetailRequest) Validate

func (this *GetOrderDetailRequest) Validate() error

type GetOrderDetailResponse

type GetOrderDetailResponse struct {
	Id    string       `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	User  string       `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
	Items []*item.Item `protobuf:"bytes,3,rep,name=items" json:"items,omitempty"`
}

func (*GetOrderDetailResponse) Descriptor

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

func (*GetOrderDetailResponse) GetId

func (m *GetOrderDetailResponse) GetId() string

func (*GetOrderDetailResponse) GetItems

func (m *GetOrderDetailResponse) GetItems() []*item.Item

func (*GetOrderDetailResponse) GetUser

func (m *GetOrderDetailResponse) GetUser() string

func (*GetOrderDetailResponse) ProtoMessage

func (*GetOrderDetailResponse) ProtoMessage()

func (*GetOrderDetailResponse) Reset

func (m *GetOrderDetailResponse) Reset()

func (*GetOrderDetailResponse) String

func (m *GetOrderDetailResponse) String() string

func (*GetOrderDetailResponse) Validate

func (this *GetOrderDetailResponse) Validate() error

type GetOrderRequest

type GetOrderRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*GetOrderRequest) Descriptor

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

func (*GetOrderRequest) GetId

func (m *GetOrderRequest) GetId() string

func (*GetOrderRequest) ProtoMessage

func (*GetOrderRequest) ProtoMessage()

func (*GetOrderRequest) Reset

func (m *GetOrderRequest) Reset()

func (*GetOrderRequest) String

func (m *GetOrderRequest) String() string

func (*GetOrderRequest) Validate

func (this *GetOrderRequest) Validate() error

type ListOrdersRequest

type ListOrdersRequest struct {
	// user is optional
	User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
}

func (*ListOrdersRequest) Descriptor

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

func (*ListOrdersRequest) GetUser

func (m *ListOrdersRequest) GetUser() string

func (*ListOrdersRequest) ProtoMessage

func (*ListOrdersRequest) ProtoMessage()

func (*ListOrdersRequest) Reset

func (m *ListOrdersRequest) Reset()

func (*ListOrdersRequest) String

func (m *ListOrdersRequest) String() string

func (*ListOrdersRequest) Validate

func (this *ListOrdersRequest) Validate() error

type ListOrdersResponse

type ListOrdersResponse struct {
	Orders []*Order `protobuf:"bytes,1,rep,name=orders" json:"orders,omitempty"`
}

func (*ListOrdersResponse) Descriptor

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

func (*ListOrdersResponse) GetOrders

func (m *ListOrdersResponse) GetOrders() []*Order

func (*ListOrdersResponse) ProtoMessage

func (*ListOrdersResponse) ProtoMessage()

func (*ListOrdersResponse) Reset

func (m *ListOrdersResponse) Reset()

func (*ListOrdersResponse) String

func (m *ListOrdersResponse) String() string

func (*ListOrdersResponse) Validate

func (this *ListOrdersResponse) Validate() error

type Order

type Order struct {
	Id    string   `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	User  string   `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
	Items []string `protobuf:"bytes,3,rep,name=items" json:"items,omitempty"`
}

func (*Order) Descriptor

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

func (*Order) GetId

func (m *Order) GetId() string

func (*Order) GetItems

func (m *Order) GetItems() []string

func (*Order) GetUser

func (m *Order) GetUser() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) String

func (m *Order) String() string

func (*Order) Validate

func (this *Order) Validate() error

type OrderServiceClient

type OrderServiceClient interface {
	CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error)
	GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*Order, error)
	GetOrderDetail(ctx context.Context, in *GetOrderDetailRequest, opts ...grpc.CallOption) (*GetOrderDetailResponse, error)
	ListOrders(ctx context.Context, in *ListOrdersRequest, opts ...grpc.CallOption) (*ListOrdersResponse, error)
	DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*Order, error)
	UpdateOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*Order, error)
}

func NewOrderServiceClient

func NewOrderServiceClient(cc *grpc.ClientConn) OrderServiceClient

Jump to

Keyboard shortcuts

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