service_proto

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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,
		},
	},
	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 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 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)
}

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)
}

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

type TimeRequest

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

func (*TimeRequest) Descriptor deprecated

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

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

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