tailly_back_v2/pkg/moderation/proto/moderation.pb.go
madipo2611 1a3267a4cc
All checks were successful
continuous-integration/drone/push Build is passing
v0.0.9 Интегрирован сервис модерации контента при создании поста
2025-07-22 08:28:11 +03:00

401 lines
12 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v3.21.12
// source: moderation.proto
package __
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ImageRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ImageData []byte `protobuf:"bytes,1,opt,name=image_data,json=imageData,proto3" json:"image_data,omitempty"`
ImageUrl string `protobuf:"bytes,2,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ImageRequest) Reset() {
*x = ImageRequest{}
mi := &file_moderation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ImageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ImageRequest) ProtoMessage() {}
func (x *ImageRequest) ProtoReflect() protoreflect.Message {
mi := &file_moderation_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ImageRequest.ProtoReflect.Descriptor instead.
func (*ImageRequest) Descriptor() ([]byte, []int) {
return file_moderation_proto_rawDescGZIP(), []int{0}
}
func (x *ImageRequest) GetImageData() []byte {
if x != nil {
return x.ImageData
}
return nil
}
func (x *ImageRequest) GetImageUrl() string {
if x != nil {
return x.ImageUrl
}
return ""
}
type VideoRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
VideoUrl string `protobuf:"bytes,1,opt,name=video_url,json=videoUrl,proto3" json:"video_url,omitempty"`
FrameSampleRate int32 `protobuf:"varint,2,opt,name=frame_sample_rate,json=frameSampleRate,proto3" json:"frame_sample_rate,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *VideoRequest) Reset() {
*x = VideoRequest{}
mi := &file_moderation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *VideoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VideoRequest) ProtoMessage() {}
func (x *VideoRequest) ProtoReflect() protoreflect.Message {
mi := &file_moderation_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VideoRequest.ProtoReflect.Descriptor instead.
func (*VideoRequest) Descriptor() ([]byte, []int) {
return file_moderation_proto_rawDescGZIP(), []int{1}
}
func (x *VideoRequest) GetVideoUrl() string {
if x != nil {
return x.VideoUrl
}
return ""
}
func (x *VideoRequest) GetFrameSampleRate() int32 {
if x != nil {
return x.FrameSampleRate
}
return 0
}
type ModerationResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
OverallDecision string `protobuf:"bytes,1,opt,name=overall_decision,json=overallDecision,proto3" json:"overall_decision,omitempty"`
Predictions []*Prediction `protobuf:"bytes,2,rep,name=predictions,proto3" json:"predictions,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ModerationResponse) Reset() {
*x = ModerationResponse{}
mi := &file_moderation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ModerationResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModerationResponse) ProtoMessage() {}
func (x *ModerationResponse) ProtoReflect() protoreflect.Message {
mi := &file_moderation_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ModerationResponse.ProtoReflect.Descriptor instead.
func (*ModerationResponse) Descriptor() ([]byte, []int) {
return file_moderation_proto_rawDescGZIP(), []int{2}
}
func (x *ModerationResponse) GetOverallDecision() string {
if x != nil {
return x.OverallDecision
}
return ""
}
func (x *ModerationResponse) GetPredictions() []*Prediction {
if x != nil {
return x.Predictions
}
return nil
}
func (x *ModerationResponse) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
type Prediction struct {
state protoimpl.MessageState `protogen:"open.v1"`
Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
Decision string `protobuf:"bytes,3,opt,name=decision,proto3" json:"decision,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Prediction) Reset() {
*x = Prediction{}
mi := &file_moderation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Prediction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Prediction) ProtoMessage() {}
func (x *Prediction) ProtoReflect() protoreflect.Message {
mi := &file_moderation_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Prediction.ProtoReflect.Descriptor instead.
func (*Prediction) Descriptor() ([]byte, []int) {
return file_moderation_proto_rawDescGZIP(), []int{3}
}
func (x *Prediction) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *Prediction) GetScore() float32 {
if x != nil {
return x.Score
}
return 0
}
func (x *Prediction) GetDecision() string {
if x != nil {
return x.Decision
}
return ""
}
type ModerationSettings struct {
state protoimpl.MessageState `protogen:"open.v1"`
CategoryThresholds map[string]float32 `protobuf:"bytes,1,rep,name=category_thresholds,json=categoryThresholds,proto3" json:"category_thresholds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
AlwaysBlockCategories []string `protobuf:"bytes,2,rep,name=always_block_categories,json=alwaysBlockCategories,proto3" json:"always_block_categories,omitempty"`
AlwaysAllowCategories []string `protobuf:"bytes,3,rep,name=always_allow_categories,json=alwaysAllowCategories,proto3" json:"always_allow_categories,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ModerationSettings) Reset() {
*x = ModerationSettings{}
mi := &file_moderation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ModerationSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModerationSettings) ProtoMessage() {}
func (x *ModerationSettings) ProtoReflect() protoreflect.Message {
mi := &file_moderation_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ModerationSettings.ProtoReflect.Descriptor instead.
func (*ModerationSettings) Descriptor() ([]byte, []int) {
return file_moderation_proto_rawDescGZIP(), []int{4}
}
func (x *ModerationSettings) GetCategoryThresholds() map[string]float32 {
if x != nil {
return x.CategoryThresholds
}
return nil
}
func (x *ModerationSettings) GetAlwaysBlockCategories() []string {
if x != nil {
return x.AlwaysBlockCategories
}
return nil
}
func (x *ModerationSettings) GetAlwaysAllowCategories() []string {
if x != nil {
return x.AlwaysAllowCategories
}
return nil
}
var File_moderation_proto protoreflect.FileDescriptor
const file_moderation_proto_rawDesc = "" +
"\n" +
"\x10moderation.proto\x12\n" +
"moderation\"J\n" +
"\fImageRequest\x12\x1d\n" +
"\n" +
"image_data\x18\x01 \x01(\fR\timageData\x12\x1b\n" +
"\timage_url\x18\x02 \x01(\tR\bimageUrl\"W\n" +
"\fVideoRequest\x12\x1b\n" +
"\tvideo_url\x18\x01 \x01(\tR\bvideoUrl\x12*\n" +
"\x11frame_sample_rate\x18\x02 \x01(\x05R\x0fframeSampleRate\"\x93\x01\n" +
"\x12ModerationResponse\x12)\n" +
"\x10overall_decision\x18\x01 \x01(\tR\x0foverallDecision\x128\n" +
"\vpredictions\x18\x02 \x03(\v2\x16.moderation.PredictionR\vpredictions\x12\x18\n" +
"\amessage\x18\x03 \x01(\tR\amessage\"Z\n" +
"\n" +
"Prediction\x12\x1a\n" +
"\bcategory\x18\x01 \x01(\tR\bcategory\x12\x14\n" +
"\x05score\x18\x02 \x01(\x02R\x05score\x12\x1a\n" +
"\bdecision\x18\x03 \x01(\tR\bdecision\"\xb4\x02\n" +
"\x12ModerationSettings\x12g\n" +
"\x13category_thresholds\x18\x01 \x03(\v26.moderation.ModerationSettings.CategoryThresholdsEntryR\x12categoryThresholds\x126\n" +
"\x17always_block_categories\x18\x02 \x03(\tR\x15alwaysBlockCategories\x126\n" +
"\x17always_allow_categories\x18\x03 \x03(\tR\x15alwaysAllowCategories\x1aE\n" +
"\x17CategoryThresholdsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x02R\x05value:\x028\x012\xa7\x01\n" +
"\x11ModerationService\x12H\n" +
"\n" +
"CheckImage\x12\x18.moderation.ImageRequest\x1a\x1e.moderation.ModerationResponse\"\x00\x12H\n" +
"\n" +
"CheckVideo\x12\x18.moderation.VideoRequest\x1a\x1e.moderation.ModerationResponse\"\x00B\x03Z\x01.b\x06proto3"
var (
file_moderation_proto_rawDescOnce sync.Once
file_moderation_proto_rawDescData []byte
)
func file_moderation_proto_rawDescGZIP() []byte {
file_moderation_proto_rawDescOnce.Do(func() {
file_moderation_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_moderation_proto_rawDesc), len(file_moderation_proto_rawDesc)))
})
return file_moderation_proto_rawDescData
}
var file_moderation_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_moderation_proto_goTypes = []any{
(*ImageRequest)(nil), // 0: moderation.ImageRequest
(*VideoRequest)(nil), // 1: moderation.VideoRequest
(*ModerationResponse)(nil), // 2: moderation.ModerationResponse
(*Prediction)(nil), // 3: moderation.Prediction
(*ModerationSettings)(nil), // 4: moderation.ModerationSettings
nil, // 5: moderation.ModerationSettings.CategoryThresholdsEntry
}
var file_moderation_proto_depIdxs = []int32{
3, // 0: moderation.ModerationResponse.predictions:type_name -> moderation.Prediction
5, // 1: moderation.ModerationSettings.category_thresholds:type_name -> moderation.ModerationSettings.CategoryThresholdsEntry
0, // 2: moderation.ModerationService.CheckImage:input_type -> moderation.ImageRequest
1, // 3: moderation.ModerationService.CheckVideo:input_type -> moderation.VideoRequest
2, // 4: moderation.ModerationService.CheckImage:output_type -> moderation.ModerationResponse
2, // 5: moderation.ModerationService.CheckVideo:output_type -> moderation.ModerationResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_moderation_proto_init() }
func file_moderation_proto_init() {
if File_moderation_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_moderation_proto_rawDesc), len(file_moderation_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_moderation_proto_goTypes,
DependencyIndexes: file_moderation_proto_depIdxs,
MessageInfos: file_moderation_proto_msgTypes,
}.Build()
File_moderation_proto = out.File
file_moderation_proto_goTypes = nil
file_moderation_proto_depIdxs = nil
}