init: Init project.

This commit is contained in:
Назар Гольченко 2025-10-11 17:16:56 +03:00
commit 60efd31105
8 changed files with 1520 additions and 0 deletions

15
go.mod Normal file
View File

@ -0,0 +1,15 @@
module gitea.cybertalant.ru/VisionCareerMiniapp/DataManagemet
go 1.24.0
require (
google.golang.org/grpc v1.76.0
google.golang.org/protobuf v1.36.10
)
require (
golang.org/x/net v0.42.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect
)

36
go.sum Normal file
View File

@ -0,0 +1,36 @@
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b h1:zPKJod4w6F1+nRGDI9ubnXYhU9NSWoFAijkHkUXeTK8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=

View File

@ -0,0 +1,736 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: visionCareer.proto
package pbvisionCareerpub
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 User struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // required
TargetRole string `protobuf:"bytes,2,opt,name=targetRole,proto3" json:"targetRole,omitempty"`
ResumePath string `protobuf:"bytes,3,opt,name=resumePath,proto3" json:"resumePath,omitempty"`
WorkExperience string `protobuf:"bytes,4,opt,name=workExperience,proto3" json:"workExperience,omitempty"`
WorkFormat string `protobuf:"bytes,5,opt,name=workFormat,proto3" json:"workFormat,omitempty"`
SalaryRange string `protobuf:"bytes,6,opt,name=salaryRange,proto3" json:"salaryRange,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *User) Reset() {
*x = User{}
mi := &file_visionCareer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_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 User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{0}
}
func (x *User) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *User) GetTargetRole() string {
if x != nil {
return x.TargetRole
}
return ""
}
func (x *User) GetResumePath() string {
if x != nil {
return x.ResumePath
}
return ""
}
func (x *User) GetWorkExperience() string {
if x != nil {
return x.WorkExperience
}
return ""
}
func (x *User) GetWorkFormat() string {
if x != nil {
return x.WorkFormat
}
return ""
}
func (x *User) GetSalaryRange() string {
if x != nil {
return x.SalaryRange
}
return ""
}
type Pagination struct {
state protoimpl.MessageState `protogen:"open.v1"`
PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Pagination) Reset() {
*x = Pagination{}
mi := &file_visionCareer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Pagination) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Pagination) ProtoMessage() {}
func (x *Pagination) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_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 Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{1}
}
func (x *Pagination) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *Pagination) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
type PaginationMeta struct {
state protoimpl.MessageState `protogen:"open.v1"`
PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
TotalPages int32 `protobuf:"varint,3,opt,name=totalPages,proto3" json:"totalPages,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PaginationMeta) Reset() {
*x = PaginationMeta{}
mi := &file_visionCareer_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PaginationMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaginationMeta) ProtoMessage() {}
func (x *PaginationMeta) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_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 PaginationMeta.ProtoReflect.Descriptor instead.
func (*PaginationMeta) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{2}
}
func (x *PaginationMeta) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *PaginationMeta) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *PaginationMeta) GetTotalPages() int32 {
if x != nil {
return x.TotalPages
}
return 0
}
type FilterValue struct {
state protoimpl.MessageState `protogen:"open.v1"`
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
Equal string `protobuf:"bytes,3,opt,name=equal,proto3" json:"equal,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FilterValue) Reset() {
*x = FilterValue{}
mi := &file_visionCareer_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FilterValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FilterValue) ProtoMessage() {}
func (x *FilterValue) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[3]
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 FilterValue.ProtoReflect.Descriptor instead.
func (*FilterValue) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{3}
}
func (x *FilterValue) GetFrom() string {
if x != nil {
return x.From
}
return ""
}
func (x *FilterValue) GetTo() string {
if x != nil {
return x.To
}
return ""
}
func (x *FilterValue) GetEqual() string {
if x != nil {
return x.Equal
}
return ""
}
type Sort struct {
state protoimpl.MessageState `protogen:"open.v1"`
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
Direction string `protobuf:"bytes,2,opt,name=direction,proto3" json:"direction,omitempty"` // "ASC" or "DESC"
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Sort) Reset() {
*x = Sort{}
mi := &file_visionCareer_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Sort) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Sort) ProtoMessage() {}
func (x *Sort) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[4]
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 Sort.ProtoReflect.Descriptor instead.
func (*Sort) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{4}
}
func (x *Sort) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *Sort) GetDirection() string {
if x != nil {
return x.Direction
}
return ""
}
type FieldValue struct {
state protoimpl.MessageState `protogen:"open.v1"`
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FieldValue) Reset() {
*x = FieldValue{}
mi := &file_visionCareer_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FieldValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldValue) ProtoMessage() {}
func (x *FieldValue) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[5]
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 FieldValue.ProtoReflect.Descriptor instead.
func (*FieldValue) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{5}
}
func (x *FieldValue) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *FieldValue) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type IdName struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *IdName) Reset() {
*x = IdName{}
mi := &file_visionCareer_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IdName) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IdName) ProtoMessage() {}
func (x *IdName) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[6]
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 IdName.ProtoReflect.Descriptor instead.
func (*IdName) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{6}
}
func (x *IdName) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *IdName) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type UpsertUserDataRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data *User `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpsertUserDataRequest) Reset() {
*x = UpsertUserDataRequest{}
mi := &file_visionCareer_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpsertUserDataRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpsertUserDataRequest) ProtoMessage() {}
func (x *UpsertUserDataRequest) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[7]
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 UpsertUserDataRequest.ProtoReflect.Descriptor instead.
func (*UpsertUserDataRequest) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{7}
}
func (x *UpsertUserDataRequest) GetData() *User {
if x != nil {
return x.Data
}
return nil
}
type GetUserVacanciesRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` // required
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetUserVacanciesRequest) Reset() {
*x = GetUserVacanciesRequest{}
mi := &file_visionCareer_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUserVacanciesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserVacanciesRequest) ProtoMessage() {}
func (x *GetUserVacanciesRequest) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[8]
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 GetUserVacanciesRequest.ProtoReflect.Descriptor instead.
func (*GetUserVacanciesRequest) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{8}
}
func (x *GetUserVacanciesRequest) GetUserID() int64 {
if x != nil {
return x.UserID
}
return 0
}
type UpsertUserDataResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // "success" | "error"
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpsertUserDataResponse) Reset() {
*x = UpsertUserDataResponse{}
mi := &file_visionCareer_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpsertUserDataResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpsertUserDataResponse) ProtoMessage() {}
func (x *UpsertUserDataResponse) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[9]
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 UpsertUserDataResponse.ProtoReflect.Descriptor instead.
func (*UpsertUserDataResponse) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{9}
}
func (x *UpsertUserDataResponse) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
type GetUserVacanciesResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // "success" | "error"
Items []string `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetUserVacanciesResponse) Reset() {
*x = GetUserVacanciesResponse{}
mi := &file_visionCareer_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUserVacanciesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserVacanciesResponse) ProtoMessage() {}
func (x *GetUserVacanciesResponse) ProtoReflect() protoreflect.Message {
mi := &file_visionCareer_proto_msgTypes[10]
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 GetUserVacanciesResponse.ProtoReflect.Descriptor instead.
func (*GetUserVacanciesResponse) Descriptor() ([]byte, []int) {
return file_visionCareer_proto_rawDescGZIP(), []int{10}
}
func (x *GetUserVacanciesResponse) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *GetUserVacanciesResponse) GetItems() []string {
if x != nil {
return x.Items
}
return nil
}
var File_visionCareer_proto protoreflect.FileDescriptor
const file_visionCareer_proto_rawDesc = "" +
"\n" +
"\x12visionCareer.proto\x12\x11pbvisionCareerpub\"\xc0\x01\n" +
"\x04User\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1e\n" +
"\n" +
"targetRole\x18\x02 \x01(\tR\n" +
"targetRole\x12\x1e\n" +
"\n" +
"resumePath\x18\x03 \x01(\tR\n" +
"resumePath\x12&\n" +
"\x0eworkExperience\x18\x04 \x01(\tR\x0eworkExperience\x12\x1e\n" +
"\n" +
"workFormat\x18\x05 \x01(\tR\n" +
"workFormat\x12 \n" +
"\vsalaryRange\x18\x06 \x01(\tR\vsalaryRange\"<\n" +
"\n" +
"Pagination\x12\x1a\n" +
"\bpageSize\x18\x01 \x01(\x05R\bpageSize\x12\x12\n" +
"\x04page\x18\x02 \x01(\x05R\x04page\"`\n" +
"\x0ePaginationMeta\x12\x1a\n" +
"\bpageSize\x18\x01 \x01(\x05R\bpageSize\x12\x12\n" +
"\x04page\x18\x02 \x01(\x05R\x04page\x12\x1e\n" +
"\n" +
"totalPages\x18\x03 \x01(\x05R\n" +
"totalPages\"G\n" +
"\vFilterValue\x12\x12\n" +
"\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" +
"\x02to\x18\x02 \x01(\tR\x02to\x12\x14\n" +
"\x05equal\x18\x03 \x01(\tR\x05equal\":\n" +
"\x04Sort\x12\x14\n" +
"\x05field\x18\x01 \x01(\tR\x05field\x12\x1c\n" +
"\tdirection\x18\x02 \x01(\tR\tdirection\"8\n" +
"\n" +
"FieldValue\x12\x14\n" +
"\x05field\x18\x01 \x01(\tR\x05field\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value\",\n" +
"\x06IdName\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\"D\n" +
"\x15UpsertUserDataRequest\x12+\n" +
"\x04data\x18\x01 \x01(\v2\x17.pbvisionCareerpub.UserR\x04data\"1\n" +
"\x17GetUserVacanciesRequest\x12\x16\n" +
"\x06userID\x18\x01 \x01(\x03R\x06userID\"0\n" +
"\x16UpsertUserDataResponse\x12\x16\n" +
"\x06status\x18\x01 \x01(\tR\x06status\"H\n" +
"\x18GetUserVacanciesResponse\x12\x16\n" +
"\x06status\x18\x01 \x01(\tR\x06status\x12\x14\n" +
"\x05items\x18\x02 \x03(\tR\x05items2\xee\x01\n" +
"\x18VisionCareerApiServiceV1\x12e\n" +
"\x0eUpsertUserData\x12(.pbvisionCareerpub.UpsertUserDataRequest\x1a).pbvisionCareerpub.UpsertUserDataResponse\x12k\n" +
"\x10GetUserVacancies\x12*.pbvisionCareerpub.GetUserVacanciesRequest\x1a+.pbvisionCareerpub.GetUserVacanciesResponseB\x16Z\x14./;pbvisionCareerpubb\x06proto3"
var (
file_visionCareer_proto_rawDescOnce sync.Once
file_visionCareer_proto_rawDescData []byte
)
func file_visionCareer_proto_rawDescGZIP() []byte {
file_visionCareer_proto_rawDescOnce.Do(func() {
file_visionCareer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_visionCareer_proto_rawDesc), len(file_visionCareer_proto_rawDesc)))
})
return file_visionCareer_proto_rawDescData
}
var file_visionCareer_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_visionCareer_proto_goTypes = []any{
(*User)(nil), // 0: pbvisionCareerpub.User
(*Pagination)(nil), // 1: pbvisionCareerpub.Pagination
(*PaginationMeta)(nil), // 2: pbvisionCareerpub.PaginationMeta
(*FilterValue)(nil), // 3: pbvisionCareerpub.FilterValue
(*Sort)(nil), // 4: pbvisionCareerpub.Sort
(*FieldValue)(nil), // 5: pbvisionCareerpub.FieldValue
(*IdName)(nil), // 6: pbvisionCareerpub.IdName
(*UpsertUserDataRequest)(nil), // 7: pbvisionCareerpub.UpsertUserDataRequest
(*GetUserVacanciesRequest)(nil), // 8: pbvisionCareerpub.GetUserVacanciesRequest
(*UpsertUserDataResponse)(nil), // 9: pbvisionCareerpub.UpsertUserDataResponse
(*GetUserVacanciesResponse)(nil), // 10: pbvisionCareerpub.GetUserVacanciesResponse
}
var file_visionCareer_proto_depIdxs = []int32{
0, // 0: pbvisionCareerpub.UpsertUserDataRequest.data:type_name -> pbvisionCareerpub.User
7, // 1: pbvisionCareerpub.VisionCareerApiServiceV1.UpsertUserData:input_type -> pbvisionCareerpub.UpsertUserDataRequest
8, // 2: pbvisionCareerpub.VisionCareerApiServiceV1.GetUserVacancies:input_type -> pbvisionCareerpub.GetUserVacanciesRequest
9, // 3: pbvisionCareerpub.VisionCareerApiServiceV1.UpsertUserData:output_type -> pbvisionCareerpub.UpsertUserDataResponse
10, // 4: pbvisionCareerpub.VisionCareerApiServiceV1.GetUserVacancies:output_type -> pbvisionCareerpub.GetUserVacanciesResponse
3, // [3:5] is the sub-list for method output_type
1, // [1:3] 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_visionCareer_proto_init() }
func file_visionCareer_proto_init() {
if File_visionCareer_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_visionCareer_proto_rawDesc), len(file_visionCareer_proto_rawDesc)),
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_visionCareer_proto_goTypes,
DependencyIndexes: file_visionCareer_proto_depIdxs,
MessageInfos: file_visionCareer_proto_msgTypes,
}.Build()
File_visionCareer_proto = out.File
file_visionCareer_proto_goTypes = nil
file_visionCareer_proto_depIdxs = nil
}

