chore: auto-generate protobuf files [skip ci]
This commit is contained in:
297
gen/go/search/search.pb.go
Normal file
297
gen/go/search/search.pb.go
Normal file
@@ -0,0 +1,297 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.21.12
|
||||
// source: search/search.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SearchUsersRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
Status *string `protobuf:"bytes,4,opt,name=status,proto3,oneof" json:"status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) Reset() {
|
||||
*x = SearchUsersRequest{}
|
||||
mi := &file_search_search_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchUsersRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchUsersRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_search_search_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchUsersRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchUsersRequest) Descriptor() ([]byte, []int) {
|
||||
return file_search_search_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) GetQuery() string {
|
||||
if x != nil {
|
||||
return x.Query
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) GetSessionId() string {
|
||||
if x != nil {
|
||||
return x.SessionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUsersRequest) GetStatus() string {
|
||||
if x != nil && x.Status != nil {
|
||||
return *x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SearchUserItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
||||
FullName string `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
|
||||
AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
|
||||
Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,6,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) Reset() {
|
||||
*x = SearchUserItem{}
|
||||
mi := &file_search_search_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchUserItem) ProtoMessage() {}
|
||||
|
||||
func (x *SearchUserItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_search_search_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchUserItem.ProtoReflect.Descriptor instead.
|
||||
func (*SearchUserItem) Descriptor() ([]byte, []int) {
|
||||
return file_search_search_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetFullName() string {
|
||||
if x != nil {
|
||||
return x.FullName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetAvatarUrl() string {
|
||||
if x != nil {
|
||||
return x.AvatarUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserItem) GetIsPublic() bool {
|
||||
if x != nil {
|
||||
return x.IsPublic
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type SearchUsersResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Users []*SearchUserItem `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchUsersResponse) Reset() {
|
||||
*x = SearchUsersResponse{}
|
||||
mi := &file_search_search_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchUsersResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchUsersResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SearchUsersResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_search_search_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchUsersResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SearchUsersResponse) Descriptor() ([]byte, []int) {
|
||||
return file_search_search_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SearchUsersResponse) GetUsers() []*SearchUserItem {
|
||||
if x != nil {
|
||||
return x.Users
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_search_search_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_search_search_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13search/search.proto\x12\tsearch.v1\"\x8a\x01\n" +
|
||||
"\x12SearchUsersRequest\x12\x14\n" +
|
||||
"\x05query\x18\x01 \x01(\tR\x05query\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\tR\x06userId\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x03 \x01(\tR\tsessionId\x12\x1b\n" +
|
||||
"\x06status\x18\x04 \x01(\tH\x00R\x06status\x88\x01\x01B\t\n" +
|
||||
"\a_status\"\xad\x01\n" +
|
||||
"\x0eSearchUserItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x1b\n" +
|
||||
"\tfull_name\x18\x03 \x01(\tR\bfullName\x12\x1d\n" +
|
||||
"\n" +
|
||||
"avatar_url\x18\x04 \x01(\tR\tavatarUrl\x12\x16\n" +
|
||||
"\x06status\x18\x05 \x01(\tR\x06status\x12\x1b\n" +
|
||||
"\tis_public\x18\x06 \x01(\bR\bisPublic\"F\n" +
|
||||
"\x13SearchUsersResponse\x12/\n" +
|
||||
"\x05users\x18\x01 \x03(\v2\x19.search.v1.SearchUserItemR\x05users2]\n" +
|
||||
"\rSearchService\x12L\n" +
|
||||
"\vSearchUsers\x12\x1d.search.v1.SearchUsersRequest\x1a\x1e.search.v1.SearchUsersResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||
|
||||
var (
|
||||
file_search_search_proto_rawDescOnce sync.Once
|
||||
file_search_search_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_search_search_proto_rawDescGZIP() []byte {
|
||||
file_search_search_proto_rawDescOnce.Do(func() {
|
||||
file_search_search_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_search_search_proto_rawDesc), len(file_search_search_proto_rawDesc)))
|
||||
})
|
||||
return file_search_search_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_search_search_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_search_search_proto_goTypes = []any{
|
||||
(*SearchUsersRequest)(nil), // 0: search.v1.SearchUsersRequest
|
||||
(*SearchUserItem)(nil), // 1: search.v1.SearchUserItem
|
||||
(*SearchUsersResponse)(nil), // 2: search.v1.SearchUsersResponse
|
||||
}
|
||||
var file_search_search_proto_depIdxs = []int32{
|
||||
1, // 0: search.v1.SearchUsersResponse.users:type_name -> search.v1.SearchUserItem
|
||||
0, // 1: search.v1.SearchService.SearchUsers:input_type -> search.v1.SearchUsersRequest
|
||||
2, // 2: search.v1.SearchService.SearchUsers:output_type -> search.v1.SearchUsersResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_search_search_proto_init() }
|
||||
func file_search_search_proto_init() {
|
||||
if File_search_search_proto != nil {
|
||||
return
|
||||
}
|
||||
file_search_search_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_search_search_proto_rawDesc), len(file_search_search_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_search_search_proto_goTypes,
|
||||
DependencyIndexes: file_search_search_proto_depIdxs,
|
||||
MessageInfos: file_search_search_proto_msgTypes,
|
||||
}.Build()
|
||||
File_search_search_proto = out.File
|
||||
file_search_search_proto_goTypes = nil
|
||||
file_search_search_proto_depIdxs = nil
|
||||
}
|
||||
121
gen/go/search/search_grpc.pb.go
Normal file
121
gen/go/search/search_grpc.pb.go
Normal file
@@ -0,0 +1,121 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc v3.21.12
|
||||
// source: search/search.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
SearchService_SearchUsers_FullMethodName = "/search.v1.SearchService/SearchUsers"
|
||||
)
|
||||
|
||||
// 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 SearchServiceClient interface {
|
||||
SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error)
|
||||
}
|
||||
|
||||
type searchServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSearchServiceClient(cc grpc.ClientConnInterface) SearchServiceClient {
|
||||
return &searchServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *searchServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SearchUsersResponse)
|
||||
err := c.cc.Invoke(ctx, SearchService_SearchUsers_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SearchServiceServer is the server API for SearchService service.
|
||||
// All implementations must embed UnimplementedSearchServiceServer
|
||||
// for forward compatibility.
|
||||
type SearchServiceServer interface {
|
||||
SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error)
|
||||
mustEmbedUnimplementedSearchServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSearchServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSearchServiceServer struct{}
|
||||
|
||||
func (UnimplementedSearchServiceServer) SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SearchUsers not implemented")
|
||||
}
|
||||
func (UnimplementedSearchServiceServer) mustEmbedUnimplementedSearchServiceServer() {}
|
||||
func (UnimplementedSearchServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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.
|
||||
type UnsafeSearchServiceServer interface {
|
||||
mustEmbedUnimplementedSearchServiceServer()
|
||||
}
|
||||
|
||||
func RegisterSearchServiceServer(s grpc.ServiceRegistrar, srv SearchServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedSearchServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&SearchService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SearchService_SearchUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchUsersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SearchServiceServer).SearchUsers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SearchService_SearchUsers_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SearchServiceServer).SearchUsers(ctx, req.(*SearchUsersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// 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)
|
||||
var SearchService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "search.v1.SearchService",
|
||||
HandlerType: (*SearchServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "SearchUsers",
|
||||
Handler: _SearchService_SearchUsers_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "search/search.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user