diff --git a/app/online_skills.go b/app/online_skills.go new file mode 100644 index 00000000..0a7a22ad --- /dev/null +++ b/app/online_skills.go @@ -0,0 +1,37 @@ +package app + +import ( + "context" + + "github.com/webitel/engine/model" +) + +func (app *App) CreateOnlineSkills(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { + preset.PreSave() + + return app.Store.OnlineSkills().Create(ctx, preset) +} + +func (app *App) GetOnlineSkills(ctx context.Context, query *model.GetSkillPresetQuery) (*model.OnlineSkills, model.AppError) { + return app.Store.OnlineSkills().Get(ctx, query) +} + +func (app *App) SearchOnlineSkills(ctx context.Context, query *model.SearchOnlineSkillsQuery) ([]*model.OnlineSkills, model.AppError) { + return app.Store.OnlineSkills().Search(ctx, query) +} + +func (app *App) UpdateOnlineSkills(ctx context.Context, cmd *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { + cmd.PreSave() + + return app.Store.OnlineSkills().Update(ctx, cmd) +} + +func (app *App) PatchOnlineSkills(ctx context.Context, cmd *model.PatchOnlineSkillsCmd) (*model.OnlineSkills, model.AppError) { + cmd.PrePatch() + + return app.Store.OnlineSkills().Patch(ctx, cmd) +} + +func (app *App) DeleteOnlineSkills(ctx context.Context, cmd *model.DeleteSkillPresetCmd) model.AppError { + return app.Store.OnlineSkills().Delete(ctx, cmd) +} diff --git a/app/skill_preset_store.go b/app/skill_preset_store.go deleted file mode 100644 index b72d4bec..00000000 --- a/app/skill_preset_store.go +++ /dev/null @@ -1,37 +0,0 @@ -package app - -import ( - "context" - - "github.com/webitel/engine/model" -) - -func (app *App) CreateSkillPreset(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) { - preset.PreSave() - - return app.Store.SkillPreset().Create(ctx, preset) -} - -func (app *App) GetSkillPreset(ctx context.Context, query *model.GetSkillPresetQuery) (*model.SkillPreset, model.AppError) { - return app.Store.SkillPreset().Get(ctx, query) -} - -func (app *App) SearchSkillPreset(ctx context.Context, query *model.SearchSkillPresetQuery) ([]*model.SkillPreset, model.AppError) { - return app.Store.SkillPreset().Search(ctx, query) -} - -func (app *App) UpdateSkillPreset(ctx context.Context, cmd *model.SkillPreset) (*model.SkillPreset, model.AppError) { - cmd.PreSave() - - return app.Store.SkillPreset().Update(ctx, cmd) -} - -func (app *App) PatchSkillPreset(ctx context.Context, cmd *model.PatchSkillPresetCmd) (*model.SkillPreset, model.AppError) { - cmd.PrePatch() - - return app.Store.SkillPreset().Patch(ctx, cmd) -} - -func (app *App) DeleteSkillPreset(ctx context.Context, cmd *model.DeleteSkillPresetCmd) ([]*model.SkillPreset, model.AppError) { - return app.Store.SkillPreset().Delete(ctx, cmd) -} diff --git a/controller/skill_preset_store.go b/controller/online_skills.go similarity index 60% rename from controller/skill_preset_store.go rename to controller/online_skills.go index fe9e0021..971ccd98 100644 --- a/controller/skill_preset_store.go +++ b/controller/online_skills.go @@ -7,7 +7,7 @@ import ( "github.com/webitel/engine/pkg/wbt/auth_manager" ) -func (c *Controller) CreateSkillPreset(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) { +func (c *Controller) CreateOnlineSkills(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { return nil, err @@ -18,18 +18,16 @@ func (c *Controller) CreateSkillPreset(ctx context.Context, preset *model.SkillP return nil, c.app.MakePermissionError(session, permission, auth_manager.PERMISSION_ACCESS_CREATE) } - preset.CreatedBy = &model.Lookup{Id: int(session.UserId)} - preset.UpdatedBy = &model.Lookup{Id: int(session.UserId)} - preset.DomainID = session.Domain(0) + preset.InitializeCreateMetadata(session.Domain(0), session.UserId) if err := preset.Validate(); err != nil { return nil, err } - return c.app.CreateSkillPreset(ctx, preset) + return c.app.CreateOnlineSkills(ctx, preset) } -func (c *Controller) GetSkillPreset(ctx context.Context, query *model.GetSkillPresetQuery) (*model.SkillPreset, model.AppError) { +func (c *Controller) GetOnlineSkills(ctx context.Context, query *model.GetSkillPresetQuery) (*model.OnlineSkills, model.AppError) { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { return nil, err @@ -46,10 +44,10 @@ func (c *Controller) GetSkillPreset(ctx context.Context, query *model.GetSkillPr return nil, err } - return c.app.GetSkillPreset(ctx, query) + return c.app.GetOnlineSkills(ctx, query) } -func (c *Controller) SearchSkillPreset(ctx context.Context, query *model.SearchSkillPresetQuery) ([]*model.SkillPreset, model.AppError) { +func (c *Controller) SearchOnlineSkills(ctx context.Context, query *model.SearchOnlineSkillsQuery) ([]*model.OnlineSkills, model.AppError) { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { return nil, err @@ -62,10 +60,10 @@ func (c *Controller) SearchSkillPreset(ctx context.Context, query *model.SearchS query.DomainId = session.Domain(0) - return c.app.SearchSkillPreset(ctx, query) + return c.app.SearchOnlineSkills(ctx, query) } -func (c *Controller) UpdateSkillPreset(ctx context.Context, cmd *model.SkillPreset) (*model.SkillPreset, model.AppError) { +func (c *Controller) UpdateOnlineSkills(ctx context.Context, cmd *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { return nil, err @@ -76,17 +74,16 @@ func (c *Controller) UpdateSkillPreset(ctx context.Context, cmd *model.SkillPres return nil, c.app.MakePermissionError(session, permission, auth_manager.PERMISSION_ACCESS_UPDATE) } - cmd.UpdatedBy = &model.Lookup{Id: int(session.UserId)} - cmd.DomainID = session.Domain(0) + cmd.ActualizeUpdatorInfo(session.Domain(0), session.UserId) if err := cmd.Validate(); err != nil { return nil, err } - return c.app.Store.SkillPreset().Update(ctx, cmd) + return c.app.UpdateOnlineSkills(ctx, cmd) } -func (c *Controller) PatchSkillPreset(ctx context.Context, cmd *model.PatchSkillPresetCmd) (*model.SkillPreset, model.AppError) { +func (c *Controller) PatchOnlineSkills(ctx context.Context, cmd *model.PatchOnlineSkillsCmd) (*model.OnlineSkills, model.AppError) { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { return nil, err @@ -104,21 +101,21 @@ func (c *Controller) PatchSkillPreset(ctx context.Context, cmd *model.PatchSkill return nil, err } - return c.app.Store.SkillPreset().Patch(ctx, cmd) + return c.app.PatchOnlineSkills(ctx, cmd) } -func (c *Controller) DeleteSkillPreset(ctx context.Context, cmd *model.DeleteSkillPresetCmd) ([]*model.SkillPreset, model.AppError) { +func (c *Controller) DeleteOnlineSkills(ctx context.Context, cmd *model.DeleteSkillPresetCmd) model.AppError { session, err := c.app.GetSessionFromCtx(ctx) if err != nil { - return nil, err + return err } permission := session.GetPermission(model.PermissionSkill) if !permission.CanDelete() { - return nil, c.app.MakePermissionError(session, permission, auth_manager.PERMISSION_ACCESS_DELETE) + return c.app.MakePermissionError(session, permission, auth_manager.PERMISSION_ACCESS_DELETE) } cmd.DomainID = session.Domain(0) - return c.app.DeleteSkillPreset(ctx, cmd) + return c.app.DeleteOnlineSkills(ctx, cmd) } diff --git a/gen/engine/online_skills.pb.go b/gen/engine/online_skills.pb.go new file mode 100644 index 00000000..1e4b257e --- /dev/null +++ b/gen/engine/online_skills.pb.go @@ -0,0 +1,1268 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: online_skills.proto + +package engine + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +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) +) + +// OnlineSkills represents a reusable collection +// of skills that can be assigned within the Call Center. +type OnlineSkills struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier. + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // User who created the entry. + CreatedBy *Lookup `protobuf:"bytes,2,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + // Creation timestamp (Unix time, milliseconds). + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // User who last updated the entry. + UpdatedBy *Lookup `protobuf:"bytes,4,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"` + // Last update timestamp (Unix time, milliseconds). + UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // Display name. + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // Optional description. + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + // Skills included in the entry. + Skills []*Lookup `protobuf:"bytes,8,rep,name=skills,proto3" json:"skills,omitempty"` +} + +func (x *OnlineSkills) Reset() { + *x = OnlineSkills{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnlineSkills) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnlineSkills) ProtoMessage() {} + +func (x *OnlineSkills) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnlineSkills.ProtoReflect.Descriptor instead. +func (*OnlineSkills) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{0} +} + +func (x *OnlineSkills) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *OnlineSkills) GetCreatedBy() *Lookup { + if x != nil { + return x.CreatedBy + } + return nil +} + +func (x *OnlineSkills) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *OnlineSkills) GetUpdatedBy() *Lookup { + if x != nil { + return x.UpdatedBy + } + return nil +} + +func (x *OnlineSkills) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +func (x *OnlineSkills) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OnlineSkills) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *OnlineSkills) GetSkills() []*Lookup { + if x != nil { + return x.Skills + } + return nil +} + +// Request for creating online skills. +type CreateOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Display name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional description. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Skills included in the entry. + Skills []*Lookup `protobuf:"bytes,3,rep,name=skills,proto3" json:"skills,omitempty"` +} + +func (x *CreateOnlineSkillsRequest) Reset() { + *x = CreateOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOnlineSkillsRequest) ProtoMessage() {} + +func (x *CreateOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*CreateOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateOnlineSkillsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateOnlineSkillsRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateOnlineSkillsRequest) GetSkills() []*Lookup { + if x != nil { + return x.Skills + } + return nil +} + +// Response containing the created online skills. +type CreateOnlineSkillsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Created online skills item. + Item *OnlineSkills `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateOnlineSkillsResponse) Reset() { + *x = CreateOnlineSkillsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOnlineSkillsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOnlineSkillsResponse) ProtoMessage() {} + +func (x *CreateOnlineSkillsResponse) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOnlineSkillsResponse.ProtoReflect.Descriptor instead. +func (*CreateOnlineSkillsResponse) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateOnlineSkillsResponse) GetItem() *OnlineSkills { + if x != nil { + return x.Item + } + return nil +} + +// Request for deleting one or more online skills entries. +type DeleteOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifiers of online skills to delete. + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteOnlineSkillsRequest) Reset() { + *x = DeleteOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOnlineSkillsRequest) ProtoMessage() {} + +func (x *DeleteOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*DeleteOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteOnlineSkillsRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// Request for replacing online skills. +type UpdateOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Online skills identifier. + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Display name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Optional description. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Skills assigned. + Skills []*Lookup `protobuf:"bytes,4,rep,name=skills,proto3" json:"skills,omitempty"` +} + +func (x *UpdateOnlineSkillsRequest) Reset() { + *x = UpdateOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOnlineSkillsRequest) ProtoMessage() {} + +func (x *UpdateOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*UpdateOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateOnlineSkillsRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *UpdateOnlineSkillsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateOnlineSkillsRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateOnlineSkillsRequest) GetSkills() []*Lookup { + if x != nil { + return x.Skills + } + return nil +} + +// Response containing updated online skills. +type UpdateOnlineSkillsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Updated online skills item. + Item *OnlineSkills `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *UpdateOnlineSkillsResponse) Reset() { + *x = UpdateOnlineSkillsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOnlineSkillsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOnlineSkillsResponse) ProtoMessage() {} + +func (x *UpdateOnlineSkillsResponse) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOnlineSkillsResponse.ProtoReflect.Descriptor instead. +func (*UpdateOnlineSkillsResponse) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateOnlineSkillsResponse) GetItem() *OnlineSkills { + if x != nil { + return x.Item + } + return nil +} + +// Request for partially updating online skills. +type PatchOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of fields to update. + Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + // Online skills identifier. + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Updated name. + Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Updated description. + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Updated list of skills. + Skills []*Lookup `protobuf:"bytes,5,rep,name=skills,proto3" json:"skills,omitempty"` +} + +func (x *PatchOnlineSkillsRequest) Reset() { + *x = PatchOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchOnlineSkillsRequest) ProtoMessage() {} + +func (x *PatchOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*PatchOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{6} +} + +func (x *PatchOnlineSkillsRequest) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *PatchOnlineSkillsRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PatchOnlineSkillsRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatchOnlineSkillsRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *PatchOnlineSkillsRequest) GetSkills() []*Lookup { + if x != nil { + return x.Skills + } + return nil +} + +// Response containing patched online skills. +type PatchOnlineSkillsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Patched online skills item. + Item *OnlineSkills `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *PatchOnlineSkillsResponse) Reset() { + *x = PatchOnlineSkillsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchOnlineSkillsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchOnlineSkillsResponse) ProtoMessage() {} + +func (x *PatchOnlineSkillsResponse) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchOnlineSkillsResponse.ProtoReflect.Descriptor instead. +func (*PatchOnlineSkillsResponse) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{7} +} + +func (x *PatchOnlineSkillsResponse) GetItem() *OnlineSkills { + if x != nil { + return x.Item + } + return nil +} + +// Search criteria for online skills. +type SearchOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page number (1-based). + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + // Maximum number of items per page. + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + // Search pattern applied to names. + Q string `protobuf:"bytes,3,opt,name=q,proto3" json:"q,omitempty"` + // Sort expression. + // Example: "-name", "+created_at". + Sort string `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"` + // List of fields to include in the response. + Fields []string `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` + // Filter by online skills identifiers. + Ids []int64 `protobuf:"varint,6,rep,packed,name=ids,proto3" json:"ids,omitempty"` + // Filter by associated skill identifiers. + SkillIds []int64 `protobuf:"varint,7,rep,packed,name=skill_ids,json=skillIds,proto3" json:"skill_ids,omitempty"` + // Skip the default entry in the search results. + SkipDefault bool `protobuf:"varint,8,opt,name=skip_default,json=skipDefault,proto3" json:"skip_default,omitempty"` +} + +func (x *SearchOnlineSkillsRequest) Reset() { + *x = SearchOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchOnlineSkillsRequest) ProtoMessage() {} + +func (x *SearchOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*SearchOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{8} +} + +func (x *SearchOnlineSkillsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *SearchOnlineSkillsRequest) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *SearchOnlineSkillsRequest) GetQ() string { + if x != nil { + return x.Q + } + return "" +} + +func (x *SearchOnlineSkillsRequest) GetSort() string { + if x != nil { + return x.Sort + } + return "" +} + +func (x *SearchOnlineSkillsRequest) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *SearchOnlineSkillsRequest) GetIds() []int64 { + if x != nil { + return x.Ids + } + return nil +} + +func (x *SearchOnlineSkillsRequest) GetSkillIds() []int64 { + if x != nil { + return x.SkillIds + } + return nil +} + +func (x *SearchOnlineSkillsRequest) GetSkipDefault() bool { + if x != nil { + return x.SkipDefault + } + return false +} + +// Search results for online skills. +type SearchOnlineSkillsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Matching online skills items. + Items []*OnlineSkills `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Indicates whether another page of results exists. + Next bool `protobuf:"varint,2,opt,name=next,proto3" json:"next,omitempty"` +} + +func (x *SearchOnlineSkillsResponse) Reset() { + *x = SearchOnlineSkillsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchOnlineSkillsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchOnlineSkillsResponse) ProtoMessage() {} + +func (x *SearchOnlineSkillsResponse) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchOnlineSkillsResponse.ProtoReflect.Descriptor instead. +func (*SearchOnlineSkillsResponse) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{9} +} + +func (x *SearchOnlineSkillsResponse) GetItems() []*OnlineSkills { + if x != nil { + return x.Items + } + return nil +} + +func (x *SearchOnlineSkillsResponse) GetNext() bool { + if x != nil { + return x.Next + } + return false +} + +// Request for retrieving online skills. +type GetOnlineSkillsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Online skills identifier. + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetOnlineSkillsRequest) Reset() { + *x = GetOnlineSkillsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOnlineSkillsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOnlineSkillsRequest) ProtoMessage() {} + +func (x *GetOnlineSkillsRequest) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOnlineSkillsRequest.ProtoReflect.Descriptor instead. +func (*GetOnlineSkillsRequest) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{10} +} + +func (x *GetOnlineSkillsRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// Response containing the requested online skills. +type GetOnlineSkillsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Requested online skills item. + Item *OnlineSkills `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *GetOnlineSkillsResponse) Reset() { + *x = GetOnlineSkillsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_online_skills_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOnlineSkillsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOnlineSkillsResponse) ProtoMessage() {} + +func (x *GetOnlineSkillsResponse) ProtoReflect() protoreflect.Message { + mi := &file_online_skills_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOnlineSkillsResponse.ProtoReflect.Descriptor instead. +func (*GetOnlineSkillsResponse) Descriptor() ([]byte, []int) { + return file_online_skills_proto_rawDescGZIP(), []int{11} +} + +func (x *GetOnlineSkillsResponse) GetItem() *OnlineSkills { + if x != nil { + return x.Item + } + return nil +} + +var File_online_skills_proto protoreflect.FileDescriptor + +var file_online_skills_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x1a, 0x0b, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x02, 0x0a, 0x0c, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, + 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, + 0x22, 0x79, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x1a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x74, 0x65, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x22, 0x2b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x89, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x1a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x22, 0xc3, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, + 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x19, 0x50, 0x61, + 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x04, 0x69, 0x74, 0x65, + 0x6d, 0x22, 0xcf, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, + 0x69, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x22, 0x5c, 0x0a, 0x1a, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6e, 0x65, 0x78, + 0x74, 0x22, 0x28, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x32, 0xab, 0x0b, 0x0a, 0x13, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, 0x02, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, + 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x01, 0x92, 0x41, 0x85, 0x01, 0x0a, 0x0d, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, + 0x6c, 0x73, 0x1a, 0x5e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, + 0x77, 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x63, 0x61, + 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0xe1, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x92, + 0x41, 0x62, 0x0a, 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x1a, 0x3e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, + 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x61, 0x6c, + 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xe7, 0x01, 0x0a, 0x12, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x01, 0x92, 0x41, 0x64, 0x0a, + 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x14, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x1a, 0x3d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x6f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x63, 0x61, 0x6c, 0x6c, + 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, + 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0xf6, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x2e, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x98, 0x01, 0x92, 0x41, 0x6b, 0x0a, 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x1a, 0x44, + 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x65, 0x64, 0x69, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x1a, 0x1f, 0x2f, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xec, + 0x01, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x61, + 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x92, 0x41, 0x64, 0x0a, + 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x13, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, + 0x6c, 0x6c, 0x73, 0x1a, 0x3e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x65, + 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x32, 0x1f, 0x2f, 0x63, + 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xce, 0x01, + 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x7d, 0x92, 0x41, 0x53, 0x0a, 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x6b, 0x69, + 0x6c, 0x6c, 0x73, 0x12, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x1a, 0x2c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x20, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x2a, 0x1f, 0x2f, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x9a, + 0x01, 0x92, 0x41, 0x75, 0x12, 0x4b, 0x0a, 0x15, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x53, + 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x41, + 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x20, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x69, 0x6e, + 0x20, 0x43, 0x61, 0x6c, 0x6c, 0x20, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x32, 0x03, 0x31, 0x2e, + 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x65, 0x62, 0x69, 0x74, 0x65, 0x6c, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_online_skills_proto_rawDescOnce sync.Once + file_online_skills_proto_rawDescData = file_online_skills_proto_rawDesc +) + +func file_online_skills_proto_rawDescGZIP() []byte { + file_online_skills_proto_rawDescOnce.Do(func() { + file_online_skills_proto_rawDescData = protoimpl.X.CompressGZIP(file_online_skills_proto_rawDescData) + }) + return file_online_skills_proto_rawDescData +} + +var file_online_skills_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_online_skills_proto_goTypes = []interface{}{ + (*OnlineSkills)(nil), // 0: engine.OnlineSkills + (*CreateOnlineSkillsRequest)(nil), // 1: engine.CreateOnlineSkillsRequest + (*CreateOnlineSkillsResponse)(nil), // 2: engine.CreateOnlineSkillsResponse + (*DeleteOnlineSkillsRequest)(nil), // 3: engine.DeleteOnlineSkillsRequest + (*UpdateOnlineSkillsRequest)(nil), // 4: engine.UpdateOnlineSkillsRequest + (*UpdateOnlineSkillsResponse)(nil), // 5: engine.UpdateOnlineSkillsResponse + (*PatchOnlineSkillsRequest)(nil), // 6: engine.PatchOnlineSkillsRequest + (*PatchOnlineSkillsResponse)(nil), // 7: engine.PatchOnlineSkillsResponse + (*SearchOnlineSkillsRequest)(nil), // 8: engine.SearchOnlineSkillsRequest + (*SearchOnlineSkillsResponse)(nil), // 9: engine.SearchOnlineSkillsResponse + (*GetOnlineSkillsRequest)(nil), // 10: engine.GetOnlineSkillsRequest + (*GetOnlineSkillsResponse)(nil), // 11: engine.GetOnlineSkillsResponse + (*Lookup)(nil), // 12: engine.Lookup + (*emptypb.Empty)(nil), // 13: google.protobuf.Empty +} +var file_online_skills_proto_depIdxs = []int32{ + 12, // 0: engine.OnlineSkills.created_by:type_name -> engine.Lookup + 12, // 1: engine.OnlineSkills.updated_by:type_name -> engine.Lookup + 12, // 2: engine.OnlineSkills.skills:type_name -> engine.Lookup + 12, // 3: engine.CreateOnlineSkillsRequest.skills:type_name -> engine.Lookup + 0, // 4: engine.CreateOnlineSkillsResponse.item:type_name -> engine.OnlineSkills + 12, // 5: engine.UpdateOnlineSkillsRequest.skills:type_name -> engine.Lookup + 0, // 6: engine.UpdateOnlineSkillsResponse.item:type_name -> engine.OnlineSkills + 12, // 7: engine.PatchOnlineSkillsRequest.skills:type_name -> engine.Lookup + 0, // 8: engine.PatchOnlineSkillsResponse.item:type_name -> engine.OnlineSkills + 0, // 9: engine.SearchOnlineSkillsResponse.items:type_name -> engine.OnlineSkills + 0, // 10: engine.GetOnlineSkillsResponse.item:type_name -> engine.OnlineSkills + 1, // 11: engine.OnlineSkillsService.CreateOnlineSkills:input_type -> engine.CreateOnlineSkillsRequest + 10, // 12: engine.OnlineSkillsService.GetOnlineSkills:input_type -> engine.GetOnlineSkillsRequest + 8, // 13: engine.OnlineSkillsService.SearchOnlineSkills:input_type -> engine.SearchOnlineSkillsRequest + 4, // 14: engine.OnlineSkillsService.UpdateOnlineSkills:input_type -> engine.UpdateOnlineSkillsRequest + 6, // 15: engine.OnlineSkillsService.PatchOnlineSkills:input_type -> engine.PatchOnlineSkillsRequest + 3, // 16: engine.OnlineSkillsService.DeleteOnlineSkills:input_type -> engine.DeleteOnlineSkillsRequest + 2, // 17: engine.OnlineSkillsService.CreateOnlineSkills:output_type -> engine.CreateOnlineSkillsResponse + 11, // 18: engine.OnlineSkillsService.GetOnlineSkills:output_type -> engine.GetOnlineSkillsResponse + 9, // 19: engine.OnlineSkillsService.SearchOnlineSkills:output_type -> engine.SearchOnlineSkillsResponse + 5, // 20: engine.OnlineSkillsService.UpdateOnlineSkills:output_type -> engine.UpdateOnlineSkillsResponse + 7, // 21: engine.OnlineSkillsService.PatchOnlineSkills:output_type -> engine.PatchOnlineSkillsResponse + 13, // 22: engine.OnlineSkillsService.DeleteOnlineSkills:output_type -> google.protobuf.Empty + 17, // [17:23] is the sub-list for method output_type + 11, // [11:17] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_online_skills_proto_init() } +func file_online_skills_proto_init() { + if File_online_skills_proto != nil { + return + } + file_const_proto_init() + if !protoimpl.UnsafeEnabled { + file_online_skills_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnlineSkills); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOnlineSkillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOnlineSkillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchOnlineSkillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchOnlineSkillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOnlineSkillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_online_skills_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOnlineSkillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_online_skills_proto_msgTypes[6].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_online_skills_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_online_skills_proto_goTypes, + DependencyIndexes: file_online_skills_proto_depIdxs, + MessageInfos: file_online_skills_proto_msgTypes, + }.Build() + File_online_skills_proto = out.File + file_online_skills_proto_rawDesc = nil + file_online_skills_proto_goTypes = nil + file_online_skills_proto_depIdxs = nil +} diff --git a/gen/engine/online_skills_grpc.pb.go b/gen/engine/online_skills_grpc.pb.go new file mode 100644 index 00000000..22a76331 --- /dev/null +++ b/gen/engine/online_skills_grpc.pb.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: online_skills.proto + +package engine + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// 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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OnlineSkillsService_CreateOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/CreateOnlineSkills" + OnlineSkillsService_GetOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/GetOnlineSkills" + OnlineSkillsService_SearchOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/SearchOnlineSkills" + OnlineSkillsService_UpdateOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/UpdateOnlineSkills" + OnlineSkillsService_PatchOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/PatchOnlineSkills" + OnlineSkillsService_DeleteOnlineSkills_FullMethodName = "/engine.OnlineSkillsService/DeleteOnlineSkills" +) + +// OnlineSkillsServiceClient is the client API for OnlineSkillsService 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 OnlineSkillsServiceClient interface { + // Creates a new online skills entry. + CreateOnlineSkills(ctx context.Context, in *CreateOnlineSkillsRequest, opts ...grpc.CallOption) (*CreateOnlineSkillsResponse, error) + // Retrieves an online skills entry by its identifier. + GetOnlineSkills(ctx context.Context, in *GetOnlineSkillsRequest, opts ...grpc.CallOption) (*GetOnlineSkillsResponse, error) + // Searches online skills using filtering, + // sorting and pagination options. + SearchOnlineSkills(ctx context.Context, in *SearchOnlineSkillsRequest, opts ...grpc.CallOption) (*SearchOnlineSkillsResponse, error) + // Replaces an existing online skills entry. + UpdateOnlineSkills(ctx context.Context, in *UpdateOnlineSkillsRequest, opts ...grpc.CallOption) (*UpdateOnlineSkillsResponse, error) + // Updates selected fields of an online skills entry. + PatchOnlineSkills(ctx context.Context, in *PatchOnlineSkillsRequest, opts ...grpc.CallOption) (*PatchOnlineSkillsResponse, error) + // Deletes one or more online skills entries. + DeleteOnlineSkills(ctx context.Context, in *DeleteOnlineSkillsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type onlineSkillsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOnlineSkillsServiceClient(cc grpc.ClientConnInterface) OnlineSkillsServiceClient { + return &onlineSkillsServiceClient{cc} +} + +func (c *onlineSkillsServiceClient) CreateOnlineSkills(ctx context.Context, in *CreateOnlineSkillsRequest, opts ...grpc.CallOption) (*CreateOnlineSkillsResponse, error) { + out := new(CreateOnlineSkillsResponse) + err := c.cc.Invoke(ctx, OnlineSkillsService_CreateOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *onlineSkillsServiceClient) GetOnlineSkills(ctx context.Context, in *GetOnlineSkillsRequest, opts ...grpc.CallOption) (*GetOnlineSkillsResponse, error) { + out := new(GetOnlineSkillsResponse) + err := c.cc.Invoke(ctx, OnlineSkillsService_GetOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *onlineSkillsServiceClient) SearchOnlineSkills(ctx context.Context, in *SearchOnlineSkillsRequest, opts ...grpc.CallOption) (*SearchOnlineSkillsResponse, error) { + out := new(SearchOnlineSkillsResponse) + err := c.cc.Invoke(ctx, OnlineSkillsService_SearchOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *onlineSkillsServiceClient) UpdateOnlineSkills(ctx context.Context, in *UpdateOnlineSkillsRequest, opts ...grpc.CallOption) (*UpdateOnlineSkillsResponse, error) { + out := new(UpdateOnlineSkillsResponse) + err := c.cc.Invoke(ctx, OnlineSkillsService_UpdateOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *onlineSkillsServiceClient) PatchOnlineSkills(ctx context.Context, in *PatchOnlineSkillsRequest, opts ...grpc.CallOption) (*PatchOnlineSkillsResponse, error) { + out := new(PatchOnlineSkillsResponse) + err := c.cc.Invoke(ctx, OnlineSkillsService_PatchOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *onlineSkillsServiceClient) DeleteOnlineSkills(ctx context.Context, in *DeleteOnlineSkillsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, OnlineSkillsService_DeleteOnlineSkills_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OnlineSkillsServiceServer is the server API for OnlineSkillsService service. +// All implementations must embed UnimplementedOnlineSkillsServiceServer +// for forward compatibility +type OnlineSkillsServiceServer interface { + // Creates a new online skills entry. + CreateOnlineSkills(context.Context, *CreateOnlineSkillsRequest) (*CreateOnlineSkillsResponse, error) + // Retrieves an online skills entry by its identifier. + GetOnlineSkills(context.Context, *GetOnlineSkillsRequest) (*GetOnlineSkillsResponse, error) + // Searches online skills using filtering, + // sorting and pagination options. + SearchOnlineSkills(context.Context, *SearchOnlineSkillsRequest) (*SearchOnlineSkillsResponse, error) + // Replaces an existing online skills entry. + UpdateOnlineSkills(context.Context, *UpdateOnlineSkillsRequest) (*UpdateOnlineSkillsResponse, error) + // Updates selected fields of an online skills entry. + PatchOnlineSkills(context.Context, *PatchOnlineSkillsRequest) (*PatchOnlineSkillsResponse, error) + // Deletes one or more online skills entries. + DeleteOnlineSkills(context.Context, *DeleteOnlineSkillsRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedOnlineSkillsServiceServer() +} + +// UnimplementedOnlineSkillsServiceServer must be embedded to have forward compatible implementations. +type UnimplementedOnlineSkillsServiceServer struct { +} + +func (UnimplementedOnlineSkillsServiceServer) CreateOnlineSkills(context.Context, *CreateOnlineSkillsRequest) (*CreateOnlineSkillsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) GetOnlineSkills(context.Context, *GetOnlineSkillsRequest) (*GetOnlineSkillsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) SearchOnlineSkills(context.Context, *SearchOnlineSkillsRequest) (*SearchOnlineSkillsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) UpdateOnlineSkills(context.Context, *UpdateOnlineSkillsRequest) (*UpdateOnlineSkillsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) PatchOnlineSkills(context.Context, *PatchOnlineSkillsRequest) (*PatchOnlineSkillsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PatchOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) DeleteOnlineSkills(context.Context, *DeleteOnlineSkillsRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOnlineSkills not implemented") +} +func (UnimplementedOnlineSkillsServiceServer) mustEmbedUnimplementedOnlineSkillsServiceServer() {} + +// UnsafeOnlineSkillsServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OnlineSkillsServiceServer will +// result in compilation errors. +type UnsafeOnlineSkillsServiceServer interface { + mustEmbedUnimplementedOnlineSkillsServiceServer() +} + +func RegisterOnlineSkillsServiceServer(s grpc.ServiceRegistrar, srv OnlineSkillsServiceServer) { + s.RegisterService(&OnlineSkillsService_ServiceDesc, srv) +} + +func _OnlineSkillsService_CreateOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).CreateOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_CreateOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).CreateOnlineSkills(ctx, req.(*CreateOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OnlineSkillsService_GetOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).GetOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_GetOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).GetOnlineSkills(ctx, req.(*GetOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OnlineSkillsService_SearchOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).SearchOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_SearchOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).SearchOnlineSkills(ctx, req.(*SearchOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OnlineSkillsService_UpdateOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).UpdateOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_UpdateOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).UpdateOnlineSkills(ctx, req.(*UpdateOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OnlineSkillsService_PatchOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PatchOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).PatchOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_PatchOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).PatchOnlineSkills(ctx, req.(*PatchOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OnlineSkillsService_DeleteOnlineSkills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteOnlineSkillsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineSkillsServiceServer).DeleteOnlineSkills(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OnlineSkillsService_DeleteOnlineSkills_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineSkillsServiceServer).DeleteOnlineSkills(ctx, req.(*DeleteOnlineSkillsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OnlineSkillsService_ServiceDesc is the grpc.ServiceDesc for OnlineSkillsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OnlineSkillsService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "engine.OnlineSkillsService", + HandlerType: (*OnlineSkillsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateOnlineSkills", + Handler: _OnlineSkillsService_CreateOnlineSkills_Handler, + }, + { + MethodName: "GetOnlineSkills", + Handler: _OnlineSkillsService_GetOnlineSkills_Handler, + }, + { + MethodName: "SearchOnlineSkills", + Handler: _OnlineSkillsService_SearchOnlineSkills_Handler, + }, + { + MethodName: "UpdateOnlineSkills", + Handler: _OnlineSkillsService_UpdateOnlineSkills_Handler, + }, + { + MethodName: "PatchOnlineSkills", + Handler: _OnlineSkillsService_PatchOnlineSkills_Handler, + }, + { + MethodName: "DeleteOnlineSkills", + Handler: _OnlineSkillsService_DeleteOnlineSkills_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "online_skills.proto", +} diff --git a/gen/engine/skill_preset.pb.go b/gen/engine/skill_preset.pb.go deleted file mode 100644 index d4d8d56b..00000000 --- a/gen/engine/skill_preset.pb.go +++ /dev/null @@ -1,1327 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: skill_preset.proto - -package engine - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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) -) - -// SkillPreset represents a reusable collection -// of skills that can be assigned within the Call Center. -type SkillPreset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Unique preset identifier. - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // User who created the preset. - CreatedBy *Lookup `protobuf:"bytes,2,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` - // Creation timestamp (Unix time, milliseconds). - CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - // User who last updated the preset. - UpdatedBy *Lookup `protobuf:"bytes,4,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"` - // Last update timestamp (Unix time, milliseconds). - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - // Display name of the preset. - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - // Optional preset description. - Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - // Skills included in the preset. - Skills []*Lookup `protobuf:"bytes,8,rep,name=skills,proto3" json:"skills,omitempty"` -} - -func (x *SkillPreset) Reset() { - *x = SkillPreset{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SkillPreset) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SkillPreset) ProtoMessage() {} - -func (x *SkillPreset) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SkillPreset.ProtoReflect.Descriptor instead. -func (*SkillPreset) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{0} -} - -func (x *SkillPreset) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *SkillPreset) GetCreatedBy() *Lookup { - if x != nil { - return x.CreatedBy - } - return nil -} - -func (x *SkillPreset) GetCreatedAt() int64 { - if x != nil { - return x.CreatedAt - } - return 0 -} - -func (x *SkillPreset) GetUpdatedBy() *Lookup { - if x != nil { - return x.UpdatedBy - } - return nil -} - -func (x *SkillPreset) GetUpdatedAt() int64 { - if x != nil { - return x.UpdatedAt - } - return 0 -} - -func (x *SkillPreset) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SkillPreset) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SkillPreset) GetSkills() []*Lookup { - if x != nil { - return x.Skills - } - return nil -} - -// Request for creating a skill preset. -type CreateSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Display name of the preset. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional description. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Skills included in the preset. - Skills []*Lookup `protobuf:"bytes,3,rep,name=skills,proto3" json:"skills,omitempty"` -} - -func (x *CreateSkillPresetRequest) Reset() { - *x = CreateSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSkillPresetRequest) ProtoMessage() {} - -func (x *CreateSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*CreateSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateSkillPresetRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateSkillPresetRequest) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CreateSkillPresetRequest) GetSkills() []*Lookup { - if x != nil { - return x.Skills - } - return nil -} - -// Response containing the created skill preset. -type CreateSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Created skill preset. - Item *SkillPreset `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` -} - -func (x *CreateSkillPresetResponse) Reset() { - *x = CreateSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSkillPresetResponse) ProtoMessage() {} - -func (x *CreateSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*CreateSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateSkillPresetResponse) GetItem() *SkillPreset { - if x != nil { - return x.Item - } - return nil -} - -// Request for deleting one or more skill presets. -type DeleteSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifiers of skill presets to delete. - Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` -} - -func (x *DeleteSkillPresetRequest) Reset() { - *x = DeleteSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSkillPresetRequest) ProtoMessage() {} - -func (x *DeleteSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*DeleteSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{3} -} - -func (x *DeleteSkillPresetRequest) GetIds() []int64 { - if x != nil { - return x.Ids - } - return nil -} - -// Response containing deleted skill presets. -type DeleteSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deleted skill presets. - Items []*SkillPreset `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` -} - -func (x *DeleteSkillPresetResponse) Reset() { - *x = DeleteSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSkillPresetResponse) ProtoMessage() {} - -func (x *DeleteSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*DeleteSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteSkillPresetResponse) GetItems() []*SkillPreset { - if x != nil { - return x.Items - } - return nil -} - -// Request for replacing a skill preset. -type UpdateSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Skill preset identifier. - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // Display name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Optional description. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // Skills assigned to the preset. - Skills []*Lookup `protobuf:"bytes,4,rep,name=skills,proto3" json:"skills,omitempty"` -} - -func (x *UpdateSkillPresetRequest) Reset() { - *x = UpdateSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSkillPresetRequest) ProtoMessage() {} - -func (x *UpdateSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*UpdateSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateSkillPresetRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateSkillPresetRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UpdateSkillPresetRequest) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *UpdateSkillPresetRequest) GetSkills() []*Lookup { - if x != nil { - return x.Skills - } - return nil -} - -// Response containing updated skill preset. -type UpdateSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Updated skill preset. - Item *SkillPreset `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` -} - -func (x *UpdateSkillPresetResponse) Reset() { - *x = UpdateSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSkillPresetResponse) ProtoMessage() {} - -func (x *UpdateSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*UpdateSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateSkillPresetResponse) GetItem() *SkillPreset { - if x != nil { - return x.Item - } - return nil -} - -// Request for partially updating a skill preset. -type PatchSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of fields to update. - Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` - // Skill preset identifier. - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - // Updated preset name. - Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Updated preset description. - Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` - // Updated list of skills. - Skills []*Lookup `protobuf:"bytes,5,rep,name=skills,proto3" json:"skills,omitempty"` -} - -func (x *PatchSkillPresetRequest) Reset() { - *x = PatchSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatchSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatchSkillPresetRequest) ProtoMessage() {} - -func (x *PatchSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatchSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*PatchSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{7} -} - -func (x *PatchSkillPresetRequest) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *PatchSkillPresetRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *PatchSkillPresetRequest) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatchSkillPresetRequest) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description - } - return "" -} - -func (x *PatchSkillPresetRequest) GetSkills() []*Lookup { - if x != nil { - return x.Skills - } - return nil -} - -// Response containing patched skill preset. -type PatchSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Patched skill preset item. - Item *SkillPreset `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` -} - -func (x *PatchSkillPresetResponse) Reset() { - *x = PatchSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatchSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatchSkillPresetResponse) ProtoMessage() {} - -func (x *PatchSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatchSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*PatchSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{8} -} - -func (x *PatchSkillPresetResponse) GetItem() *SkillPreset { - if x != nil { - return x.Item - } - return nil -} - -// Search criteria for skill presets. -type SearchSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Page number (1-based). - Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` - // Maximum number of items per page. - Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` - // Search pattern applied to preset names. - Q string `protobuf:"bytes,3,opt,name=q,proto3" json:"q,omitempty"` - // Sort expression. - // Example: "-name", "+created_at". - Sort string `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"` - // List of fields to include in the response. - Fields []string `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` - // Filter by preset identifiers. - Ids []int64 `protobuf:"varint,6,rep,packed,name=ids,proto3" json:"ids,omitempty"` - // Filter by associated skill identifiers. - SkillIds []int64 `protobuf:"varint,7,rep,packed,name=skill_ids,json=skillIds,proto3" json:"skill_ids,omitempty"` - // Skip the default preset in the search results. - SkipDefault bool `protobuf:"varint,8,opt,name=skip_default,json=skipDefault,proto3" json:"skip_default,omitempty"` -} - -func (x *SearchSkillPresetRequest) Reset() { - *x = SearchSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchSkillPresetRequest) ProtoMessage() {} - -func (x *SearchSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*SearchSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{9} -} - -func (x *SearchSkillPresetRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *SearchSkillPresetRequest) GetSize() int32 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *SearchSkillPresetRequest) GetQ() string { - if x != nil { - return x.Q - } - return "" -} - -func (x *SearchSkillPresetRequest) GetSort() string { - if x != nil { - return x.Sort - } - return "" -} - -func (x *SearchSkillPresetRequest) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *SearchSkillPresetRequest) GetIds() []int64 { - if x != nil { - return x.Ids - } - return nil -} - -func (x *SearchSkillPresetRequest) GetSkillIds() []int64 { - if x != nil { - return x.SkillIds - } - return nil -} - -func (x *SearchSkillPresetRequest) GetSkipDefault() bool { - if x != nil { - return x.SkipDefault - } - return false -} - -// Search results for skill presets. -type SearchSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Matching skill presets. - Items []*SkillPreset `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` - // Indicates whether another page of results exists. - Next bool `protobuf:"varint,2,opt,name=next,proto3" json:"next,omitempty"` -} - -func (x *SearchSkillPresetResponse) Reset() { - *x = SearchSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchSkillPresetResponse) ProtoMessage() {} - -func (x *SearchSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*SearchSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{10} -} - -func (x *SearchSkillPresetResponse) GetItems() []*SkillPreset { - if x != nil { - return x.Items - } - return nil -} - -func (x *SearchSkillPresetResponse) GetNext() bool { - if x != nil { - return x.Next - } - return false -} - -// Request for retrieving a skill preset. -type GetSkillPresetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Skill preset identifier. - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetSkillPresetRequest) Reset() { - *x = GetSkillPresetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSkillPresetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSkillPresetRequest) ProtoMessage() {} - -func (x *GetSkillPresetRequest) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSkillPresetRequest.ProtoReflect.Descriptor instead. -func (*GetSkillPresetRequest) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{11} -} - -func (x *GetSkillPresetRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -// Response containing the requested skill preset. -type GetSkillPresetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested skill preset. - Item *SkillPreset `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` -} - -func (x *GetSkillPresetResponse) Reset() { - *x = GetSkillPresetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_skill_preset_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSkillPresetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSkillPresetResponse) ProtoMessage() {} - -func (x *GetSkillPresetResponse) ProtoReflect() protoreflect.Message { - mi := &file_skill_preset_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSkillPresetResponse.ProtoReflect.Descriptor instead. -func (*GetSkillPresetResponse) Descriptor() ([]byte, []int) { - return file_skill_preset_proto_rawDescGZIP(), []int{12} -} - -func (x *GetSkillPresetResponse) GetItem() *SkillPreset { - if x != nil { - return x.Item - } - return nil -} - -var File_skill_preset_proto protoreflect.FileDescriptor - -var file_skill_preset_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x1a, 0x0b, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x02, 0x0a, 0x0b, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, - 0x6c, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, - 0x73, 0x22, 0x78, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, - 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x22, 0x44, 0x0a, 0x19, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, - 0x6d, 0x22, 0x2c, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, - 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, - 0x46, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, - 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x73, 0x22, 0x44, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x27, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xc2, 0x01, 0x0a, 0x17, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x06, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, - 0x18, 0x50, 0x61, 0x74, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x74, 0x65, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, - 0x65, 0x6d, 0x22, 0xce, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x01, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, - 0x69, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x22, 0x5a, 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x22, - 0x27, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x41, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, - 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x32, 0xfd, 0x0a, 0x0a, 0x12, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x82, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa7, 0x01, - 0x92, 0x41, 0x7f, 0x0a, 0x0d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x6b, 0x69, - 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x1a, 0x57, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, - 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x63, 0x61, - 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0xd7, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, - 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x92, 0x41, 0x5b, 0x0a, - 0x0d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x12, - 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x1a, 0x36, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, - 0x12, 0x1f, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, - 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0xe4, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x01, 0x92, - 0x41, 0x64, 0x0a, 0x0d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x3d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, - 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x20, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x63, 0x72, 0x69, - 0x74, 0x65, 0x72, 0x69, 0x61, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x63, - 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, - 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0xed, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x20, - 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x92, 0x01, 0x92, 0x41, 0x65, 0x0a, 0x0d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, - 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x20, 0x61, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x1a, - 0x3d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x65, 0x64, - 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x1a, 0x1f, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, - 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xe3, 0x01, 0x0a, 0x10, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x2e, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x8b, 0x01, 0x92, 0x41, 0x5e, 0x0a, 0x0d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x14, 0x50, 0x61, 0x74, 0x63, 0x68, 0x20, 0x61, 0x20, 0x73, - 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x1a, 0x37, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, - 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, - 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, - 0x73, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x32, 0x1f, 0x2f, - 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xca, - 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x92, 0x41, 0x4b, 0x0a, 0x0d, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x14, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x73, 0x1a, 0x24, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x73, 0x6b, 0x69, 0x6c, 0x6c, - 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, - 0x1a, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x42, 0x99, 0x01, 0x92, 0x41, - 0x74, 0x12, 0x4a, 0x0a, 0x14, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x20, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x41, 0x50, 0x49, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x43, 0x61, 0x6c, - 0x6c, 0x20, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, - 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x77, 0x65, 0x62, 0x69, 0x74, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_skill_preset_proto_rawDescOnce sync.Once - file_skill_preset_proto_rawDescData = file_skill_preset_proto_rawDesc -) - -func file_skill_preset_proto_rawDescGZIP() []byte { - file_skill_preset_proto_rawDescOnce.Do(func() { - file_skill_preset_proto_rawDescData = protoimpl.X.CompressGZIP(file_skill_preset_proto_rawDescData) - }) - return file_skill_preset_proto_rawDescData -} - -var file_skill_preset_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_skill_preset_proto_goTypes = []interface{}{ - (*SkillPreset)(nil), // 0: engine.SkillPreset - (*CreateSkillPresetRequest)(nil), // 1: engine.CreateSkillPresetRequest - (*CreateSkillPresetResponse)(nil), // 2: engine.CreateSkillPresetResponse - (*DeleteSkillPresetRequest)(nil), // 3: engine.DeleteSkillPresetRequest - (*DeleteSkillPresetResponse)(nil), // 4: engine.DeleteSkillPresetResponse - (*UpdateSkillPresetRequest)(nil), // 5: engine.UpdateSkillPresetRequest - (*UpdateSkillPresetResponse)(nil), // 6: engine.UpdateSkillPresetResponse - (*PatchSkillPresetRequest)(nil), // 7: engine.PatchSkillPresetRequest - (*PatchSkillPresetResponse)(nil), // 8: engine.PatchSkillPresetResponse - (*SearchSkillPresetRequest)(nil), // 9: engine.SearchSkillPresetRequest - (*SearchSkillPresetResponse)(nil), // 10: engine.SearchSkillPresetResponse - (*GetSkillPresetRequest)(nil), // 11: engine.GetSkillPresetRequest - (*GetSkillPresetResponse)(nil), // 12: engine.GetSkillPresetResponse - (*Lookup)(nil), // 13: engine.Lookup -} -var file_skill_preset_proto_depIdxs = []int32{ - 13, // 0: engine.SkillPreset.created_by:type_name -> engine.Lookup - 13, // 1: engine.SkillPreset.updated_by:type_name -> engine.Lookup - 13, // 2: engine.SkillPreset.skills:type_name -> engine.Lookup - 13, // 3: engine.CreateSkillPresetRequest.skills:type_name -> engine.Lookup - 0, // 4: engine.CreateSkillPresetResponse.item:type_name -> engine.SkillPreset - 0, // 5: engine.DeleteSkillPresetResponse.items:type_name -> engine.SkillPreset - 13, // 6: engine.UpdateSkillPresetRequest.skills:type_name -> engine.Lookup - 0, // 7: engine.UpdateSkillPresetResponse.item:type_name -> engine.SkillPreset - 13, // 8: engine.PatchSkillPresetRequest.skills:type_name -> engine.Lookup - 0, // 9: engine.PatchSkillPresetResponse.item:type_name -> engine.SkillPreset - 0, // 10: engine.SearchSkillPresetResponse.items:type_name -> engine.SkillPreset - 0, // 11: engine.GetSkillPresetResponse.item:type_name -> engine.SkillPreset - 1, // 12: engine.SkillPresetService.CreateSkillPreset:input_type -> engine.CreateSkillPresetRequest - 11, // 13: engine.SkillPresetService.GetSkillPreset:input_type -> engine.GetSkillPresetRequest - 9, // 14: engine.SkillPresetService.SearchSkillPreset:input_type -> engine.SearchSkillPresetRequest - 5, // 15: engine.SkillPresetService.UpdateSkillPreset:input_type -> engine.UpdateSkillPresetRequest - 7, // 16: engine.SkillPresetService.PatchSkillPreset:input_type -> engine.PatchSkillPresetRequest - 3, // 17: engine.SkillPresetService.DeleteSkillPreset:input_type -> engine.DeleteSkillPresetRequest - 2, // 18: engine.SkillPresetService.CreateSkillPreset:output_type -> engine.CreateSkillPresetResponse - 12, // 19: engine.SkillPresetService.GetSkillPreset:output_type -> engine.GetSkillPresetResponse - 10, // 20: engine.SkillPresetService.SearchSkillPreset:output_type -> engine.SearchSkillPresetResponse - 6, // 21: engine.SkillPresetService.UpdateSkillPreset:output_type -> engine.UpdateSkillPresetResponse - 8, // 22: engine.SkillPresetService.PatchSkillPreset:output_type -> engine.PatchSkillPresetResponse - 4, // 23: engine.SkillPresetService.DeleteSkillPreset:output_type -> engine.DeleteSkillPresetResponse - 18, // [18:24] is the sub-list for method output_type - 12, // [12:18] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_skill_preset_proto_init() } -func file_skill_preset_proto_init() { - if File_skill_preset_proto != nil { - return - } - file_const_proto_init() - if !protoimpl.UnsafeEnabled { - file_skill_preset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SkillPreset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatchSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatchSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSkillPresetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_skill_preset_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSkillPresetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_skill_preset_proto_msgTypes[7].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_skill_preset_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_skill_preset_proto_goTypes, - DependencyIndexes: file_skill_preset_proto_depIdxs, - MessageInfos: file_skill_preset_proto_msgTypes, - }.Build() - File_skill_preset_proto = out.File - file_skill_preset_proto_rawDesc = nil - file_skill_preset_proto_goTypes = nil - file_skill_preset_proto_depIdxs = nil -} diff --git a/gen/engine/skill_preset_grpc.pb.go b/gen/engine/skill_preset_grpc.pb.go deleted file mode 100644 index 23b495a9..00000000 --- a/gen/engine/skill_preset_grpc.pb.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: skill_preset.proto - -package engine - -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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - SkillPresetService_CreateSkillPreset_FullMethodName = "/engine.SkillPresetService/CreateSkillPreset" - SkillPresetService_GetSkillPreset_FullMethodName = "/engine.SkillPresetService/GetSkillPreset" - SkillPresetService_SearchSkillPreset_FullMethodName = "/engine.SkillPresetService/SearchSkillPreset" - SkillPresetService_UpdateSkillPreset_FullMethodName = "/engine.SkillPresetService/UpdateSkillPreset" - SkillPresetService_PatchSkillPreset_FullMethodName = "/engine.SkillPresetService/PatchSkillPreset" - SkillPresetService_DeleteSkillPreset_FullMethodName = "/engine.SkillPresetService/DeleteSkillPreset" -) - -// SkillPresetServiceClient is the client API for SkillPresetService 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 SkillPresetServiceClient interface { - // Created a new skill preset. - CreateSkillPreset(ctx context.Context, in *CreateSkillPresetRequest, opts ...grpc.CallOption) (*CreateSkillPresetResponse, error) - // Retrieves a skill preset by its identifier. - GetSkillPreset(ctx context.Context, in *GetSkillPresetRequest, opts ...grpc.CallOption) (*GetSkillPresetResponse, error) - // Searches skill presets using filtering, - // sorting and pagination options. - SearchSkillPreset(ctx context.Context, in *SearchSkillPresetRequest, opts ...grpc.CallOption) (*SearchSkillPresetResponse, error) - // Replaces an existing skill preset. - UpdateSkillPreset(ctx context.Context, in *UpdateSkillPresetRequest, opts ...grpc.CallOption) (*UpdateSkillPresetResponse, error) - // Updates selected fields of a skill preset. - PatchSkillPreset(ctx context.Context, in *PatchSkillPresetRequest, opts ...grpc.CallOption) (*PatchSkillPresetResponse, error) - // Deletes one or more skill presets. - DeleteSkillPreset(ctx context.Context, in *DeleteSkillPresetRequest, opts ...grpc.CallOption) (*DeleteSkillPresetResponse, error) -} - -type skillPresetServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSkillPresetServiceClient(cc grpc.ClientConnInterface) SkillPresetServiceClient { - return &skillPresetServiceClient{cc} -} - -func (c *skillPresetServiceClient) CreateSkillPreset(ctx context.Context, in *CreateSkillPresetRequest, opts ...grpc.CallOption) (*CreateSkillPresetResponse, error) { - out := new(CreateSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_CreateSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *skillPresetServiceClient) GetSkillPreset(ctx context.Context, in *GetSkillPresetRequest, opts ...grpc.CallOption) (*GetSkillPresetResponse, error) { - out := new(GetSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_GetSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *skillPresetServiceClient) SearchSkillPreset(ctx context.Context, in *SearchSkillPresetRequest, opts ...grpc.CallOption) (*SearchSkillPresetResponse, error) { - out := new(SearchSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_SearchSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *skillPresetServiceClient) UpdateSkillPreset(ctx context.Context, in *UpdateSkillPresetRequest, opts ...grpc.CallOption) (*UpdateSkillPresetResponse, error) { - out := new(UpdateSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_UpdateSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *skillPresetServiceClient) PatchSkillPreset(ctx context.Context, in *PatchSkillPresetRequest, opts ...grpc.CallOption) (*PatchSkillPresetResponse, error) { - out := new(PatchSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_PatchSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *skillPresetServiceClient) DeleteSkillPreset(ctx context.Context, in *DeleteSkillPresetRequest, opts ...grpc.CallOption) (*DeleteSkillPresetResponse, error) { - out := new(DeleteSkillPresetResponse) - err := c.cc.Invoke(ctx, SkillPresetService_DeleteSkillPreset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SkillPresetServiceServer is the server API for SkillPresetService service. -// All implementations must embed UnimplementedSkillPresetServiceServer -// for forward compatibility -type SkillPresetServiceServer interface { - // Created a new skill preset. - CreateSkillPreset(context.Context, *CreateSkillPresetRequest) (*CreateSkillPresetResponse, error) - // Retrieves a skill preset by its identifier. - GetSkillPreset(context.Context, *GetSkillPresetRequest) (*GetSkillPresetResponse, error) - // Searches skill presets using filtering, - // sorting and pagination options. - SearchSkillPreset(context.Context, *SearchSkillPresetRequest) (*SearchSkillPresetResponse, error) - // Replaces an existing skill preset. - UpdateSkillPreset(context.Context, *UpdateSkillPresetRequest) (*UpdateSkillPresetResponse, error) - // Updates selected fields of a skill preset. - PatchSkillPreset(context.Context, *PatchSkillPresetRequest) (*PatchSkillPresetResponse, error) - // Deletes one or more skill presets. - DeleteSkillPreset(context.Context, *DeleteSkillPresetRequest) (*DeleteSkillPresetResponse, error) - mustEmbedUnimplementedSkillPresetServiceServer() -} - -// UnimplementedSkillPresetServiceServer must be embedded to have forward compatible implementations. -type UnimplementedSkillPresetServiceServer struct { -} - -func (UnimplementedSkillPresetServiceServer) CreateSkillPreset(context.Context, *CreateSkillPresetRequest) (*CreateSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) GetSkillPreset(context.Context, *GetSkillPresetRequest) (*GetSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) SearchSkillPreset(context.Context, *SearchSkillPresetRequest) (*SearchSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) UpdateSkillPreset(context.Context, *UpdateSkillPresetRequest) (*UpdateSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) PatchSkillPreset(context.Context, *PatchSkillPresetRequest) (*PatchSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PatchSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) DeleteSkillPreset(context.Context, *DeleteSkillPresetRequest) (*DeleteSkillPresetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSkillPreset not implemented") -} -func (UnimplementedSkillPresetServiceServer) mustEmbedUnimplementedSkillPresetServiceServer() {} - -// UnsafeSkillPresetServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SkillPresetServiceServer will -// result in compilation errors. -type UnsafeSkillPresetServiceServer interface { - mustEmbedUnimplementedSkillPresetServiceServer() -} - -func RegisterSkillPresetServiceServer(s grpc.ServiceRegistrar, srv SkillPresetServiceServer) { - s.RegisterService(&SkillPresetService_ServiceDesc, srv) -} - -func _SkillPresetService_CreateSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).CreateSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_CreateSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).CreateSkillPreset(ctx, req.(*CreateSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SkillPresetService_GetSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).GetSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_GetSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).GetSkillPreset(ctx, req.(*GetSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SkillPresetService_SearchSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).SearchSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_SearchSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).SearchSkillPreset(ctx, req.(*SearchSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SkillPresetService_UpdateSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).UpdateSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_UpdateSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).UpdateSkillPreset(ctx, req.(*UpdateSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SkillPresetService_PatchSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PatchSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).PatchSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_PatchSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).PatchSkillPreset(ctx, req.(*PatchSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SkillPresetService_DeleteSkillPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSkillPresetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SkillPresetServiceServer).DeleteSkillPreset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SkillPresetService_DeleteSkillPreset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkillPresetServiceServer).DeleteSkillPreset(ctx, req.(*DeleteSkillPresetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// SkillPresetService_ServiceDesc is the grpc.ServiceDesc for SkillPresetService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SkillPresetService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "engine.SkillPresetService", - HandlerType: (*SkillPresetServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateSkillPreset", - Handler: _SkillPresetService_CreateSkillPreset_Handler, - }, - { - MethodName: "GetSkillPreset", - Handler: _SkillPresetService_GetSkillPreset_Handler, - }, - { - MethodName: "SearchSkillPreset", - Handler: _SkillPresetService_SearchSkillPreset_Handler, - }, - { - MethodName: "UpdateSkillPreset", - Handler: _SkillPresetService_UpdateSkillPreset_Handler, - }, - { - MethodName: "PatchSkillPreset", - Handler: _SkillPresetService_PatchSkillPreset_Handler, - }, - { - MethodName: "DeleteSkillPreset", - Handler: _SkillPresetService_DeleteSkillPreset_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "skill_preset.proto", -} diff --git a/grpc_api/api.go b/grpc_api/api.go index c0704c76..5d3f6ee3 100644 --- a/grpc_api/api.go +++ b/grpc_api/api.go @@ -51,7 +51,7 @@ type API struct { schemaVariable *schemaVariable push *push feedback *feedback - skillPreset *skillPreset + skillPreset *onlineSkills } func Init(a *app.App, server *grpc.Server) { @@ -99,7 +99,7 @@ func Init(a *app.App, server *grpc.Server) { api.webHook = NewWebHookApi(api) api.push = NewPushApi(api, a.Config().MinimumNumberMaskLen, a.Config().PrefixNumberMaskLen, a.Config().SuffixNumberMaskLen) api.feedback = NewFeedbackApi(api) - api.skillPreset = NewSkillPresetApi(api) + api.skillPreset = NewOnlineSkillsApi(api) engine.RegisterCalendarServiceServer(server, api.calendar) engine.RegisterSkillServiceServer(server, api.skill) @@ -142,5 +142,5 @@ func Init(a *app.App, server *grpc.Server) { engine.RegisterSchemaVariablesServiceServer(server, api.schemaVariable) engine.RegisterPushServiceServer(server, api.push) engine.RegisterFeedbackServiceServer(server, api.feedback) - engine.RegisterSkillPresetServiceServer(server, api.skillPreset) + engine.RegisterOnlineSkillsServiceServer(server, api.skillPreset) } diff --git a/grpc_api/online_skills.go b/grpc_api/online_skills.go new file mode 100644 index 00000000..a3e29eee --- /dev/null +++ b/grpc_api/online_skills.go @@ -0,0 +1,164 @@ +package grpc_api + +import ( + "context" + + "github.com/webitel/engine/gen/engine" + "github.com/webitel/engine/model" + "google.golang.org/protobuf/types/known/emptypb" +) + +type onlineSkills struct { + *API + + engine.UnimplementedOnlineSkillsServiceServer +} + +func NewOnlineSkillsApi(api *API) *onlineSkills { return &onlineSkills{API: api} } + +func (api *onlineSkills) CreateOnlineSkills(ctx context.Context, in *engine.CreateOnlineSkillsRequest) (*engine.CreateOnlineSkillsResponse, error) { + onlineSkills := model.OnlineSkills{ + Name: in.GetName(), + Skills: make([]*model.Lookup, 0, len(in.GetSkills())), + } + + onlineSkills.TryUseDescription(in.GetDescription()) + + for _, skill := range in.GetSkills() { + onlineSkills.Skills = append(onlineSkills.Skills, &model.Lookup{Id: int(skill.GetId())}) + } + + response, err := api.ctrl.CreateOnlineSkills(ctx, &onlineSkills) + if err != nil { + return nil, err + } + + return &engine.CreateOnlineSkillsResponse{Item: mapOnlineSkillsToProto(response)}, nil +} + +func (api *onlineSkills) DeleteOnlineSkills(ctx context.Context, in *engine.DeleteOnlineSkillsRequest) (*emptypb.Empty, error) { + deleteCmd := &model.DeleteSkillPresetCmd{ + ID: in.GetId(), + } + + err := api.ctrl.DeleteOnlineSkills(ctx, deleteCmd) + if err != nil { + return nil, err + } + + return &emptypb.Empty{}, nil +} + +func (api *onlineSkills) GetOnlineSkills(ctx context.Context, in *engine.GetOnlineSkillsRequest) (*engine.GetOnlineSkillsResponse, error) { + query := &model.GetSkillPresetQuery{ + ID: in.GetId(), + } + + response, err := api.ctrl.GetOnlineSkills(ctx, query) + if err != nil { + return nil, err + } + + return &engine.GetOnlineSkillsResponse{Item: mapOnlineSkillsToProto(response)}, nil +} + +func (api *onlineSkills) PatchOnlineSkills(ctx context.Context, in *engine.PatchOnlineSkillsRequest) (*engine.PatchOnlineSkillsResponse, error) { + patch := &model.PatchOnlineSkillsCmd{ + Fields: in.GetFields(), + ID: in.GetId(), + } + + for _, field := range in.GetFields() { + switch field { + case "name": + patch.Name = in.Name + case "description": + patch.Description = in.Description + case "skills": + patch.Skills = make([]*model.Lookup, 0, len(in.GetSkills())) + for _, skill := range in.GetSkills() { + patch.Skills = append(patch.Skills, &model.Lookup{Id: int(skill.GetId())}) + } + } + } + + result, err := api.ctrl.PatchOnlineSkills(ctx, patch) + if err != nil { + return nil, err + } + + return &engine.PatchOnlineSkillsResponse{Item: mapOnlineSkillsToProto(result)}, nil +} + +func (api *onlineSkills) SearchOnlineSkills(ctx context.Context, in *engine.SearchOnlineSkillsRequest) (*engine.SearchOnlineSkillsResponse, error) { + query := &model.SearchOnlineSkillsQuery{ + ListRequest: model.ListRequest{ + Q: in.GetQ(), + Page: int(in.GetPage()), + PerPage: int(in.GetSize()), + Fields: in.GetFields(), + Sort: in.GetSort(), + }, + IDs: in.GetIds(), + SkillIDs: in.GetSkillIds(), + SkipDefault: in.GetSkipDefault(), + } + + response, err := api.ctrl.SearchOnlineSkills(ctx, query) + if err != nil { + return nil, err + } + query.RemoveLastElemIfNeed(&response) + + return &engine.SearchOnlineSkillsResponse{ + Items: mapOnlineSkillsSliceToProto(response), + Next: !query.EndOfList(), + }, nil +} + +func (api *onlineSkills) UpdateOnlineSkills(ctx context.Context, in *engine.UpdateOnlineSkillsRequest) (*engine.UpdateOnlineSkillsResponse, error) { + updateCmd := model.OnlineSkills{ + ID: in.GetId(), + Name: in.GetName(), + Description: model.NewString(in.GetDescription()), + Skills: make([]*model.Lookup, 0, len(in.GetSkills())), + } + + for _, skill := range in.GetSkills() { + updateCmd.Skills = append(updateCmd.Skills, &model.Lookup{Id: int(skill.GetId())}) + } + + response, err := api.ctrl.UpdateOnlineSkills(ctx, &updateCmd) + if err != nil { + return nil, err + } + + return &engine.UpdateOnlineSkillsResponse{Item: mapOnlineSkillsToProto(response)}, nil +} + +func mapOnlineSkillsSliceToProto(in []*model.OnlineSkills) []*engine.OnlineSkills { + response := make([]*engine.OnlineSkills, 0, len(in)) + + for _, skill := range in { + response = append(response, mapOnlineSkillsToProto(skill)) + } + + return response +} + +func mapOnlineSkillsToProto(in *model.OnlineSkills) *engine.OnlineSkills { + if in == nil { + return nil //nolint:nilnil + } + + return &engine.OnlineSkills{ + Id: in.ID, + CreatedBy: GetProtoLookup(in.CreatedBy), + CreatedAt: in.CreatedAtUnix(), + UpdatedBy: GetProtoLookup(in.UpdatedBy), + UpdatedAt: in.UpdatedAtUnix(), + Name: in.Name, + Description: in.GetDescription(), + Skills: GetProtoLookups(in.Skills), + } +} diff --git a/grpc_api/skill_preset_store.go b/grpc_api/skill_preset_store.go deleted file mode 100644 index 30456721..00000000 --- a/grpc_api/skill_preset_store.go +++ /dev/null @@ -1,166 +0,0 @@ -package grpc_api - -import ( - "context" - "strings" - - "github.com/webitel/engine/gen/engine" - "github.com/webitel/engine/model" -) - -type skillPreset struct { - *API - - engine.UnimplementedSkillPresetServiceServer -} - -func NewSkillPresetApi(api *API) *skillPreset { return &skillPreset{API: api} } - -func (api *skillPreset) CreateSkillPreset(ctx context.Context, in *engine.CreateSkillPresetRequest) (*engine.CreateSkillPresetResponse, error) { - skillPreset := model.SkillPreset{ - Name: in.GetName(), - Skills: make([]*model.Lookup, 0, len(in.GetSkills())), - } - - if strings.TrimSpace(in.GetDescription()) != "" { - skillPreset.Description = model.NewString(in.GetDescription()) - } - - for _, skill := range in.GetSkills() { - skillPreset.Skills = append(skillPreset.Skills, &model.Lookup{Id: int(skill.GetId())}) - } - - response, err := api.ctrl.CreateSkillPreset(ctx, &skillPreset) - if err != nil { - return nil, err - } - - return &engine.CreateSkillPresetResponse{Item: mapSkillPresetToProto(response)}, nil -} - -func (api *skillPreset) DeleteSkillPreset(ctx context.Context, in *engine.DeleteSkillPresetRequest) (*engine.DeleteSkillPresetResponse, error) { - deleteCmd := &model.DeleteSkillPresetCmd{ - IDs: in.GetIds(), - } - - result, err := api.ctrl.DeleteSkillPreset(ctx, deleteCmd) - if err != nil { - return nil, err - } - - return &engine.DeleteSkillPresetResponse{Items: mapSkillPresetsToProto(result)}, nil -} - -func (api *skillPreset) GetSkillPreset(ctx context.Context, in *engine.GetSkillPresetRequest) (*engine.GetSkillPresetResponse, error) { - query := &model.GetSkillPresetQuery{ - ID: in.GetId(), - } - - response, err := api.ctrl.GetSkillPreset(ctx, query) - if err != nil { - return nil, err - } - - return &engine.GetSkillPresetResponse{Item: mapSkillPresetToProto(response)}, nil -} - -func (api *skillPreset) PatchSkillPreset(ctx context.Context, in *engine.PatchSkillPresetRequest) (*engine.PatchSkillPresetResponse, error) { - patch := &model.PatchSkillPresetCmd{ - Fields: in.GetFields(), - ID: in.GetId(), - } - - for _, field := range in.GetFields() { - switch field { - case "name": - patch.Name = in.Name - case "description": - patch.Description = in.Description - case "skills": - patch.Skills = make([]*model.Lookup, 0, len(in.GetSkills())) - for _, skill := range in.GetSkills() { - patch.Skills = append(patch.Skills, &model.Lookup{Id: int(skill.GetId())}) - } - } - } - - result, err := api.ctrl.PatchSkillPreset(ctx, patch) - if err != nil { - return nil, err - } - - return &engine.PatchSkillPresetResponse{Item: mapSkillPresetToProto(result)}, nil -} - -func (api *skillPreset) SearchSkillPreset(ctx context.Context, in *engine.SearchSkillPresetRequest) (*engine.SearchSkillPresetResponse, error) { - query := &model.SearchSkillPresetQuery{ - ListRequest: model.ListRequest{ - Q: in.GetQ(), - Page: int(in.GetPage()), - PerPage: int(in.GetSize()), - Fields: in.GetFields(), - Sort: in.GetSort(), - }, - IDs: in.GetIds(), - SkillIDs: in.GetSkillIds(), - SkipDefault: in.GetSkipDefault(), - } - - response, err := api.ctrl.SearchSkillPreset(ctx, query) - if err != nil { - return nil, err - } - query.RemoveLastElemIfNeed(&response) - - return &engine.SearchSkillPresetResponse{ - Items: mapSkillPresetsToProto(response), - Next: !query.EndOfList(), - }, nil -} - -func (api *skillPreset) UpdateSkillPreset(ctx context.Context, in *engine.UpdateSkillPresetRequest) (*engine.UpdateSkillPresetResponse, error) { - updateCmd := model.SkillPreset{ - ID: in.GetId(), - Name: in.GetName(), - Description: model.NewString(in.GetDescription()), - Skills: make([]*model.Lookup, 0, len(in.GetSkills())), - } - - for _, skill := range in.GetSkills() { - updateCmd.Skills = append(updateCmd.Skills, &model.Lookup{Id: int(skill.GetId())}) - } - - response, err := api.ctrl.UpdateSkillPreset(ctx, &updateCmd) - if err != nil { - return nil, err - } - - return &engine.UpdateSkillPresetResponse{Item: mapSkillPresetToProto(response)}, nil -} - -func mapSkillPresetsToProto(in []*model.SkillPreset) []*engine.SkillPreset { - response := make([]*engine.SkillPreset, 0, len(in)) - - for _, skill := range in { - response = append(response, mapSkillPresetToProto(skill)) - } - - return response -} - -func mapSkillPresetToProto(in *model.SkillPreset) *engine.SkillPreset { - if in == nil { - return nil //nolint:nilnil - } - - return &engine.SkillPreset{ - Id: in.ID, - CreatedBy: GetProtoLookup(in.CreatedBy), - CreatedAt: in.CreatedAtUnix(), - UpdatedBy: GetProtoLookup(in.UpdatedBy), - UpdatedAt: in.UpdatedAtUnix(), - Name: in.Name, - Description: in.GetDescription(), - Skills: GetProtoLookups(in.Skills), - } -} diff --git a/model/online_skills.go b/model/online_skills.go new file mode 100644 index 00000000..b989a597 --- /dev/null +++ b/model/online_skills.go @@ -0,0 +1,206 @@ +package model + +import ( + "cmp" + "strings" + "time" +) + +const StandartOnlineSkill string = "Standart Online" + +type OnlineSkills struct { + ID int64 `json:"id" db:"id"` + DomainID int64 `json:"domain_id" db:"domain_id"` + CreatedBy *Lookup `json:"created_by" db:"created_by"` + CreatedAt time.Time `json:"created_at" db:"created_at"` + UpdatedBy *Lookup `json:"updated_by" db:"updated_by"` + UpdatedAt time.Time `json:"updated_at" db:"updated_at"` + Name string `json:"name" db:"name"` + Description *string `json:"description" db:"description"` + + Skills []*Lookup `json:"skills" db:"skills"` +} + +func (s *OnlineSkills) InitializeCreateMetadata(domainID, creatorID int64, creatorName ...string) *OnlineSkills { + s.ActualizeCreatorInfo(domainID, creatorID, creatorName...). + ActualizeUpdatorInfo(domainID, creatorID, creatorName...) + + return s +} + +func (s *OnlineSkills) ActualizeCreatorInfo(domainID, creatorID int64, creatorName ...string) *OnlineSkills { + s.DomainID = domainID + + creator := Lookup{Id: int(creatorID)} + + if len(creatorName) != 0 && strings.TrimSpace(creatorName[0]) != "" { + creator.Name = creatorName[0] + } + + s.CreatedBy = &creator + + return s +} + +func (s *OnlineSkills) ActualizeUpdatorInfo(domainID, creatorID int64, updatorName ...string) *OnlineSkills { + s.DomainID = domainID + + updator := Lookup{Id: int(creatorID)} + + if len(updatorName) != 0 && strings.TrimSpace(updatorName[0]) != "" { + updator.Name = updatorName[0] + } + + s.UpdatedBy = &updator + + return s +} + +func (s *OnlineSkills) GetDescription() string { + return *(cmp.Or(s.Description, new(string))) +} + +func (s *OnlineSkills) TryUseDescription(desc string) *OnlineSkills { + if strings.TrimSpace(desc) != "" { + s.Description = &desc + } + + return s +} + +func (s *OnlineSkills) UpdatedAtUnix() int64 { + if s == nil { + return 0 + } + + return max(s.UpdatedAt.UTC().UnixMilli(), 0) +} + +func (s *OnlineSkills) CreatedAtUnix() int64 { + if s == nil { + return 0 + } + + return max(s.CreatedAt.UTC().UnixMilli(), 0) +} + +func (s *OnlineSkills) ReduceSkillsIDs() []int64 { + skillIDs := make([]int64, 0, len(s.Skills)) + + for _, s := range s.Skills { + skillIDs = append(skillIDs, int64(s.Id)) + } + + return skillIDs +} + +func (s OnlineSkills) AllowFields() []string { + return []string{"id", "name", "description", "created_by", "created_at", "updated_by", "updated_at", "skills"} +} + +func (s OnlineSkills) DefaultFields() []string { + return []string{"id", "name"} +} +func (s OnlineSkills) EntityName() string { return "cc_online_skills_list" } +func (s OnlineSkills) DefaultOrder() string { return "is_system desc, name asc" } + +func (s *OnlineSkills) Validate() AppError { + if s == nil { + return NewBadRequestError("model.online_skills.validate.nil_pointer_receiver", "Received empty online skills call") + } + + trimmedName := strings.TrimSpace(s.Name) + + if trimmedName == "" { + return NewBadRequestError("model.online_skills.validate.empty_name", "Name cannot be empty or contain only whitespaces") + } + + if strings.EqualFold(trimmedName, StandartOnlineSkill) { + return NewBadRequestError("model.online_skills.validate.reserved_name", `Name "Standart Online" is reserved`) + } + + return nil +} + +func (s *OnlineSkills) PreSave() { + s.Name = strings.TrimSpace(s.Name) +} + +type DeleteSkillPresetCmd struct { + ID int64 + DomainID int64 +} + +type GetSkillPresetQuery struct { + ID int64 + DomainID int64 +} + +func (q *GetSkillPresetQuery) Validate() AppError { + if q == nil { + return NewBadRequestError("model.online_skills.validate.empty_get_online_skills_query", "Received empty get online skills parameters") + } + + if q.ID <= 0 { + return NewBadRequestError("model.online_skills.validate.id_required", "Online skills ID is required during get request") + } + + if q.DomainID <= 0 { + return NewBadRequestError("model.online_skills.validate.domain_id_required", "Online skills Domain ID is required during get request") + } + return nil +} + +type SearchOnlineSkillsQuery struct { + ListRequest + + IDs []int64 + SkillIDs []int64 + SkipDefault bool +} + +type PatchOnlineSkillsCmd struct { + Fields []string + DomainID int64 + ID int64 + Name *string + Description *string + Skills []*Lookup + UpdatedBy Lookup +} + +func (p *PatchOnlineSkillsCmd) ReduceSkillsIDs() []int64 { + ids := make([]int64, 0, len(p.Skills)) + + for _, s := range p.Skills { + if s != nil { + ids = append(ids, int64(s.Id)) + } + } + + return ids +} + +func (p *PatchOnlineSkillsCmd) Validate() AppError { + if p == nil { + return NewBadRequestError("model.online_skills.validate.nil_pointer_patch", "Received empty patch online skills request") + } + + if name := p.Name; name != nil { + trimmedName := strings.TrimSpace(*name) + + if trimmedName == "" { + return NewBadRequestError("model.online_skills.validate.patch_empty_name", "Name field cannot be empty string") + } + + if strings.EqualFold(trimmedName, StandartOnlineSkill) { + return NewBadRequestError("model.online_skills.validate.patch_reserved_name", `Name "Standart Online" is reserved`) + } + } + + return nil +} + +func (p *PatchOnlineSkillsCmd) PrePatch() { + *p.Name = strings.TrimSpace(*p.Name) +} diff --git a/model/skill_preset.go b/model/skill_preset.go deleted file mode 100644 index 2a56b8aa..00000000 --- a/model/skill_preset.go +++ /dev/null @@ -1,175 +0,0 @@ -package model - -import ( - "cmp" - "strings" - "time" -) - -const StandartSkillPreset string = "Standart Online" - -var StandartSkillPresetValue = &SkillPreset{ - Name: StandartSkillPreset, -} - -type SkillPreset struct { - ID int64 `json:"id" db:"id"` - DomainID int64 `json:"domain_id" db:"domain_id"` - CreatedBy *Lookup `json:"created_by" db:"created_by"` - CreatedAt time.Time `json:"created_at" db:"created_at"` - UpdatedBy *Lookup `json:"updated_by" db:"updated_by"` - UpdatedAt time.Time `json:"updated_at" db:"updated_at"` - Name string `json:"name" db:"name"` - Description *string `json:"description" db:"description"` - - Skills []*Lookup `json:"skills" db:"skills"` -} - -func (s *SkillPreset) GetDescription() string { - return *(cmp.Or(s.Description, new(string))) -} - -func (s *SkillPreset) UpdatedAtUnix() int64 { - if s == nil { - return 0 - } - - return max(s.UpdatedAt.UTC().UnixMilli(), 0) -} - -func (s *SkillPreset) CreatedAtUnix() int64 { - if s == nil { - return 0 - } - - return max(s.CreatedAt.UTC().UnixMilli(), 0) -} - -func (s *SkillPreset) ReduceSkillsIDs() []int64 { - skillIDs := make([]int64, 0, len(s.Skills)) - - for _, s := range s.Skills { - skillIDs = append(skillIDs, int64(s.Id)) - } - - return skillIDs -} - -func (s SkillPreset) AllowFields() []string { - return []string{"id", "name", "description", "created_by", "created_at", "updated_by", "updated_at", "skills"} -} - -func (s SkillPreset) DefaultFields() []string { - return []string{"id", "name"} -} -func (s SkillPreset) EntityName() string { return "cc_skill_preset_view" } -func (s SkillPreset) DefaultOrder() string { return "+name" } - -func (s *SkillPreset) Validate() AppError { - if s == nil { - return NewBadRequestError("model.skill_preset.validate.nil_pointer_receiver", "Received empty skill preset call") - } - - trimmedName := strings.TrimSpace(s.Name) - - if trimmedName == "" { - return NewBadRequestError("model.skill_preset.validate.empty_name", "Name cannot be empty or contain only whitespaces") - } - - if strings.EqualFold(trimmedName, StandartSkillPreset) { - return NewBadRequestError("model.skill_preset.validate.reserved_name", `Name "Standart Online" is reserved`) - } - - return nil -} - -func (s *SkillPreset) PreSave() { - s.Name = strings.TrimSpace(s.Name) -} - -type DeleteSkillPresetCmd struct { - IDs []int64 - DomainID int64 -} - -type GetSkillPresetQuery struct { - ID int64 - DomainID int64 -} - -func (q *GetSkillPresetQuery) Validate() AppError { - if q == nil { - return NewBadRequestError("model.skill_preset.validate.empty_get_skill_preset_query", "Received empty get skill preset parameters") - } - - if q.ID <= 0 { - return NewBadRequestError("model.skill_preset.validate.id_required", "Skill preset ID is required during get request") - } - - if q.DomainID <= 0 { - return NewBadRequestError("model.skill_preset.validate.domain_id_required", "Skill preset Domain ID is required during get request") - } - return nil -} - -type SearchSkillPresetQuery struct { - ListRequest - - IDs []int64 - SkillIDs []int64 - SkipDefault bool -} - -func (s *SearchSkillPresetQuery) OrderBy() string { - if s.Sort == "" { - return "is_system desc, name asc" - } - - return s.Sort -} - -type PatchSkillPresetCmd struct { - Fields []string - DomainID int64 - ID int64 - Name *string - Description *string - Skills []*Lookup - UpdatedBy Lookup -} - -func (p *PatchSkillPresetCmd) ReduceSkillsIDs() []int64 { - ids := make([]int64, 0, len(p.Skills)) - - for _, s := range p.Skills { - if s != nil { - ids = append(ids, int64(s.Id)) - } - } - - return ids -} - -func (p *PatchSkillPresetCmd) Validate() AppError { - if p == nil { - return NewBadRequestError("model.skill_preset.validate.nil_pointer_patch", "Received empty patch skill preset request") - } - - if name := p.Name; name != nil { - trimmedName := strings.TrimSpace(*name) - - if trimmedName == "" { - return NewBadRequestError("model.skill_preset.validate.patch_empty_name", "Name field cannot be empty string") - } - - if strings.EqualFold(trimmedName, StandartSkillPreset) { - return NewBadRequestError("model.skill_preset.validate.patch_reserved_name", `Name "Standart Online" is reserved`) - } - } - - return nil -} - -func (p *PatchSkillPresetCmd) PrePatch() { - *p.Name = strings.TrimSpace(*p.Name) -} diff --git a/store/layered_store.go b/store/layered_store.go index 7426347a..a6eccfbb 100644 --- a/store/layered_store.go +++ b/store/layered_store.go @@ -121,7 +121,7 @@ func (s *LayeredStore) CommunicationType() CommunicationTypeStore { return s.DatabaseLayer.CommunicationType() } -func (s *LayeredStore) SkillPreset() SkillPresetStore { return s.DatabaseLayer.SkillPreset() } +func (s *LayeredStore) OnlineSkills() OnlineSkillsStore { return s.DatabaseLayer.OnlineSkills() } func (s *LayeredStore) Member() MemberStore { return s.DatabaseLayer.Member() diff --git a/store/sqlstore/skill_preset_store.go b/store/sqlstore/online_skills.go similarity index 55% rename from store/sqlstore/skill_preset_store.go rename to store/sqlstore/online_skills.go index b523ddf1..0c42324a 100644 --- a/store/sqlstore/skill_preset_store.go +++ b/store/sqlstore/online_skills.go @@ -7,18 +7,16 @@ import ( "github.com/webitel/engine/model" ) -type SqlSkillPresetStore struct { - SqlStore -} +type SqlOnlineSkillsStore struct{ SqlStore } -func NewSqlSkillPresetStore(sqlStore SqlStore) *SqlSkillPresetStore { - return &SqlSkillPresetStore{SqlStore: sqlStore} +func NewSqlOnlineSkillsStore(sqlStore SqlStore) *SqlOnlineSkillsStore { + return &SqlOnlineSkillsStore{SqlStore: sqlStore} } -func (s *SqlSkillPresetStore) Create(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) { +func (s *SqlOnlineSkillsStore) Create(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { query := ` with preset_ins as ( - insert into "call_center"."skill_preset" ( + insert into "call_center"."cc_online_skills" ( "domain_id", "created_by", "created_at", "updated_by", "updated_at", "name", "description" ) values ( @@ -27,8 +25,8 @@ func (s *SqlSkillPresetStore) Create(ctx context.Context, preset *model.SkillPre returning "id","domain_id", "name", "created_by", "created_at", "updated_by", "updated_at", "description" ), skills_in_preset_ins as ( - insert into "call_center"."skills_in_skill_preset" ( - "domain_id", "skill_preset_id", "skill_id" + insert into "call_center"."cc_skills_in_online_skills" ( + "domain_id", "online_skill_id", "skill_id" ) select :DomainID, @@ -36,14 +34,14 @@ func (s *SqlSkillPresetStore) Create(ctx context.Context, preset *model.SkillPre s.id from unnest(:Skills::int8[]) s(id) cross join preset_ins p - returning "skill_preset_id", "skill_id" + returning "online_skill_id", "skill_id" ) select p.id as id, p.domain_id as domain_id, - call_center.cc_get_lookup(uc.id, uc.name) as created_by, + call_center.cc_get_lookup(uc.id, coalesce(uc.name, uc.username)) as created_by, p.created_at as created_at, - call_center.cc_get_lookup(ua.id, ua.name) as updated_by, + call_center.cc_get_lookup(ua.id, coalesce(ua.name, ua.username)) as updated_by, p.updated_at as updated_at, p.name as "name", p.description as "description", @@ -69,24 +67,24 @@ func (s *SqlSkillPresetStore) Create(ctx context.Context, preset *model.SkillPre "Skills": pq.Int64Array(preset.ReduceSkillsIDs()), } - var result *model.SkillPreset + var result *model.OnlineSkills if err := s.GetMaster().WithContext(ctx).SelectOne(&result, query, args); err != nil { if e, ok := err.(*pq.Error); ok { if e.Code == DuplicationViolationErrorCode { - return nil, model.NewBadRequestError("sqlstore.skill_preset_store.create_already_exists", " Skill preset with this name already exists.") + return nil, model.NewBadRequestError("sqlstore.online_skills_store.create_already_exists", "Online skills with this name already exists.") } } - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.create", err.Error(), extractCodeFromErr(err)) + return nil, model.NewCustomCodeError("sqlstore.online_skills_store.create", err.Error(), extractCodeFromErr(err)) } return result, nil } -func (s *SqlSkillPresetStore) Update(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) { +func (s *SqlOnlineSkillsStore) Update(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) { query := ` with preset_upd as ( - update "call_center"."skill_preset" + update "call_center"."cc_online_skills" set "updated_by" = :UpdatedBy, "updated_at" = now(), "name" = :Name, @@ -95,13 +93,13 @@ func (s *SqlSkillPresetStore) Update(ctx context.Context, preset *model.SkillPre returning "id", "domain_id", "created_by", "created_at", "updated_by", "updated_at", "name", "description" ), binded_skills_del as ( - delete from "call_center"."skills_in_skill_preset" - where "skill_preset_id" = :ID + delete from "call_center"."cc_skills_in_online_skills" + where "online_skill_id" = :ID and "skill_id" <> all(:Skills::int8[]) ), new_skills_ins as ( - insert into "call_center"."skills_in_skill_preset" ( - "domain_id", "skill_preset_id", "skill_id" + insert into "call_center"."cc_skills_in_online_skills" ( + "domain_id", "online_skill_id", "skill_id" ) select p.domain_id, @@ -109,7 +107,7 @@ func (s *SqlSkillPresetStore) Update(ctx context.Context, preset *model.SkillPre s.id from unnest(:Skills::int8[]) as s(id) cross join preset_upd p - on conflict ("skill_preset_id", "skill_id") do nothing + on conflict ("online_skill_id", "skill_id") do nothing returning "skill_id" ), actual_skills as ( @@ -117,16 +115,16 @@ func (s *SqlSkillPresetStore) Update(ctx context.Context, preset *model.SkillPre from new_skills_ins union select skill_id - from "call_center"."skills_in_skill_preset" - where skill_preset_id = :ID + from "call_center"."cc_skills_in_online_skills" + where online_skill_id = :ID and skill_id = any(:Skills::int8[]) ) select p.id as id, p.domain_id as domain_id, - call_center.cc_get_lookup(uc.id, uc.name) as created_by, + call_center.cc_get_lookup(uc.id, coalesce(uc.name, uc.username)) as created_by, p.created_at as created_at, - call_center.cc_get_lookup(ua.id, ua.name) as updated_by, + call_center.cc_get_lookup(ua.id, coalesce(ua.name, ua.username)) as updated_by, p.updated_at as updated_at, p.name as "name", p.description as "description", @@ -151,17 +149,17 @@ func (s *SqlSkillPresetStore) Update(ctx context.Context, preset *model.SkillPre "Skills": pq.Int64Array(preset.ReduceSkillsIDs()), } - var result *model.SkillPreset + var result *model.OnlineSkills if err := s.GetMaster().WithContext(ctx).SelectOne(&result, query, args); err != nil { - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.update", err.Error(), extractCodeFromErr(err)) + return nil, model.NewCustomCodeError("sqlstore.online_skills_store.update", err.Error(), extractCodeFromErr(err)) } return result, nil } -func (s *SqlSkillPresetStore) Patch(ctx context.Context, patchCmd *model.PatchSkillPresetCmd) (*model.SkillPreset, model.AppError) { +func (s *SqlOnlineSkillsStore) Patch(ctx context.Context, patchCmd *model.PatchOnlineSkillsCmd) (*model.OnlineSkills, model.AppError) { query := ` - select * from call_center.cc_patch_skill_preset( + select * from call_center.cc_patch_online_skills( :ID, :DomainID, :UpdatedBy, @@ -170,7 +168,7 @@ func (s *SqlSkillPresetStore) Patch(ctx context.Context, patchCmd *model.PatchSk :PatchDescription, :Skills::int8[], :PatchSkills - ) + ); ` args := map[string]any{ @@ -197,63 +195,30 @@ func (s *SqlSkillPresetStore) Patch(ctx context.Context, patchCmd *model.PatchSk } } - var result model.SkillPreset + var result model.OnlineSkills if err := s.GetMaster().WithContext(ctx).SelectOne(&result, query, args); err != nil { - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.patch", err.Error(), extractCodeFromErr(err)) + return nil, model.NewCustomCodeError("sqlstore.online_skills_store.patch", err.Error(), extractCodeFromErr(err)) } return &result, nil } -func (s *SqlSkillPresetStore) Delete(ctx context.Context, deleteCmd *model.DeleteSkillPresetCmd) ([]*model.SkillPreset, model.AppError) { - query := ` - with preset_del as ( - delete from "call_center"."skill_preset" - where "domain_id" = :DomainID and "id" = any(:IDs) - returning "id", "domain_id", "created_by", "created_at", "updated_by", "updated_at", "name", "description" - ), - skills_del as ( - delete from "call_center"."skills_in_skill_preset" - where "skill_preset_id" in (select id from preset_del) - returning "skill_preset_id", "skill_id" - ) - select - p.id as id, - p.domain_id as domain_id, - call_center.cc_get_lookup(uc.id, uc.name) as created_by, - p.created_at as created_at, - call_center.cc_get_lookup(ua.id, ua.name) as updated_by, - p.updated_at as updated_at, - p.name as "name", - p.description as "description", - s.skills as "skills" - from preset_del p - left join lateral ( - select jsonb_agg( - call_center.cc_get_lookup(s.id, s.name) - ) as skills - from skills_del sd - inner join "call_center"."cc_skill" s on s.id = sd.skill_id - where sd.skill_preset_id = p.id - ) s on true - left join directory.wbt_user uc on uc.id = p.created_by - left join directory.wbt_user ua on ua.id = p.updated_by - ` +func (s *SqlOnlineSkillsStore) Delete(ctx context.Context, deleteCmd *model.DeleteSkillPresetCmd) model.AppError { + query := `delete from "call_center"."cc_online_skills" where "id" = :ID and "domain_id" = :DomainID;` args := map[string]any{ "DomainID": deleteCmd.DomainID, - "IDs": pq.Int64Array(deleteCmd.IDs), + "ID": deleteCmd.ID, } - var result []*model.SkillPreset - if _, err := s.GetMaster().WithContext(ctx).Select(&result, query, args); err != nil { - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.delete", err.Error(), extractCodeFromErr(err)) + if _, err := s.GetMaster().WithContext(ctx).Exec(query, args); err != nil { + return model.NewCustomCodeError("sqlstore.online_skills_store.delete", err.Error(), extractCodeFromErr(err)) } - return result, nil + return nil } -func (s *SqlSkillPresetStore) Search(ctx context.Context, search *model.SearchSkillPresetQuery) ([]*model.SkillPreset, model.AppError) { +func (s *SqlOnlineSkillsStore) Search(ctx context.Context, search *model.SearchOnlineSkillsQuery) ([]*model.OnlineSkills, model.AppError) { query := ` "domain_id" = :DomainID and (:IDs::int[] is null or "id" = any(:IDs::int[])) @@ -261,8 +226,8 @@ func (s *SqlSkillPresetStore) Search(ctx context.Context, search *model.SearchSk cardinality(:SkillIDs::int8[]) = 0 or :SkillIDs::int8[] is null or exists ( select 1 - from "call_center"."skills_in_skill_preset" si - where si.skill_preset_id = id + from "call_center"."cc_skills_in_online_skills" si + where si.online_skill_id = id and si.skill_id = any(:SkillIDs::int8[]) ) ) @@ -277,17 +242,15 @@ func (s *SqlSkillPresetStore) Search(ctx context.Context, search *model.SearchSk "SkipDefault": search.SkipDefault, } - search.Sort = search.OrderBy() - - var result []*model.SkillPreset - if err := s.ListQuery(ctx, &result, search.ListRequest, query, model.SkillPreset{}, args); err != nil { - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.search", err.Error(), extractCodeFromErr(err)) + var result []*model.OnlineSkills + if err := s.ListQuery(ctx, &result, search.ListRequest, query, model.OnlineSkills{}, args); err != nil { + return nil, model.NewCustomCodeError("sqlstore.online_skills_store.search", err.Error(), extractCodeFromErr(err)) } return result, nil } -func (s *SqlSkillPresetStore) Get(ctx context.Context, search *model.GetSkillPresetQuery) (*model.SkillPreset, model.AppError) { +func (s *SqlOnlineSkillsStore) Get(ctx context.Context, search *model.GetSkillPresetQuery) (*model.OnlineSkills, model.AppError) { query := ` select id, @@ -299,7 +262,7 @@ func (s *SqlSkillPresetStore) Get(ctx context.Context, search *model.GetSkillPre name, description, skills - from "call_center"."cc_skill_preset_view" + from "call_center"."cc_online_skills_list" where "domain_id" = :DomainID and "id" = :ID ` @@ -308,9 +271,9 @@ func (s *SqlSkillPresetStore) Get(ctx context.Context, search *model.GetSkillPre "ID": search.ID, } - var result *model.SkillPreset + var result *model.OnlineSkills if err := s.GetReplica().WithContext(ctx).SelectOne(&result, query, args); err != nil { - return nil, model.NewCustomCodeError("sqlstore.skill_preset_store.get", err.Error(), extractCodeFromErr(err)) + return nil, model.NewCustomCodeError("sqlstore.online_skills_store.get", err.Error(), extractCodeFromErr(err)) } return result, nil diff --git a/store/sqlstore/supplier.go b/store/sqlstore/supplier.go index 1a33f095..23b6a423 100644 --- a/store/sqlstore/supplier.go +++ b/store/sqlstore/supplier.go @@ -76,7 +76,7 @@ type SqlSupplierOldStores struct { schemeVariable store.SchemeVariablesStore socketSession store.SocketSessionStore feedback store.FeedbackStore - skillPreset store.SkillPresetStore + onlineSkills store.OnlineSkillsStore } type SqlSupplier struct { @@ -146,7 +146,7 @@ func NewSqlSupplier(settings model.SqlSettings) *SqlSupplier { supplier.oldStores.chat = NewSqlChatStore(supplier) supplier.oldStores.chatPlan = NewSqlChatPlanStore(supplier) supplier.oldStores.feedback = NewSqlFeedbackStore(supplier) - supplier.oldStores.skillPreset = NewSqlSkillPresetStore(supplier) + supplier.oldStores.onlineSkills = NewSqlOnlineSkillsStore(supplier) err := supplier.GetMaster().CreateTablesIfNotExists() if err != nil { @@ -455,7 +455,7 @@ func (ss *SqlSupplier) Feedback() store.FeedbackStore { return ss.oldStores.feedback } -func (ss *SqlSupplier) SkillPreset() store.SkillPresetStore { return ss.oldStores.skillPreset } +func (ss *SqlSupplier) OnlineSkills() store.OnlineSkillsStore { return ss.oldStores.onlineSkills } type typeConverter struct{} diff --git a/store/store.go b/store/store.go index 34de8fe1..05b724ee 100644 --- a/store/store.go +++ b/store/store.go @@ -80,7 +80,7 @@ type Store interface { SchemeVariable() SchemeVariablesStore SocketSession() SocketSessionStore Feedback() FeedbackStore - SkillPreset() SkillPresetStore + OnlineSkills() OnlineSkillsStore } // todo deprecated @@ -552,13 +552,13 @@ type FeedbackStore interface { Create(ctx context.Context, key model.FeedbackKey, rating float32, description string) (model.Feedback, model.AppError) } -type SkillPresetStore interface { - Create(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) - Update(ctx context.Context, preset *model.SkillPreset) (*model.SkillPreset, model.AppError) - Patch(ctx context.Context, patchCmd *model.PatchSkillPresetCmd) (*model.SkillPreset, model.AppError) - Delete(ctx context.Context, deleteCmd *model.DeleteSkillPresetCmd) ([]*model.SkillPreset, model.AppError) - Search(ctx context.Context, search *model.SearchSkillPresetQuery) ([]*model.SkillPreset, model.AppError) - Get(ctx context.Context, search *model.GetSkillPresetQuery) (*model.SkillPreset, model.AppError) +type OnlineSkillsStore interface { + Create(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) + Update(ctx context.Context, preset *model.OnlineSkills) (*model.OnlineSkills, model.AppError) + Patch(ctx context.Context, patchCmd *model.PatchOnlineSkillsCmd) (*model.OnlineSkills, model.AppError) + Delete(ctx context.Context, deleteCmd *model.DeleteSkillPresetCmd) model.AppError + Search(ctx context.Context, search *model.SearchOnlineSkillsQuery) ([]*model.OnlineSkills, model.AppError) + Get(ctx context.Context, search *model.GetSkillPresetQuery) (*model.OnlineSkills, model.AppError) } // ApplyFiltersToBuilder determines type of {filters} parameter and applies {filters} to the {base} according to the determined type.