View File

@ -0,0 +1,168 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.29.3
// source: visionCareer.proto
package pbvisionCareerpub
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 (
VisionCareerApiServiceV1_UpsertUserData_FullMethodName = "/pbvisionCareerpub.VisionCareerApiServiceV1/UpsertUserData"
VisionCareerApiServiceV1_GetUserVacancies_FullMethodName = "/pbvisionCareerpub.VisionCareerApiServiceV1/GetUserVacancies"
)
// VisionCareerApiServiceV1Client is the client API for VisionCareerApiServiceV1 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.
//
// Сервис API Vision Career v1
type VisionCareerApiServiceV1Client interface {
// Отправить данные о пользователе, чтобы начать генерацию цифрового портрета
UpsertUserData(ctx context.Context, in *UpsertUserDataRequest, opts ...grpc.CallOption) (*UpsertUserDataResponse, error)
// Получить список актуальных вакансий, для текущего пользователя
GetUserVacancies(ctx context.Context, in *GetUserVacanciesRequest, opts ...grpc.CallOption) (*GetUserVacanciesResponse, error)
}
type visionCareerApiServiceV1Client struct {
cc grpc.ClientConnInterface
}
func NewVisionCareerApiServiceV1Client(cc grpc.ClientConnInterface) VisionCareerApiServiceV1Client {
return &visionCareerApiServiceV1Client{cc}
}
func (c *visionCareerApiServiceV1Client) UpsertUserData(ctx context.Context, in *UpsertUserDataRequest, opts ...grpc.CallOption) (*UpsertUserDataResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpsertUserDataResponse)
err := c.cc.Invoke(ctx, VisionCareerApiServiceV1_UpsertUserData_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *visionCareerApiServiceV1Client) GetUserVacancies(ctx context.Context, in *GetUserVacanciesRequest, opts ...grpc.CallOption) (*GetUserVacanciesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserVacanciesResponse)
err := c.cc.Invoke(ctx, VisionCareerApiServiceV1_GetUserVacancies_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// VisionCareerApiServiceV1Server is the server API for VisionCareerApiServiceV1 service.
// All implementations must embed UnimplementedVisionCareerApiServiceV1Server
// for forward compatibility.
//
// Сервис API Vision Career v1
type VisionCareerApiServiceV1Server interface {
// Отправить данные о пользователе, чтобы начать генерацию цифрового портрета
UpsertUserData(context.Context, *UpsertUserDataRequest) (*UpsertUserDataResponse, error)
// Получить список актуальных вакансий, для текущего пользователя
GetUserVacancies(context.Context, *GetUserVacanciesRequest) (*GetUserVacanciesResponse, error)
mustEmbedUnimplementedVisionCareerApiServiceV1Server()
}
// UnimplementedVisionCareerApiServiceV1Server 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 UnimplementedVisionCareerApiServiceV1Server struct{}
func (UnimplementedVisionCareerApiServiceV1Server) UpsertUserData(context.Context, *UpsertUserDataRequest) (*UpsertUserDataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpsertUserData not implemented")
}
func (UnimplementedVisionCareerApiServiceV1Server) GetUserVacancies(context.Context, *GetUserVacanciesRequest) (*GetUserVacanciesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserVacancies not implemented")
}
func (UnimplementedVisionCareerApiServiceV1Server) mustEmbedUnimplementedVisionCareerApiServiceV1Server() {
}
func (UnimplementedVisionCareerApiServiceV1Server) testEmbeddedByValue() {}
// UnsafeVisionCareerApiServiceV1Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VisionCareerApiServiceV1Server will
// result in compilation errors.
type UnsafeVisionCareerApiServiceV1Server interface {
mustEmbedUnimplementedVisionCareerApiServiceV1Server()
}
func RegisterVisionCareerApiServiceV1Server(s grpc.ServiceRegistrar, srv VisionCareerApiServiceV1Server) {
// If the following call pancis, it indicates UnimplementedVisionCareerApiServiceV1Server 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(&VisionCareerApiServiceV1_ServiceDesc, srv)
}
func _VisionCareerApiServiceV1_UpsertUserData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsertUserDataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VisionCareerApiServiceV1Server).UpsertUserData(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: VisionCareerApiServiceV1_UpsertUserData_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VisionCareerApiServiceV1Server).UpsertUserData(ctx, req.(*UpsertUserDataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _VisionCareerApiServiceV1_GetUserVacancies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserVacanciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VisionCareerApiServiceV1Server).GetUserVacancies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: VisionCareerApiServiceV1_GetUserVacancies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VisionCareerApiServiceV1Server).GetUserVacancies(ctx, req.(*GetUserVacanciesRequest))
}
return interceptor(ctx, in, info, handler)
}
// VisionCareerApiServiceV1_ServiceDesc is the grpc.ServiceDesc for VisionCareerApiServiceV1 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VisionCareerApiServiceV1_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pbvisionCareerpub.VisionCareerApiServiceV1",
HandlerType: (*VisionCareerApiServiceV1Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpsertUserData",
Handler: _VisionCareerApiServiceV1_UpsertUserData_Handler,
},
{
MethodName: "GetUserVacancies",
Handler: _VisionCareerApiServiceV1_GetUserVacancies_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "visionCareer.proto",
}

