api

package
v0.0.0-...-64808f0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-triple. DO NOT EDIT.

Source: order_api.proto

Index

Constants

View Source
const (
	// OrderName is the fully-qualified name of the Order service.
	OrderName = "org.apache.dubbogo.samples.shop.order.api.Order"
)
View Source
const (
	// OrderSubmitOrderProcedure is the fully-qualified name of the Order's SubmitOrder RPC.
	OrderSubmitOrderProcedure = "/org.apache.dubbogo.samples.shop.order.api.Order/SubmitOrder"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

View Source
var File_order_api_proto protoreflect.FileDescriptor
View Source
var Order_ClientInfo = client.ClientInfo{
	InterfaceName: "org.apache.dubbogo.samples.shop.order.api.Order",
	MethodNames:   []string{"SubmitOrder"},
	ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
		dubboCli := dubboCliRaw.(*OrderImpl)
		dubboCli.conn = conn
	},
}
View Source
var Order_ServiceInfo = server.ServiceInfo{
	InterfaceName: "org.apache.dubbogo.samples.shop.order.api.Order",
	ServiceType:   (*OrderHandler)(nil),
	Methods: []server.MethodInfo{
		{
			Name: "SubmitOrder",
			Type: constant.CallUnary,
			ReqInitFunc: func() interface{} {
				return new(OrderReq)
			},
			MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
				req := args[0].(*OrderReq)
				res, err := handler.(OrderHandler).SubmitOrder(ctx, req)
				if err != nil {
					return nil, err
				}
				return triple_protocol.NewResponse(res), nil
			},
		},
	},
}

Functions

func RegisterOrderHandler

func RegisterOrderHandler(srv *server.Server, hdlr OrderHandler, opts ...server.ServiceOption) error

func SetConsumerService

func SetConsumerService(srv common.RPCService)

func SetProviderService

func SetProviderService(srv common.RPCService)

Types

type Order

type Order interface {
	SubmitOrder(ctx context.Context, req *OrderReq, opts ...client.CallOption) (*OrderResp, error)
}

Order is a client for the org.apache.dubbogo.samples.shop.order.api.Order service.

func NewOrder

func NewOrder(cli *client.Client, opts ...client.ReferenceOption) (Order, error)

NewOrder constructs a client for the api.Order service.

type OrderHandler

type OrderHandler interface {
	SubmitOrder(context.Context, *OrderReq) (*OrderResp, error)
}

OrderHandler is an implementation of the org.apache.dubbogo.samples.shop.order.api.Order service.

type OrderImpl

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

OrderImpl implements Order.

func (*OrderImpl) SubmitOrder

func (c *OrderImpl) SubmitOrder(ctx context.Context, req *OrderReq, opts ...client.CallOption) (*OrderResp, error)

type OrderReq

type OrderReq struct {
	Sku      int64  `protobuf:"varint,1,opt,name=Sku,proto3" json:"Sku,omitempty"`
	Count    int32  `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"`
	Address  string `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	Phone    string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
	Receiver string `protobuf:"bytes,5,opt,name=Receiver,proto3" json:"Receiver,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderReq) Descriptor deprecated

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

Deprecated: Use OrderReq.ProtoReflect.Descriptor instead.

func (*OrderReq) GetAddress

func (x *OrderReq) GetAddress() string

func (*OrderReq) GetCount

func (x *OrderReq) GetCount() int32

func (*OrderReq) GetPhone

func (x *OrderReq) GetPhone() string

func (*OrderReq) GetReceiver

func (x *OrderReq) GetReceiver() string

func (*OrderReq) GetSku

func (x *OrderReq) GetSku() int64

func (*OrderReq) ProtoMessage

func (*OrderReq) ProtoMessage()

func (*OrderReq) ProtoReflect

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

func (*OrderReq) Reset

func (x *OrderReq) Reset()

func (*OrderReq) String

func (x *OrderReq) String() string

type OrderResp

type OrderResp struct {
	Env      string `protobuf:"bytes,1,opt,name=Env,proto3" json:"Env,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	Phone    string `protobuf:"bytes,3,opt,name=Phone,proto3" json:"Phone,omitempty"`
	Receiver string `protobuf:"bytes,4,opt,name=Receiver,proto3" json:"Receiver,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderResp) Descriptor deprecated

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

Deprecated: Use OrderResp.ProtoReflect.Descriptor instead.

func (*OrderResp) GetAddress

func (x *OrderResp) GetAddress() string

func (*OrderResp) GetEnv

func (x *OrderResp) GetEnv() string

func (*OrderResp) GetPhone

func (x *OrderResp) GetPhone() string

func (*OrderResp) GetReceiver

func (x *OrderResp) GetReceiver() string

func (*OrderResp) ProtoMessage

func (*OrderResp) ProtoMessage()

func (*OrderResp) ProtoReflect

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

func (*OrderResp) Reset

func (x *OrderResp) Reset()

func (*OrderResp) String

func (x *OrderResp) String() string

Jump to

Keyboard shortcuts

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