service_proto

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_common_proto protoreflect.FileDescriptor
View Source
var File_proto_search_proto protoreflect.FileDescriptor
View Source
var SearchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SearchService",
	HandlerType: (*SearchServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Search",
			Handler:    _SearchService_Search_Handler,
		},
		{
			MethodName: "CurrentTime",
			Handler:    _SearchService_CurrentTime_Handler,
		},
		{
			MethodName: "SendMuchData",
			Handler:    _SearchService_SendMuchData_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/search.proto",
}

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

Functions

func RegisterSearchServiceServer

func RegisterSearchServiceServer(s grpc.ServiceRegistrar, srv SearchServiceServer)

Types

type Book added in v0.2.1

type Book struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Id   int32  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Book) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetId added in v0.2.1

func (x *Book) GetId() int32

func (*Book) GetName added in v0.2.1

func (x *Book) GetName() string

func (*Book) ProtoMessage added in v0.2.1

func (*Book) ProtoMessage()

func (*Book) ProtoReflect added in v0.2.1

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

func (*Book) Reset added in v0.2.1

func (x *Book) Reset()

func (*Book) String added in v0.2.1

func (x *Book) String() string

type ExtraInfo

type ExtraInfo struct {
	JobTitle   string              `protobuf:"bytes,1,opt,name=jobTitle,proto3" json:"jobTitle,omitempty"`
	Location   string              `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	Department *another.Department `protobuf:"bytes,3,opt,name=department,proto3" json:"department,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtraInfo) Descriptor deprecated

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

Deprecated: Use ExtraInfo.ProtoReflect.Descriptor instead.

func (*ExtraInfo) GetDepartment

func (x *ExtraInfo) GetDepartment() *another.Department

func (*ExtraInfo) GetJobTitle

func (x *ExtraInfo) GetJobTitle() string

func (*ExtraInfo) GetLocation

func (x *ExtraInfo) GetLocation() string

func (*ExtraInfo) ProtoMessage

func (*ExtraInfo) ProtoMessage()

func (*ExtraInfo) ProtoReflect

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

func (*ExtraInfo) Reset

func (x *ExtraInfo) Reset()

func (*ExtraInfo) String

func (x *ExtraInfo) String() string

type MuchRequest added in v0.2.1

type MuchRequest struct {
	RequestId uint64  `protobuf:"varint,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
	Books     []*Book `protobuf:"bytes,2,rep,name=books,proto3" json:"books,omitempty"`
	// contains filtered or unexported fields
}

func (*MuchRequest) Descriptor deprecated added in v0.2.1

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

Deprecated: Use MuchRequest.ProtoReflect.Descriptor instead.

func (*MuchRequest) GetBooks added in v0.2.1

func (x *MuchRequest) GetBooks() []*Book

func (*MuchRequest) GetRequestId added in v0.2.1

func (x *MuchRequest) GetRequestId() uint64

func (*MuchRequest) ProtoMessage added in v0.2.1

func (*MuchRequest) ProtoMessage()

func (*MuchRequest) ProtoReflect added in v0.2.1

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

func (*MuchRequest) Reset added in v0.2.1

func (x *MuchRequest) Reset()

func (*MuchRequest) String added in v0.2.1

func (x *MuchRequest) String() string

type MuchResponse added in v0.2.1

type MuchResponse struct {
	RequestId uint64 `protobuf:"varint,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
	// contains filtered or unexported fields
}

func (*MuchResponse) Descriptor deprecated added in v0.2.1

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

Deprecated: Use MuchResponse.ProtoReflect.Descriptor instead.

func (*MuchResponse) GetRequestId added in v0.2.1

func (x *MuchResponse) GetRequestId() uint64

func (*MuchResponse) ProtoMessage added in v0.2.1

func (*MuchResponse) ProtoMessage()

func (*MuchResponse) ProtoReflect added in v0.2.1

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

func (*MuchResponse) Reset added in v0.2.1

func (x *MuchResponse) Reset()

func (*MuchResponse) String added in v0.2.1

func (x *MuchResponse) String() string

type SearchRequest

type SearchRequest struct {
	StaffName string     `protobuf:"bytes,1,opt,name=staffName,proto3" json:"staffName,omitempty"`
	Gender    bool       `protobuf:"varint,2,opt,name=gender,proto3" json:"gender,omitempty"`
	Age       uint32     `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	Extra     *ExtraInfo `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetAge

func (x *SearchRequest) GetAge() uint32

func (*SearchRequest) GetExtra

func (x *SearchRequest) GetExtra() *ExtraInfo

func (*SearchRequest) GetGender

func (x *SearchRequest) GetGender() bool

func (*SearchRequest) GetStaffName

func (x *SearchRequest) GetStaffName() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {
	StaffID   int64  `protobuf:"varint,1,opt,name=staffID,proto3" json:"staffID,omitempty"`
	StaffName string `protobuf:"bytes,2,opt,name=staffName,proto3" json:"staffName,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetStaffID

func (x *SearchResponse) GetStaffID() int64

func (*SearchResponse) GetStaffName

func (x *SearchResponse) GetStaffName() string

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type SearchServiceClient

type SearchServiceClient interface {
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	CurrentTime(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error)
	SendMuchData(ctx context.Context, in *MuchRequest, opts ...grpc.CallOption) (*MuchResponse, error)
}

SearchServiceClient is the client API for SearchService 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.

type SearchServiceServer

type SearchServiceServer interface {
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	CurrentTime(context.Context, *TimeRequest) (*TimeResponse, error)
	SendMuchData(context.Context, *MuchRequest) (*MuchResponse, error)
}

SearchServiceServer is the server API for SearchService service. All implementations should embed UnimplementedSearchServiceServer for forward compatibility

type TimeRequest

type TimeRequest struct {
	RequestId uint64 `protobuf:"varint,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeRequest) Descriptor deprecated

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

func (*TimeRequest) GetRequestId added in v0.2.1

func (x *TimeRequest) GetRequestId() uint64

func (*TimeRequest) ProtoMessage

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) ProtoReflect

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

func (*TimeRequest) Reset

func (x *TimeRequest) Reset()

func (*TimeRequest) String

func (x *TimeRequest) String() string

type TimeResponse

type TimeResponse struct {
	CurrentTime string `protobuf:"bytes,1,opt,name=currentTime,proto3" json:"currentTime,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeResponse) Descriptor deprecated

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

Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.

func (*TimeResponse) GetCurrentTime

func (x *TimeResponse) GetCurrentTime() string

func (*TimeResponse) ProtoMessage

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) ProtoReflect

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

func (*TimeResponse) Reset

func (x *TimeResponse) Reset()

func (*TimeResponse) String

func (x *TimeResponse) String() string

type UnimplementedSearchServiceServer

type UnimplementedSearchServiceServer struct {
}

UnimplementedSearchServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedSearchServiceServer) CurrentTime

func (UnimplementedSearchServiceServer) Search

func (UnimplementedSearchServiceServer) SendMuchData added in v0.2.1

type UnsafeSearchServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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