View File

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: visionCareer.proto
# Protobuf Python Version: 6.31.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC,
6,
31,
1,
'',
'visionCareer.proto'
)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12visionCareer.proto\x12\x11pbvisionCareerpub\"{\n\x04User\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\ntargetRole\x18\x02 \x01(\t\x12\x12\n\nresumePath\x18\x03 \x01(\t\x12\x16\n\x0eworkExperience\x18\x04 \x01(\t\x12\x12\n\nworkFormat\x18\x05 \x01(\t\x12\x13\n\x0bsalaryRange\x18\x06 \x01(\t\",\n\nPagination\x12\x10\n\x08pageSize\x18\x01 \x01(\x05\x12\x0c\n\x04page\x18\x02 \x01(\x05\"D\n\x0ePaginationMeta\x12\x10\n\x08pageSize\x18\x01 \x01(\x05\x12\x0c\n\x04page\x18\x02 \x01(\x05\x12\x12\n\ntotalPages\x18\x03 \x01(\x05\"6\n\x0b\x46ilterValue\x12\x0c\n\x04\x66rom\x18\x01 \x01(\t\x12\n\n\x02to\x18\x02 \x01(\t\x12\r\n\x05\x65qual\x18\x03 \x01(\t\"(\n\x04Sort\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x11\n\tdirection\x18\x02 \x01(\t\"*\n\nFieldValue\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\"\n\x06IdName\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\">\n\x15UpsertUserDataRequest\x12%\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x17.pbvisionCareerpub.User\")\n\x17GetUserVacanciesRequest\x12\x0e\n\x06userID\x18\x01 \x01(\x03\"(\n\x16UpsertUserDataResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\"9\n\x18GetUserVacanciesResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\r\n\x05items\x18\x02 \x03(\t2\xee\x01\n\x18VisionCareerApiServiceV1\x12\x65\n\x0eUpsertUserData\x12(.pbvisionCareerpub.UpsertUserDataRequest\x1a).pbvisionCareerpub.UpsertUserDataResponse\x12k\n\x10GetUserVacancies\x12*.pbvisionCareerpub.GetUserVacanciesRequest\x1a+.pbvisionCareerpub.GetUserVacanciesResponseB\x16Z\x14./;pbvisionCareerpubb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'visionCareer_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
_globals['DESCRIPTOR']._loaded_options = None
_globals['DESCRIPTOR']._serialized_options = b'Z\024./;pbvisionCareerpub'
_globals['_USER']._serialized_start=41
_globals['_USER']._serialized_end=164
_globals['_PAGINATION']._serialized_start=166
_globals['_PAGINATION']._serialized_end=210
_globals['_PAGINATIONMETA']._serialized_start=212
_globals['_PAGINATIONMETA']._serialized_end=280
_globals['_FILTERVALUE']._serialized_start=282
_globals['_FILTERVALUE']._serialized_end=336
_globals['_SORT']._serialized_start=338
_globals['_SORT']._serialized_end=378
_globals['_FIELDVALUE']._serialized_start=380
_globals['_FIELDVALUE']._serialized_end=422
_globals['_IDNAME']._serialized_start=424
_globals['_IDNAME']._serialized_end=458
_globals['_UPSERTUSERDATAREQUEST']._serialized_start=460
_globals['_UPSERTUSERDATAREQUEST']._serialized_end=522
_globals['_GETUSERVACANCIESREQUEST']._serialized_start=524
_globals['_GETUSERVACANCIESREQUEST']._serialized_end=565
_globals['_UPSERTUSERDATARESPONSE']._serialized_start=567
_globals['_UPSERTUSERDATARESPONSE']._serialized_end=607
_globals['_GETUSERVACANCIESRESPONSE']._serialized_start=609
_globals['_GETUSERVACANCIESRESPONSE']._serialized_end=666
_globals['_VISIONCAREERAPISERVICEV1']._serialized_start=669
_globals['_VISIONCAREERAPISERVICEV1']._serialized_end=907
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,251 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
@typing.final
class User(google.protobuf.message.Message):
"""----------------------------------------
USER
----------------------------------------
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
TARGETROLE_FIELD_NUMBER: builtins.int
RESUMEPATH_FIELD_NUMBER: builtins.int
WORKEXPERIENCE_FIELD_NUMBER: builtins.int
WORKFORMAT_FIELD_NUMBER: builtins.int
SALARYRANGE_FIELD_NUMBER: builtins.int
id: builtins.int
"""required"""
targetRole: builtins.str
resumePath: builtins.str
workExperience: builtins.str
workFormat: builtins.str
salaryRange: builtins.str
def __init__(
self,
*,
id: builtins.int = ...,
targetRole: builtins.str = ...,
resumePath: builtins.str = ...,
workExperience: builtins.str = ...,
workFormat: builtins.str = ...,
salaryRange: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["id", b"id", "resumePath", b"resumePath", "salaryRange", b"salaryRange", "targetRole", b"targetRole", "workExperience", b"workExperience", "workFormat", b"workFormat"]) -> None: ...
global___User = User
@typing.final
class Pagination(google.protobuf.message.Message):
"""----------------------------------------
PAGINATION
----------------------------------------
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
PAGESIZE_FIELD_NUMBER: builtins.int
PAGE_FIELD_NUMBER: builtins.int
pageSize: builtins.int
page: builtins.int
def __init__(
self,
*,
pageSize: builtins.int = ...,
page: builtins.int = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["page", b"page", "pageSize", b"pageSize"]) -> None: ...
global___Pagination = Pagination
@typing.final
class PaginationMeta(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
PAGESIZE_FIELD_NUMBER: builtins.int
PAGE_FIELD_NUMBER: builtins.int
TOTALPAGES_FIELD_NUMBER: builtins.int
pageSize: builtins.int
page: builtins.int
totalPages: builtins.int
def __init__(
self,
*,
pageSize: builtins.int = ...,
page: builtins.int = ...,
totalPages: builtins.int = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["page", b"page", "pageSize", b"pageSize", "totalPages", b"totalPages"]) -> None: ...
global___PaginationMeta = PaginationMeta
@typing.final
class FilterValue(google.protobuf.message.Message):
"""----------------------------------------
COMMON
----------------------------------------
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FROM_FIELD_NUMBER: builtins.int
TO_FIELD_NUMBER: builtins.int
EQUAL_FIELD_NUMBER: builtins.int
to: builtins.str
equal: builtins.str
def __init__(
self,
*,
to: builtins.str = ...,
equal: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["equal", b"equal", "from", b"from", "to", b"to"]) -> None: ...
global___FilterValue = FilterValue
@typing.final
class Sort(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FIELD_FIELD_NUMBER: builtins.int
DIRECTION_FIELD_NUMBER: builtins.int
field: builtins.str
direction: builtins.str
""""ASC" or "DESC" """
def __init__(
self,
*,
field: builtins.str = ...,
direction: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["direction", b"direction", "field", b"field"]) -> None: ...
global___Sort = Sort
@typing.final
class FieldValue(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FIELD_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
field: builtins.str
value: builtins.str
def __init__(
self,
*,
field: builtins.str = ...,
value: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["field", b"field", "value", b"value"]) -> None: ...
global___FieldValue = FieldValue
@typing.final
class IdName(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
NAME_FIELD_NUMBER: builtins.int
id: builtins.str
name: builtins.str
def __init__(
self,
*,
id: builtins.str = ...,
name: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["id", b"id", "name", b"name"]) -> None: ...
global___IdName = IdName
@typing.final
class UpsertUserDataRequest(google.protobuf.message.Message):
"""----------------------------------------
REQUESTS
----------------------------------------
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
DATA_FIELD_NUMBER: builtins.int
@property
def data(self) -> global___User: ...
def __init__(
self,
*,
data: global___User | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["data", b"data"]) -> None: ...
global___UpsertUserDataRequest = UpsertUserDataRequest
@typing.final
class GetUserVacanciesRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
USERID_FIELD_NUMBER: builtins.int
userID: builtins.int
"""required"""
def __init__(
self,
*,
userID: builtins.int = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["userID", b"userID"]) -> None: ...
global___GetUserVacanciesRequest = GetUserVacanciesRequest
@typing.final
class UpsertUserDataResponse(google.protobuf.message.Message):
"""----------------------------------------
RESPONSES
----------------------------------------
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
STATUS_FIELD_NUMBER: builtins.int
status: builtins.str
""""success" | "error" """
def __init__(
self,
*,
status: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ...
global___UpsertUserDataResponse = UpsertUserDataResponse
@typing.final
class GetUserVacanciesResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
STATUS_FIELD_NUMBER: builtins.int
ITEMS_FIELD_NUMBER: builtins.int
status: builtins.str
""""success" | "error" """
@property
def items(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
status: builtins.str = ...,
items: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["items", b"items", "status", b"status"]) -> None: ...
global___GetUserVacanciesResponse = GetUserVacanciesResponse

View File

@ -0,0 +1,157 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
import visionCareer_pb2 as visionCareer__pb2
GRPC_GENERATED_VERSION = '1.75.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in visionCareer_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
class VisionCareerApiServiceV1Stub(object):
"""----------------------------------------
SERVICES
----------------------------------------
Сервис API Vision Career v1
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.UpsertUserData = channel.unary_unary(
'/pbvisionCareerpub.VisionCareerApiServiceV1/UpsertUserData',
request_serializer=visionCareer__pb2.UpsertUserDataRequest.SerializeToString,
response_deserializer=visionCareer__pb2.UpsertUserDataResponse.FromString,
_registered_method=True)
self.GetUserVacancies = channel.unary_unary(
'/pbvisionCareerpub.VisionCareerApiServiceV1/GetUserVacancies',
request_serializer=visionCareer__pb2.GetUserVacanciesRequest.SerializeToString,
response_deserializer=visionCareer__pb2.GetUserVacanciesResponse.FromString,
_registered_method=True)
class VisionCareerApiServiceV1Servicer(object):
"""----------------------------------------
SERVICES
----------------------------------------
Сервис API Vision Career v1
"""
def UpsertUserData(self, request, context):
"""Отправить данные о пользователе, чтобы начать генерацию цифрового портрета
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetUserVacancies(self, request, context):
"""Получить список актуальных вакансий, для текущего пользователя
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_VisionCareerApiServiceV1Servicer_to_server(servicer, server):
rpc_method_handlers = {
'UpsertUserData': grpc.unary_unary_rpc_method_handler(
servicer.UpsertUserData,
request_deserializer=visionCareer__pb2.UpsertUserDataRequest.FromString,
response_serializer=visionCareer__pb2.UpsertUserDataResponse.SerializeToString,
),
'GetUserVacancies': grpc.unary_unary_rpc_method_handler(
servicer.GetUserVacancies,
request_deserializer=visionCareer__pb2.GetUserVacanciesRequest.FromString,
response_serializer=visionCareer__pb2.GetUserVacanciesResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'pbvisionCareerpub.VisionCareerApiServiceV1', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('pbvisionCareerpub.VisionCareerApiServiceV1', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class VisionCareerApiServiceV1(object):
"""----------------------------------------
SERVICES
----------------------------------------
Сервис API Vision Career v1
"""
@staticmethod
def UpsertUserData(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/pbvisionCareerpub.VisionCareerApiServiceV1/UpsertUserData',
visionCareer__pb2.UpsertUserDataRequest.SerializeToString,
visionCareer__pb2.UpsertUserDataResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetUserVacancies(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/pbvisionCareerpub.VisionCareerApiServiceV1/GetUserVacancies',
visionCareer__pb2.GetUserVacanciesRequest.SerializeToString,
visionCareer__pb2.GetUserVacanciesResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

98
proto/visionCareer.proto Normal file
View File

@ -0,0 +1,98 @@
syntax = "proto3";
package pbvisionCareerpub;
option go_package = "./;pbvisionCareerpub";
// ----------------------------------------
// SERVICES
// ----------------------------------------
// Сервис API Vision Career v1
service VisionCareerApiServiceV1 {
// Отправить данные о пользователе, чтобы начать генерацию цифрового портрета
rpc UpsertUserData(UpsertUserDataRequest) returns (UpsertUserDataResponse);
// Получить список актуальных вакансий, для текущего пользователя
rpc GetUserVacancies(GetUserVacanciesRequest) returns (GetUserVacanciesResponse);
}
// ----------------------------------------
// USER
// ----------------------------------------
message User {
int64 id = 1; // required
string targetRole = 2;
string resumePath = 3;
string workExperience = 4;
string workFormat = 5;
string salaryRange = 6;
}
// ----------------------------------------
// PAGINATION
// ----------------------------------------
message Pagination {
int32 pageSize = 1;
int32 page = 2;
}
message PaginationMeta {
int32 pageSize = 1;
int32 page = 2;
int32 totalPages = 3;
}
// ----------------------------------------
// COMMON
// ----------------------------------------
message FilterValue {
string from = 1;
string to = 2;
string equal = 3;
}
message Sort {
string field = 1;
string direction = 2; // "ASC" or "DESC"
}
message FieldValue {
string field = 1;
string value = 2;
}
message IdName {
string id = 1;
string name = 2;
}
// ----------------------------------------
// REQUESTS
// ----------------------------------------
message UpsertUserDataRequest {
User data = 1;
}
message GetUserVacanciesRequest {
int64 userID = 1; // required
}
// ----------------------------------------
// RESPONSES
// ----------------------------------------
message UpsertUserDataResponse {
string status = 1; // "success" | "error"
}
message GetUserVacanciesResponse {
string status = 1; // "success" | "error"
repeated string items = 2;
}