parent
f48093ad32
commit
84fc019e46
12 changed files with 95 additions and 86 deletions
6
Makefile
Normal file
6
Makefile
Normal file
|
@ -0,0 +1,6 @@
|
|||
generate-grpc: proto/*.proto proto/*/*.proto
|
||||
mkdir -p server/src/delivery/grpc && \
|
||||
protoc -I=. \
|
||||
--go_out=server/src/delivery/grpc --go_opt=paths=source_relative \
|
||||
--go-grpc_out=server/src/delivery/grpc --go-grpc_opt=paths=source_relative,require_unimplemented_servers=false \
|
||||
$^
|
|
@ -3,9 +3,12 @@ bazil.org/fuse v0.0.0-20230120002735-62a210ff1fd5/go.mod h1:gG3RZAMXCa/OTes6rr9E
|
|||
buf.build/gen/go/bufbuild/bufplugin/connectrpc/go v1.18.1-20241023225133-42bdb4b67625.1/go.mod h1:U25kpbGQNelEvQOzl27pScJfeNHi8j9khymdeDG3+LQ=
|
||||
buf.build/gen/go/bufbuild/protovalidate/connectrpc/go v1.18.1-20240401165935-b983156c5e99.1/go.mod h1:472mPnWnhRk2WMztyVVpPRIsCXKWmvrk0kiS+nqV1UA=
|
||||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.4-20250130201111-63bb56e20495.1/go.mod h1:novQBstnxcGpfKf8qGRATqn1anQKwMJIbH5Q581jibU=
|
||||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250425153114-8976f5be98c1.1/go.mod h1:avRlCjnFzl98VPaeCtJ24RrV/wwHFzB8sWXhj26+n/U=
|
||||
buf.build/go/protovalidate v0.12.0/go.mod h1:q3PFfbzI05LeqxSwq+begW2syjy2Z6hLxZSkP1OH/D0=
|
||||
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
|
||||
cel.dev/expr v0.19.2 h1:V354PbqIXr9IQdwy4SYA4xa0HXaWq1BUPAGzugBY5V4=
|
||||
cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
|
||||
cel.dev/expr v0.23.1/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw=
|
||||
cloud.google.com/go v0.118.3 h1:jsypSnrE/w4mJysioGdMBg4MiW/hHx/sArFpaBWHdME=
|
||||
cloud.google.com/go/accessapproval v1.8.3 h1:axlU03FRiXDNupsmPG7LKzuS4Enk1gf598M62lWVB74=
|
||||
cloud.google.com/go/accesscontextmanager v1.9.3 h1:8zVoeiBa4erMCLEXltOcqVEsZhS26JZ5/Vrgs59eQiI=
|
||||
|
@ -436,8 +439,8 @@ github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc=
|
|||
github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
|
||||
github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
||||
github.com/google/cel-go v0.23.0/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
|
||||
github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI=
|
||||
github.com/google/go-pkcs11 v0.3.0 h1:PVRnTgtArZ3QQqTGtbtjtnIkzl2iY2kt24yqbrf7td8=
|
||||
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
||||
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
|
||||
|
@ -843,6 +846,7 @@ gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPu
|
|||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
||||
honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=
|
||||
|
|
|
@ -5,7 +5,7 @@ package tstor.filters;
|
|||
import "google/protobuf/go_features.proto";
|
||||
option features.(pb.go).api_level = API_OPAQUE;
|
||||
|
||||
option go_package = "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb/filters";
|
||||
option go_package = "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto/filters";
|
||||
|
||||
message IntFilter {
|
||||
oneof filter {
|
|
@ -5,7 +5,7 @@ package tstor.server;
|
|||
import "google/protobuf/go_features.proto";
|
||||
option features.(pb.go).api_level = API_OPAQUE;
|
||||
|
||||
option go_package = "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb";
|
||||
option go_package = "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto";
|
||||
|
||||
// import "google/api/annotations.proto";
|
||||
// import "buf/validate/validate.proto";
|
|
@ -7,8 +7,8 @@
|
|||
# go run cmd/generate-graphql-schema/main.go $@
|
||||
|
||||
|
||||
src/delivery/grpc/pb/%.pb.go: proto/%.proto
|
||||
protoc --go_opt=paths=source_relative --go_out=$@ $<
|
||||
# src/delivery/grpc/pb/%.pb.go: proto/%.proto
|
||||
# protoc --go_opt=paths=source_relative --go_out=$@ $<
|
||||
|
||||
# generate-grpc: src/delivery/grpc/pb/tstor.pb.go
|
||||
|
||||
|
@ -16,8 +16,8 @@ src/delivery/grpc/pb/%.pb.go: proto/%.proto
|
|||
# TODO add gprc-gateway when it updated to support editions
|
||||
# --grpc-gateway_out=src/delivery/grpc/pb --grpc-gateway_opt=paths=source_relative --grpc-gateway_opt=generate_unbound_methods=true \
|
||||
|
||||
generate-grpc: proto/*.proto proto/*/*.proto
|
||||
protoc -I=proto \
|
||||
--go_out=src/delivery/grpc/pb --go_opt=paths=source_relative \
|
||||
--go-grpc_out=src/delivery/grpc/pb --go-grpc_opt=paths=source_relative \
|
||||
$^
|
||||
# generate-grpc: proto/*.proto proto/*/*.proto
|
||||
# protoc -I=proto \
|
||||
# --go_out=src/delivery/grpc/pb --go_opt=paths=source_relative \
|
||||
# --go-grpc_out=src/delivery/grpc/pb --go-grpc_opt=paths=source_relative \
|
||||
# $^
|
||||
|
|
|
@ -20,7 +20,7 @@ require (
|
|||
github.com/goware/singleflight v0.3.0
|
||||
github.com/grafana/otel-profiling-go v0.5.1
|
||||
github.com/grafana/pyroscope-go v1.2.2
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7
|
||||
github.com/knadh/koanf/parsers/yaml v1.0.0
|
||||
github.com/knadh/koanf/providers/env v1.1.0
|
||||
|
|
|
@ -26,6 +26,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgraph-io/badger/v4 v4.7.0 h1:Q+J8HApYAY7UMpL8d9owqiB+odzEc0zn/aqOD9jhc6Y=
|
||||
github.com/dgraph-io/badger/v4 v4.7.0/go.mod h1:He7TzG3YBy3j4f5baj5B7Zl2XyfNe5bl4Udl0aPemVA=
|
||||
github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM=
|
||||
github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI=
|
||||
github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38=
|
||||
|
@ -78,8 +79,8 @@ github.com/grafana/pyroscope-go v1.2.2 h1:uvKCyZMD724RkaCEMrSTC38Yn7AnFe8S2wiAIY
|
|||
github.com/grafana/pyroscope-go v1.2.2/go.mod h1:zzT9QXQAp2Iz2ZdS216UiV8y9uXJYQiGE1q8v1FyhqU=
|
||||
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg=
|
||||
github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1 h1:KcFzXwzM/kGhIRHvc8jdixfIJjVzuUJdnv+5xsPutog=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 h1:sGm2vDRFUrQJO/Veii4h4zG2vvqG6uWNkBHSTqXOZk0=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2/go.mod h1:wd1YpapPLivG6nQgbf7ZkG1hhSOXDhhn4MLTknx2aAc=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.30.2
|
||||
// source: filters/filters.proto
|
||||
// source: proto/filters/filters.proto
|
||||
|
||||
package filters
|
||||
|
||||
|
@ -30,7 +30,7 @@ type IntFilter struct {
|
|||
|
||||
func (x *IntFilter) Reset() {
|
||||
*x = IntFilter{}
|
||||
mi := &file_filters_filters_proto_msgTypes[0]
|
||||
mi := &file_proto_filters_filters_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ func (x *IntFilter) String() string {
|
|||
func (*IntFilter) ProtoMessage() {}
|
||||
|
||||
func (x *IntFilter) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_filters_filters_proto_msgTypes[0]
|
||||
mi := &file_proto_filters_filters_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -301,7 +301,7 @@ func (b0 IntFilter_builder) Build() *IntFilter {
|
|||
type case_IntFilter_Filter protoreflect.FieldNumber
|
||||
|
||||
func (x case_IntFilter_Filter) String() string {
|
||||
md := file_filters_filters_proto_msgTypes[0].Descriptor()
|
||||
md := file_proto_filters_filters_proto_msgTypes[0].Descriptor()
|
||||
if x == 0 {
|
||||
return "not set"
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ type IntList struct {
|
|||
|
||||
func (x *IntList) Reset() {
|
||||
*x = IntList{}
|
||||
mi := &file_filters_filters_proto_msgTypes[1]
|
||||
mi := &file_proto_filters_filters_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ func (x *IntList) String() string {
|
|||
func (*IntList) ProtoMessage() {}
|
||||
|
||||
func (x *IntList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_filters_filters_proto_msgTypes[1]
|
||||
mi := &file_proto_filters_filters_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -405,11 +405,11 @@ func (b0 IntList_builder) Build() *IntList {
|
|||
return m0
|
||||
}
|
||||
|
||||
var File_filters_filters_proto protoreflect.FileDescriptor
|
||||
var File_proto_filters_filters_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_filters_filters_proto_rawDesc = "" +
|
||||
const file_proto_filters_filters_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x15filters/filters.proto\x12\rtstor.filters\x1a!google/protobuf/go_features.proto\"\x9d\x01\n" +
|
||||
"\x1bproto/filters/filters.proto\x12\rtstor.filters\x1a!google/protobuf/go_features.proto\"\x9d\x01\n" +
|
||||
"\tIntFilter\x12\x10\n" +
|
||||
"\x02eq\x18\x01 \x01(\x03H\x00R\x02eq\x12\x10\n" +
|
||||
"\x02gt\x18\x02 \x01(\x03H\x00R\x02gt\x12\x10\n" +
|
||||
|
@ -419,14 +419,14 @@ const file_filters_filters_proto_rawDesc = "" +
|
|||
"\x02in\x18\x06 \x01(\v2\x16.tstor.filters.IntListH\x00R\x02inB\b\n" +
|
||||
"\x06filter\"!\n" +
|
||||
"\aIntList\x12\x16\n" +
|
||||
"\x06values\x18\x01 \x03(\x03R\x06valuesBJZ@git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb/filters\x92\x03\x05\xd2>\x02\x10\x03b\beditionsp\xe8\a"
|
||||
"\x06values\x18\x01 \x03(\x03R\x06valuesBMZCgit.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto/filters\x92\x03\x05\xd2>\x02\x10\x03b\beditionsp\xe8\a"
|
||||
|
||||
var file_filters_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_filters_filters_proto_goTypes = []any{
|
||||
var file_proto_filters_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_proto_filters_filters_proto_goTypes = []any{
|
||||
(*IntFilter)(nil), // 0: tstor.filters.IntFilter
|
||||
(*IntList)(nil), // 1: tstor.filters.IntList
|
||||
}
|
||||
var file_filters_filters_proto_depIdxs = []int32{
|
||||
var file_proto_filters_filters_proto_depIdxs = []int32{
|
||||
1, // 0: tstor.filters.IntFilter.in:type_name -> tstor.filters.IntList
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
|
@ -435,12 +435,12 @@ var file_filters_filters_proto_depIdxs = []int32{
|
|||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_filters_filters_proto_init() }
|
||||
func file_filters_filters_proto_init() {
|
||||
if File_filters_filters_proto != nil {
|
||||
func init() { file_proto_filters_filters_proto_init() }
|
||||
func file_proto_filters_filters_proto_init() {
|
||||
if File_proto_filters_filters_proto != nil {
|
||||
return
|
||||
}
|
||||
file_filters_filters_proto_msgTypes[0].OneofWrappers = []any{
|
||||
file_proto_filters_filters_proto_msgTypes[0].OneofWrappers = []any{
|
||||
(*intFilter_Eq)(nil),
|
||||
(*intFilter_Gt)(nil),
|
||||
(*intFilter_Lt)(nil),
|
||||
|
@ -452,17 +452,17 @@ func file_filters_filters_proto_init() {
|
|||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_filters_filters_proto_rawDesc), len(file_filters_filters_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_filters_filters_proto_rawDesc), len(file_proto_filters_filters_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_filters_filters_proto_goTypes,
|
||||
DependencyIndexes: file_filters_filters_proto_depIdxs,
|
||||
MessageInfos: file_filters_filters_proto_msgTypes,
|
||||
GoTypes: file_proto_filters_filters_proto_goTypes,
|
||||
DependencyIndexes: file_proto_filters_filters_proto_depIdxs,
|
||||
MessageInfos: file_proto_filters_filters_proto_msgTypes,
|
||||
}.Build()
|
||||
File_filters_filters_proto = out.File
|
||||
file_filters_filters_proto_goTypes = nil
|
||||
file_filters_filters_proto_depIdxs = nil
|
||||
File_proto_filters_filters_proto = out.File
|
||||
file_proto_filters_filters_proto_goTypes = nil
|
||||
file_proto_filters_filters_proto_depIdxs = nil
|
||||
}
|
|
@ -2,9 +2,9 @@
|
|||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v6.30.2
|
||||
// source: tstor.proto
|
||||
// source: proto/tstor.proto
|
||||
|
||||
package pb
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
@ -33,7 +33,7 @@ type ListFilesRequest struct {
|
|||
|
||||
func (x *ListFilesRequest) Reset() {
|
||||
*x = ListFilesRequest{}
|
||||
mi := &file_tstor_proto_msgTypes[0]
|
||||
mi := &file_proto_tstor_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func (x *ListFilesRequest) String() string {
|
|||
func (*ListFilesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListFilesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[0]
|
||||
mi := &file_proto_tstor_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -110,7 +110,7 @@ type ListFilesResponse struct {
|
|||
|
||||
func (x *ListFilesResponse) Reset() {
|
||||
*x = ListFilesResponse{}
|
||||
mi := &file_tstor_proto_msgTypes[1]
|
||||
mi := &file_proto_tstor_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ func (x *ListFilesResponse) String() string {
|
|||
func (*ListFilesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListFilesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[1]
|
||||
mi := &file_proto_tstor_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -172,7 +172,7 @@ type GetFileInfoRequest struct {
|
|||
|
||||
func (x *GetFileInfoRequest) Reset() {
|
||||
*x = GetFileInfoRequest{}
|
||||
mi := &file_tstor_proto_msgTypes[2]
|
||||
mi := &file_proto_tstor_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ func (x *GetFileInfoRequest) String() string {
|
|||
func (*GetFileInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetFileInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[2]
|
||||
mi := &file_proto_tstor_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -248,7 +248,7 @@ type GetFileInfoResponse struct {
|
|||
|
||||
func (x *GetFileInfoResponse) Reset() {
|
||||
*x = GetFileInfoResponse{}
|
||||
mi := &file_tstor_proto_msgTypes[3]
|
||||
mi := &file_proto_tstor_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ func (x *GetFileInfoResponse) String() string {
|
|||
func (*GetFileInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetFileInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[3]
|
||||
mi := &file_proto_tstor_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -317,7 +317,7 @@ type UploadFileRequest struct {
|
|||
|
||||
func (x *UploadFileRequest) Reset() {
|
||||
*x = UploadFileRequest{}
|
||||
mi := &file_tstor_proto_msgTypes[4]
|
||||
mi := &file_proto_tstor_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ func (x *UploadFileRequest) String() string {
|
|||
func (*UploadFileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UploadFileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[4]
|
||||
mi := &file_proto_tstor_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -455,7 +455,7 @@ func (b0 UploadFileRequest_builder) Build() *UploadFileRequest {
|
|||
type case_UploadFileRequest_Data protoreflect.FieldNumber
|
||||
|
||||
func (x case_UploadFileRequest_Data) String() string {
|
||||
md := file_tstor_proto_msgTypes[4].Descriptor()
|
||||
md := file_proto_tstor_proto_msgTypes[4].Descriptor()
|
||||
if x == 0 {
|
||||
return "not set"
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ type UploadFileResponse struct {
|
|||
|
||||
func (x *UploadFileResponse) Reset() {
|
||||
*x = UploadFileResponse{}
|
||||
mi := &file_tstor_proto_msgTypes[5]
|
||||
mi := &file_proto_tstor_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ func (x *UploadFileResponse) String() string {
|
|||
func (*UploadFileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UploadFileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[5]
|
||||
mi := &file_proto_tstor_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -603,7 +603,7 @@ type FileInfo struct {
|
|||
|
||||
func (x *FileInfo) Reset() {
|
||||
*x = FileInfo{}
|
||||
mi := &file_tstor_proto_msgTypes[6]
|
||||
mi := &file_proto_tstor_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ func (x *FileInfo) String() string {
|
|||
func (*FileInfo) ProtoMessage() {}
|
||||
|
||||
func (x *FileInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[6]
|
||||
mi := &file_proto_tstor_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -801,7 +801,7 @@ type UploadFileRequest_Metadata struct {
|
|||
|
||||
func (x *UploadFileRequest_Metadata) Reset() {
|
||||
*x = UploadFileRequest_Metadata{}
|
||||
mi := &file_tstor_proto_msgTypes[7]
|
||||
mi := &file_proto_tstor_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ func (x *UploadFileRequest_Metadata) String() string {
|
|||
func (*UploadFileRequest_Metadata) ProtoMessage() {}
|
||||
|
||||
func (x *UploadFileRequest_Metadata) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tstor_proto_msgTypes[7]
|
||||
mi := &file_proto_tstor_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -868,11 +868,11 @@ func (b0 UploadFileRequest_Metadata_builder) Build() *UploadFileRequest_Metadata
|
|||
return m0
|
||||
}
|
||||
|
||||
var File_tstor_proto protoreflect.FileDescriptor
|
||||
var File_proto_tstor_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_tstor_proto_rawDesc = "" +
|
||||
const file_proto_tstor_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\vtstor.proto\x12\ftstor.server\x1a!google/protobuf/go_features.proto\"&\n" +
|
||||
"\x11proto/tstor.proto\x12\ftstor.server\x1a!google/protobuf/go_features.proto\"&\n" +
|
||||
"\x10ListFilesRequest\x12\x12\n" +
|
||||
"\x04path\x18\x01 \x01(\tR\x04path\"A\n" +
|
||||
"\x11ListFilesResponse\x12,\n" +
|
||||
|
@ -900,10 +900,10 @@ const file_tstor_proto_rawDesc = "" +
|
|||
"\tListFiles\x12\x1e.tstor.server.ListFilesRequest\x1a\x1f.tstor.server.ListFilesResponse\"\x00\x12T\n" +
|
||||
"\vGetFileInfo\x12 .tstor.server.GetFileInfoRequest\x1a!.tstor.server.GetFileInfoResponse\"\x00\x12S\n" +
|
||||
"\n" +
|
||||
"UploadFile\x12\x1f.tstor.server.UploadFileRequest\x1a .tstor.server.UploadFileResponse\"\x00(\x01BBZ8git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb\x92\x03\x05\xd2>\x02\x10\x03b\beditionsp\xe8\a"
|
||||
"UploadFile\x12\x1f.tstor.server.UploadFileRequest\x1a .tstor.server.UploadFileResponse\"\x00(\x01BEZ;git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto\x92\x03\x05\xd2>\x02\x10\x03b\beditionsp\xe8\a"
|
||||
|
||||
var file_tstor_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_tstor_proto_goTypes = []any{
|
||||
var file_proto_tstor_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_proto_tstor_proto_goTypes = []any{
|
||||
(*ListFilesRequest)(nil), // 0: tstor.server.ListFilesRequest
|
||||
(*ListFilesResponse)(nil), // 1: tstor.server.ListFilesResponse
|
||||
(*GetFileInfoRequest)(nil), // 2: tstor.server.GetFileInfoRequest
|
||||
|
@ -913,7 +913,7 @@ var file_tstor_proto_goTypes = []any{
|
|||
(*FileInfo)(nil), // 6: tstor.server.FileInfo
|
||||
(*UploadFileRequest_Metadata)(nil), // 7: tstor.server.UploadFileRequest.Metadata
|
||||
}
|
||||
var file_tstor_proto_depIdxs = []int32{
|
||||
var file_proto_tstor_proto_depIdxs = []int32{
|
||||
6, // 0: tstor.server.ListFilesResponse.files:type_name -> tstor.server.FileInfo
|
||||
6, // 1: tstor.server.GetFileInfoResponse.file:type_name -> tstor.server.FileInfo
|
||||
7, // 2: tstor.server.UploadFileRequest.metadata:type_name -> tstor.server.UploadFileRequest.Metadata
|
||||
|
@ -930,12 +930,12 @@ var file_tstor_proto_depIdxs = []int32{
|
|||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_tstor_proto_init() }
|
||||
func file_tstor_proto_init() {
|
||||
if File_tstor_proto != nil {
|
||||
func init() { file_proto_tstor_proto_init() }
|
||||
func file_proto_tstor_proto_init() {
|
||||
if File_proto_tstor_proto != nil {
|
||||
return
|
||||
}
|
||||
file_tstor_proto_msgTypes[4].OneofWrappers = []any{
|
||||
file_proto_tstor_proto_msgTypes[4].OneofWrappers = []any{
|
||||
(*uploadFileRequest_Metadata_)(nil),
|
||||
(*uploadFileRequest_Chunk)(nil),
|
||||
}
|
||||
|
@ -943,17 +943,17 @@ func file_tstor_proto_init() {
|
|||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tstor_proto_rawDesc), len(file_tstor_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_tstor_proto_rawDesc), len(file_proto_tstor_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tstor_proto_goTypes,
|
||||
DependencyIndexes: file_tstor_proto_depIdxs,
|
||||
MessageInfos: file_tstor_proto_msgTypes,
|
||||
GoTypes: file_proto_tstor_proto_goTypes,
|
||||
DependencyIndexes: file_proto_tstor_proto_depIdxs,
|
||||
MessageInfos: file_proto_tstor_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tstor_proto = out.File
|
||||
file_tstor_proto_goTypes = nil
|
||||
file_tstor_proto_depIdxs = nil
|
||||
File_proto_tstor_proto = out.File
|
||||
file_proto_tstor_proto_goTypes = nil
|
||||
file_proto_tstor_proto_depIdxs = nil
|
||||
}
|
|
@ -2,9 +2,9 @@
|
|||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.30.2
|
||||
// source: tstor.proto
|
||||
// source: proto/tstor.proto
|
||||
|
||||
package pb
|
||||
package proto
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
@ -79,7 +79,7 @@ func (c *tStorServiceClient) UploadFile(ctx context.Context, opts ...grpc.CallOp
|
|||
type TStorService_UploadFileClient = grpc.ClientStreamingClient[UploadFileRequest, UploadFileResponse]
|
||||
|
||||
// TStorServiceServer is the server API for TStorService service.
|
||||
// All implementations must embed UnimplementedTStorServiceServer
|
||||
// All implementations should embed UnimplementedTStorServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Main TStor service
|
||||
|
@ -89,10 +89,9 @@ type TStorServiceServer interface {
|
|||
GetFileInfo(context.Context, *GetFileInfoRequest) (*GetFileInfoResponse, error)
|
||||
// File upload operation
|
||||
UploadFile(grpc.ClientStreamingServer[UploadFileRequest, UploadFileResponse]) error
|
||||
mustEmbedUnimplementedTStorServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedTStorServiceServer must be embedded to have
|
||||
// UnimplementedTStorServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
|
@ -108,8 +107,7 @@ func (UnimplementedTStorServiceServer) GetFileInfo(context.Context, *GetFileInfo
|
|||
func (UnimplementedTStorServiceServer) UploadFile(grpc.ClientStreamingServer[UploadFileRequest, UploadFileResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method UploadFile not implemented")
|
||||
}
|
||||
func (UnimplementedTStorServiceServer) mustEmbedUnimplementedTStorServiceServer() {}
|
||||
func (UnimplementedTStorServiceServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedTStorServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTStorServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TStorServiceServer will
|
||||
|
@ -195,5 +193,5 @@ var TStorService_ServiceDesc = grpc.ServiceDesc{
|
|||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "tstor.proto",
|
||||
Metadata: "proto/tstor.proto",
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package server
|
||||
|
||||
import "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb"
|
||||
import "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto"
|
||||
|
||||
func New() *TStorServiceServer {
|
||||
return &TStorServiceServer{}
|
||||
}
|
||||
|
||||
type TStorServiceServer struct {
|
||||
pb.UnimplementedTStorServiceServer
|
||||
proto.UnimplementedTStorServiceServer
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/config"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/daemon"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/pb"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/proto"
|
||||
grpcserver "git.kmsign.ru/royalcat/tstor/server/src/delivery/grpc/server"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/vfs"
|
||||
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
|
||||
|
@ -44,7 +44,7 @@ func Run(cfg config.WebUi, vfs vfs.Filesystem, daemons []daemon.Daemon) error {
|
|||
|
||||
// Register the main service
|
||||
|
||||
pb.RegisterTStorServiceServer(grpcServer, grpcserver.New())
|
||||
proto.RegisterTStorServiceServer(grpcServer, grpcserver.New())
|
||||
|
||||
// Register all daemon services
|
||||
for _, dm := range daemons {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue