v1

package
v0.0.0-...-e6547ed Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OperationActivityGetSku = "/activity.v1.Activity/GetSku"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "ACTIVITY_UNSPECIFIED",
		1: "USER_NOT_FOUND",
	}
	ErrorReason_value = map[string]int32{
		"ACTIVITY_UNSPECIFIED": 0,
		"USER_NOT_FOUND":       1,
	}
)

Enum value maps for ErrorReason.

View Source
var Activity_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "activity.v1.Activity",
	HandlerType: (*ActivityServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSku",
			Handler:    _Activity_GetSku_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/activity/v1/activity.proto",
}

Activity_ServiceDesc is the grpc.ServiceDesc for Activity service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_activity_v1_activity_proto protoreflect.FileDescriptor
View Source
var File_api_activity_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func RegisterActivityHTTPServer

func RegisterActivityHTTPServer(s *http.Server, srv ActivityHTTPServer)

func RegisterActivityServer

func RegisterActivityServer(s grpc.ServiceRegistrar, srv ActivityServer)

Types

type ActivityClient

type ActivityClient interface {
	// Sends a greeting
	GetSku(ctx context.Context, in *GetSkuRequest, opts ...grpc.CallOption) (*GetSkuReply, error)
}

ActivityClient is the client API for Activity 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 NewActivityClient

func NewActivityClient(cc grpc.ClientConnInterface) ActivityClient

type ActivityHTTPClient

type ActivityHTTPClient interface {
	GetSku(ctx context.Context, req *GetSkuRequest, opts ...http.CallOption) (rsp *GetSkuReply, err error)
}

func NewActivityHTTPClient

func NewActivityHTTPClient(client *http.Client) ActivityHTTPClient

type ActivityHTTPClientImpl

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

func (*ActivityHTTPClientImpl) GetSku

type ActivityHTTPServer

type ActivityHTTPServer interface {
	GetSku(context.Context, *GetSkuRequest) (*GetSkuReply, error)
}

type ActivityServer

type ActivityServer interface {
	// Sends a greeting
	GetSku(context.Context, *GetSkuRequest) (*GetSkuReply, error)
	// contains filtered or unexported methods
}

ActivityServer is the server API for Activity service. All implementations must embed UnimplementedActivityServer for forward compatibility

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_ACTIVITY_UNSPECIFIED ErrorReason = 0
	ErrorReason_USER_NOT_FOUND       ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetSkuReply

type GetSkuReply struct {
	StudentList []*GetSkuReply_StuBase `protobuf:"bytes,1,rep,name=studentList,proto3" json:"studentList,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the greetings

func (*GetSkuReply) Descriptor deprecated

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

Deprecated: Use GetSkuReply.ProtoReflect.Descriptor instead.

func (*GetSkuReply) GetStudentList

func (x *GetSkuReply) GetStudentList() []*GetSkuReply_StuBase

func (*GetSkuReply) ProtoMessage

func (*GetSkuReply) ProtoMessage()

func (*GetSkuReply) ProtoReflect

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

func (*GetSkuReply) Reset

func (x *GetSkuReply) Reset()

func (*GetSkuReply) String

func (x *GetSkuReply) String() string

type GetSkuReply_StuBase

type GetSkuReply_StuBase struct {
	Id    uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Age   int32   `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSkuReply_StuBase) Descriptor deprecated

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

Deprecated: Use GetSkuReply_StuBase.ProtoReflect.Descriptor instead.

func (*GetSkuReply_StuBase) GetAge

func (x *GetSkuReply_StuBase) GetAge() int32

func (*GetSkuReply_StuBase) GetId

func (x *GetSkuReply_StuBase) GetId() uint64

func (*GetSkuReply_StuBase) GetName

func (x *GetSkuReply_StuBase) GetName() string

func (*GetSkuReply_StuBase) GetScore

func (x *GetSkuReply_StuBase) GetScore() float32

func (*GetSkuReply_StuBase) ProtoMessage

func (*GetSkuReply_StuBase) ProtoMessage()

func (*GetSkuReply_StuBase) ProtoReflect

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

func (*GetSkuReply_StuBase) Reset

func (x *GetSkuReply_StuBase) Reset()

func (*GetSkuReply_StuBase) String

func (x *GetSkuReply_StuBase) String() string

type GetSkuRequest

type GetSkuRequest struct {
	PageNum  int32 `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`
	PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*GetSkuRequest) Descriptor deprecated

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

Deprecated: Use GetSkuRequest.ProtoReflect.Descriptor instead.

func (*GetSkuRequest) GetPageNum

func (x *GetSkuRequest) GetPageNum() int32

func (*GetSkuRequest) GetPageSize

func (x *GetSkuRequest) GetPageSize() int32

func (*GetSkuRequest) ProtoMessage

func (*GetSkuRequest) ProtoMessage()

func (*GetSkuRequest) ProtoReflect

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

func (*GetSkuRequest) Reset

func (x *GetSkuRequest) Reset()

func (*GetSkuRequest) String

func (x *GetSkuRequest) String() string

type UnimplementedActivityServer

type UnimplementedActivityServer struct {
}

UnimplementedActivityServer must be embedded to have forward compatible implementations.

func (UnimplementedActivityServer) GetSku

type UnsafeActivityServer

type UnsafeActivityServer interface {
	// contains filtered or unexported methods
}

UnsafeActivityServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActivityServer will result in compilation errors.

Jump to

Keyboard shortcuts

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