From 5128c7ab915a63c628063911e221c5b1b56e8334 Mon Sep 17 00:00:00 2001 From: MuZhou233 Date: Fri, 27 Dec 2024 01:17:48 +0800 Subject: [PATCH] feat: update proto to v0.4.25 --- app/mapper/cmd/mapper/main.go | 63 -- app/mapper/cmd/mapper/wire.go | 29 - app/mapper/cmd/mapper/wire_gen.go | 49 -- app/mapper/configs/config.yaml | 7 - app/mapper/internal/biz/biz.go | 6 - app/mapper/internal/biz/mapper.go | 68 --- app/mapper/internal/data/cayley.go | 267 --------- app/mapper/internal/data/data.go | 29 - app/mapper/internal/data/nebula.go | 89 --- app/mapper/internal/server/grpc.go | 37 -- app/mapper/internal/server/server.go | 8 - .../service/librarianmapperservice.go | 51 -- app/mapper/internal/service/service.go | 6 - app/mapper/internal/service/type_conv.go | 121 ---- app/mapper/pkg/service/service.go | 7 - app/mapper/pkg/service/wire.go | 21 - app/mapper/pkg/service/wire_gen.go | 39 -- app/searcher/cmd/searcher/main.go | 63 -- app/searcher/cmd/searcher/wire.go | 29 - app/searcher/cmd/searcher/wire_gen.go | 46 -- app/searcher/configs/config.yaml | 7 - app/searcher/internal/biz/biz.go | 6 - app/searcher/internal/biz/searcher.go | 72 --- app/searcher/internal/data/data.go | 76 --- app/searcher/internal/server/grpc.go | 41 -- app/searcher/internal/server/server.go | 8 - .../service/librariansearcherservice.go | 85 --- app/searcher/internal/service/service.go | 6 - app/searcher/internal/service/service_test.go | 65 -- app/searcher/internal/service/type_conv.go | 21 - app/searcher/pkg/service/service.go | 5 - app/searcher/pkg/service/wire.go | 20 - app/searcher/pkg/service/wire_gen.go | 38 -- app/sephirah/cmd/sephirah/main.go | 1 + app/sephirah/cmd/sephirah/wire.go | 5 + app/sephirah/cmd/sephirah/wire_gen.go | 34 +- .../internal/biz/bizangela/account.go | 2 +- app/sephirah/internal/biz/bizangela/angela.go | 31 +- app/sephirah/internal/biz/bizangela/app.go | 2 +- app/sephirah/internal/biz/bizangela/feed.go | 2 +- app/sephirah/internal/biz/bizangela/index.go | 8 +- app/sephirah/internal/biz/bizbinah/binah.go | 7 - app/sephirah/internal/biz/bizchesed/chesed.go | 29 +- app/sephirah/internal/biz/bizgebura/app.go | 2 +- .../internal/biz/bizgebura/app_info.go | 14 +- .../internal/biz/bizgebura/app_inst.go | 2 +- app/sephirah/internal/biz/bizgebura/gebura.go | 23 +- .../internal/biz/biznetzach/netzach.go | 16 +- .../internal/biz/biznetzach/system.go | 6 +- .../internal/biz/biztiphereth/account.go | 2 +- .../internal/biz/biztiphereth/porter.go | 4 +- .../internal/biz/biztiphereth/tiphereth.go | 33 +- .../internal/biz/biztiphereth/token.go | 4 +- .../internal/biz/biztiphereth/user.go | 4 +- .../internal/biz/bizyesod/collection.go | 2 +- .../internal/biz/bizyesod/feed_action.go | 2 +- .../internal/biz/bizyesod/feed_config.go | 2 +- app/sephirah/internal/biz/bizyesod/yesod.go | 25 +- app/sephirah/internal/client/client.go | 2 +- app/sephirah/internal/client/searcher.go | 79 --- .../data/internal/converter/generated.go | 3 +- .../internal/data/internal/ent/app.go | 13 +- .../internal/data/internal/ent/app/app.go | 8 + .../internal/data/internal/ent/app/where.go | 60 ++ .../internal/data/internal/ent/app_create.go | 73 +++ .../internal/data/internal/ent/app_update.go | 54 ++ .../data/internal/ent/migrate/schema.go | 5 +- .../internal/data/internal/ent/mutation.go | 94 ++- .../internal/data/internal/ent/runtime.go | 4 +- .../internal/data/internal/ent/schema/app.go | 3 + .../internal/model/converter/biz_to_pb.go | 4 +- .../internal/model/converter/generated.go | 34 +- .../internal/model/converter/pb_to_biz.go | 2 +- .../internal/model/modelgebura/modelgebura.go | 1 + app/sephirah/internal/service/gebura.go | 146 ++--- app/sephirah/pkg/service/wire.go | 7 +- app/sephirah/pkg/service/wire_gen.go | 26 +- cmd/librarian/main.go | 18 +- cmd/librarian/wire.go | 10 +- cmd/librarian/wire_gen.go | 32 +- go.mod | 29 +- go.sum | 562 +----------------- internal/client/client.go | 2 +- internal/client/grpc.go | 44 -- internal/conf/base.pb.go | 198 +++++- internal/conf/base.proto | 9 + internal/conf/librarian.pb.go | 177 +++--- internal/conf/librarian.proto | 11 +- internal/conf/mapper.pb.go | 500 ---------------- internal/conf/mapper.proto | 32 - internal/conf/miner.pb.go | 14 +- internal/conf/searcher.pb.go | 471 --------------- internal/conf/searcher.proto | 28 - internal/conf/sephirah.pb.go | 45 +- internal/conf/sephirah.proto | 1 + internal/inprocgrpc/inprocgrpc.go | 25 +- internal/lib/libidgenerator/libidgenerator.go | 45 ++ .../data => internal/lib/libsearch}/bleve.go | 27 +- .../lib/libsearch}/bleve_test.go | 24 +- internal/lib/libsearch/libsearch.go | 79 +++ .../data => internal/lib/libsearch}/meili.go | 34 +- tests/client/gebura.go | 5 + 102 files changed, 1032 insertions(+), 3755 deletions(-) delete mode 100644 app/mapper/cmd/mapper/main.go delete mode 100644 app/mapper/cmd/mapper/wire.go delete mode 100644 app/mapper/cmd/mapper/wire_gen.go delete mode 100644 app/mapper/configs/config.yaml delete mode 100644 app/mapper/internal/biz/biz.go delete mode 100644 app/mapper/internal/biz/mapper.go delete mode 100644 app/mapper/internal/data/cayley.go delete mode 100644 app/mapper/internal/data/data.go delete mode 100644 app/mapper/internal/data/nebula.go delete mode 100644 app/mapper/internal/server/grpc.go delete mode 100644 app/mapper/internal/server/server.go delete mode 100644 app/mapper/internal/service/librarianmapperservice.go delete mode 100644 app/mapper/internal/service/service.go delete mode 100644 app/mapper/internal/service/type_conv.go delete mode 100644 app/mapper/pkg/service/service.go delete mode 100644 app/mapper/pkg/service/wire.go delete mode 100644 app/mapper/pkg/service/wire_gen.go delete mode 100644 app/searcher/cmd/searcher/main.go delete mode 100644 app/searcher/cmd/searcher/wire.go delete mode 100644 app/searcher/cmd/searcher/wire_gen.go delete mode 100644 app/searcher/configs/config.yaml delete mode 100644 app/searcher/internal/biz/biz.go delete mode 100644 app/searcher/internal/biz/searcher.go delete mode 100644 app/searcher/internal/data/data.go delete mode 100644 app/searcher/internal/server/grpc.go delete mode 100644 app/searcher/internal/server/server.go delete mode 100644 app/searcher/internal/service/librariansearcherservice.go delete mode 100644 app/searcher/internal/service/service.go delete mode 100644 app/searcher/internal/service/service_test.go delete mode 100644 app/searcher/internal/service/type_conv.go delete mode 100644 app/searcher/pkg/service/service.go delete mode 100644 app/searcher/pkg/service/wire.go delete mode 100644 app/searcher/pkg/service/wire_gen.go delete mode 100644 app/sephirah/internal/client/searcher.go delete mode 100644 internal/conf/mapper.pb.go delete mode 100644 internal/conf/mapper.proto delete mode 100644 internal/conf/searcher.pb.go delete mode 100644 internal/conf/searcher.proto create mode 100644 internal/lib/libidgenerator/libidgenerator.go rename {app/searcher/internal/data => internal/lib/libsearch}/bleve.go (71%) rename {app/searcher/internal/data => internal/lib/libsearch}/bleve_test.go (80%) create mode 100644 internal/lib/libsearch/libsearch.go rename {app/searcher/internal/data => internal/lib/libsearch}/meili.go (63%) diff --git a/app/mapper/cmd/mapper/main.go b/app/mapper/cmd/mapper/main.go deleted file mode 100644 index 09a678a8..00000000 --- a/app/mapper/cmd/mapper/main.go +++ /dev/null @@ -1,63 +0,0 @@ -package main - -import ( - "os" - - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/go-kratos/kratos/v2" - "github.com/go-kratos/kratos/v2/registry" - "github.com/go-kratos/kratos/v2/transport/grpc" -) - -// go build -ldflags "-X main.version=x.y.z". -var ( - // name is the name of the compiled software. - name = "mapper" //nolint:gochecknoglobals //TODO - // version is the version of the compiled software. - version string - - id, _ = os.Hostname() //nolint:gochecknoglobals //TODO - - // date is the build date of the compiled software. - date string //nolint:gochecknoglobals //TODO - - // version is the proto version of the compiled software. - protoVersion string //nolint:gochecknoglobals //TODO -) - -func newApp(gs *grpc.Server, r registry.Registrar) *kratos.App { - return kratos.New( - kratos.ID(id+name), - kratos.Name(name), - kratos.Version(version), - kratos.Metadata(map[string]string{}), - kratos.Server(gs), - kratos.Registrar(r), - ) -} - -func main() { - appSettings, err := libapp.NewAppSettings(id, name, version, protoVersion, date) - if err != nil { - panic(err) - } - - var bc conf.Mapper - err = appSettings.LoadConfig(&bc) - if err != nil { - panic(err) - } - - app, cleanup, err := wireApp(bc.GetServer(), bc.GetData(), bc.GetConsul(), appSettings) - if err != nil { - panic(err) - } - defer cleanup() - - // start and wait for stop signal - if err = app.Run(); err != nil { - panic(err) - } -} diff --git a/app/mapper/cmd/mapper/wire.go b/app/mapper/cmd/mapper/wire.go deleted file mode 100644 index 703862f3..00000000 --- a/app/mapper/cmd/mapper/wire.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build wireinject - -// The build tag makes sure the stub is not built in the final build. - -package main - -import ( - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/app/mapper/internal/data" - "github.com/tuihub/librarian/app/mapper/internal/server" - "github.com/tuihub/librarian/app/mapper/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/go-kratos/kratos/v2" - "github.com/google/wire" -) - -// wireApp init kratos application. -func wireApp(*conf.Mapper_Server, *conf.Mapper_Data, *conf.Consul, *libapp.Settings) (*kratos.App, func(), error) { - panic(wire.Build( - server.ProviderSet, - data.ProviderSet, - biz.ProviderSet, - service.ProviderSet, - libapp.ProviderSet, - newApp, - )) -} diff --git a/app/mapper/cmd/mapper/wire_gen.go b/app/mapper/cmd/mapper/wire_gen.go deleted file mode 100644 index a2dff533..00000000 --- a/app/mapper/cmd/mapper/wire_gen.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by Wire. DO NOT EDIT. - -//go:generate go run -mod=mod github.com/google/wire/cmd/wire -//go:build !wireinject -// +build !wireinject - -package main - -import ( - "github.com/go-kratos/kratos/v2" - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/app/mapper/internal/data" - "github.com/tuihub/librarian/app/mapper/internal/server" - "github.com/tuihub/librarian/app/mapper/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" -) - -// Injectors from wire.go: - -// wireApp init kratos application. -func wireApp(mapper_Server *conf.Mapper_Server, mapper_Data *conf.Mapper_Data, consul *conf.Consul, settings *libapp.Settings) (*kratos.App, func(), error) { - db, cleanup := data.NewNebula(mapper_Data) - handle, cleanup2, err := data.NewCayley(mapper_Data, settings) - if err != nil { - cleanup() - return nil, nil, err - } - mapperRepo, err := data.NewMapperRepo(db, handle) - if err != nil { - cleanup2() - cleanup() - return nil, nil, err - } - mapper := biz.NewMapper(mapperRepo) - librarianMapperServiceServer := service.NewLibrarianMapperServiceService(mapper) - grpcServer := server.NewGRPCServer(mapper_Server, librarianMapperServiceServer, settings) - registrar, err := libapp.NewRegistrar(consul) - if err != nil { - cleanup2() - cleanup() - return nil, nil, err - } - app := newApp(grpcServer, registrar) - return app, func() { - cleanup2() - cleanup() - }, nil -} diff --git a/app/mapper/configs/config.yaml b/app/mapper/configs/config.yaml deleted file mode 100644 index 9057bc0a..00000000 --- a/app/mapper/configs/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -server: - grpc: - addr: 0.0.0.0:10001 - timeout: 1s -data: - cayley: - store: memory \ No newline at end of file diff --git a/app/mapper/internal/biz/biz.go b/app/mapper/internal/biz/biz.go deleted file mode 100644 index 83ce34ac..00000000 --- a/app/mapper/internal/biz/biz.go +++ /dev/null @@ -1,6 +0,0 @@ -package biz - -import "github.com/google/wire" - -// ProviderSet is biz providers. -var ProviderSet = wire.NewSet(NewMapper) diff --git a/app/mapper/internal/biz/mapper.go b/app/mapper/internal/biz/mapper.go deleted file mode 100644 index d6569f95..00000000 --- a/app/mapper/internal/biz/mapper.go +++ /dev/null @@ -1,68 +0,0 @@ -package biz - -import ( - "context" -) - -type Vertex struct { - ID int64 - Type VertexType -} - -type VertexType int - -const ( - VertexTypeUnspecified VertexType = iota - VertexTypeAbstract - VertexTypeEntity - VertexTypeMessage - VertexTypeObject - VertexTypeMetadata -) - -type Edge struct { - SourceID int64 - DestinationID int64 - Type EdgeType -} - -type EdgeType int - -const ( - EdgeTypeUnspecified EdgeType = iota - EdgeTypeGeneral - EdgeTypeEqual - EdgeTypeCreate - EdgeTypeEnjoy - EdgeTypeMention - EdgeTypeDerive - EdgeTypeControl - EdgeTypeFollow - EdgeTypeDescribe -) - -type MapperRepo interface { - InsertVertex(context.Context, []*Vertex) error - InsertEdge(context.Context, []*Edge) error - FetchEqualVertex(context.Context, Vertex) ([]*Vertex, error) -} - -type Mapper struct { - repo MapperRepo -} - -func NewMapper(repo MapperRepo) *Mapper { - return &Mapper{repo: repo} -} - -func (m *Mapper) InsertVertex(ctx context.Context, v []*Vertex) error { - return m.repo.InsertVertex(ctx, v) -} - -func (m *Mapper) InsertEdge(ctx context.Context, e []*Edge) error { - return m.repo.InsertEdge(ctx, e) -} - -func (m *Mapper) FetchEqualVertex(ctx context.Context, v Vertex) ([]*Vertex, error) { - return m.repo.FetchEqualVertex(ctx, v) -} diff --git a/app/mapper/internal/data/cayley.go b/app/mapper/internal/data/cayley.go deleted file mode 100644 index e95bc03f..00000000 --- a/app/mapper/internal/data/cayley.go +++ /dev/null @@ -1,267 +0,0 @@ -package data - -import ( - "context" - "fmt" - "os" - "path" - "strconv" - - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/cayleygraph/cayley" - "github.com/cayleygraph/cayley/graph" - "github.com/cayleygraph/cayley/schema" - "github.com/cayleygraph/quad" - "github.com/cayleygraph/quad/voc" - "github.com/go-kratos/kratos/v2/errors" - "github.com/go-kratos/kratos/v2/log" - - // Import sqlite to save graph to sqlite file. - _ "github.com/cayleygraph/cayley/graph/sql/sqlite" - // Import RDF vocabulary definitions to be able to expand IRIs like rdf:label. - _ "github.com/cayleygraph/quad/voc/core" -) - -type cayleyMapperRepo struct { - db *cayley.Handle -} - -type Vertex struct { - // dummy field to enforce all object to have a relation - rdfType struct{} `quad:"@type > ex:Vertex"` - ID quad.IRI `json:"@id"` - Type biz.VertexType `json:"ex:type"` - OriginalType biz.VertexType `json:"ex:oType"` -} - -// NewCayley . -func NewCayley(c *conf.Mapper_Data, app *libapp.Settings) (*cayley.Handle, func(), error) { - if c == nil || c.GetCayley() == nil { - return nil, func() {}, nil - } - var db *cayley.Handle - var err error - switch c.GetCayley().GetStore() { - case "memory": - db, err = cayley.NewMemoryGraph() - if err != nil { - return nil, func() {}, err - } - case "sqlite": - dbpath := path.Join(app.DataPath, "cayley.db") - _, err = os.Stat(dbpath) - if err != nil { - err = graph.InitQuadStore("sqlite", dbpath, nil) - if err != nil { - return nil, func() {}, err - } - } - db, err = cayley.NewGraph("sqlite", dbpath, nil) - if err != nil { - return nil, func() {}, err - } - default: - return nil, func() {}, err - } - - voc.RegisterPrefix("ex:", "github.com/tuihub/librarian") - - return db, func() { - log.Info("closing the data resources") - _ = db.Close() - }, nil -} - -func (r *cayleyMapperRepo) InsertVertex(ctx context.Context, vl []*biz.Vertex) error { - for _, v := range vl { - err := r.writeVertex(Vertex{ - rdfType: struct{}{}, - ID: toIRI(v.ID), - Type: v.Type, - OriginalType: v.Type, - }) - if err != nil { - return err - } - } - return nil -} - -func (r *cayleyMapperRepo) InsertEdge(ctx context.Context, el []*biz.Edge) error { - var q []quad.Quad - for _, e := range el { - src := Vertex{ - rdfType: struct{}{}, - ID: toIRI(e.SourceID), - Type: 0, - OriginalType: 0, - } - err := r.readVertex(ctx, &src) - if err != nil { - return err - } - dst := Vertex{ - rdfType: struct{}{}, - ID: toIRI(e.DestinationID), - Type: 0, - OriginalType: 0, - } - err = r.readVertex(ctx, &dst) - if err != nil { - return err - } - q = append(q, quad.MakeIRI(toString(e.SourceID), toString(e.Type), toString(e.DestinationID), toString(nil))) - q, err = r.applyEdgeRules(q, e.Type, src, dst) - if err != nil { - return err - } - } - return r.db.AddQuadSet(q) -} - -func (r *cayleyMapperRepo) FetchEqualVertex(ctx context.Context, v biz.Vertex) ([]*biz.Vertex, error) { - var res []*biz.Vertex - viewed := map[quad.IRI]bool{toIRI(v.ID): true} - waitingList, err := r.loadOutVertex(ctx, toIRI(v.ID), biz.EdgeTypeEqual) - if err != nil { - return nil, err - } - for i := 0; i < len(waitingList); i++ { - if viewed[waitingList[i].ID] { - continue - } - var id int64 - id, err = toBizID(waitingList[i].ID) - if err != nil { - return nil, err - } - res = append(res, &biz.Vertex{ - ID: id, - Type: waitingList[i].OriginalType, - }) - viewed[waitingList[i].ID] = true - var newList []Vertex - newList, err = r.loadOutVertex(ctx, waitingList[i].ID, biz.EdgeTypeEqual) - if err != nil { - return nil, err - } - waitingList = append(waitingList, newList...) - } - return res, nil -} - -func (r *cayleyMapperRepo) loadOutVertex(ctx context.Context, id quad.IRI, ty biz.EdgeType) ([]Vertex, error) { - p := cayley.StartPath(r.db, id).Out(toIRI(ty)) - var v []Vertex - err := schema.NewConfig().LoadPathTo(ctx, r.db, &v, p) - if err != nil { - return nil, err - } - return v, nil -} - -func (r *cayleyMapperRepo) applyEdgeRules( //nolint:gocognit // edge rule is complex - q []quad.Quad, - edgeType biz.EdgeType, - src, dst Vertex, -) ([]quad.Quad, error) { - if src.Type == biz.VertexTypeAbstract || dst.Type == biz.VertexTypeAbstract { - if edgeType == biz.EdgeTypeEqual { - err := r.handleAbstractEqual(&src, &dst) - if err != nil { - return nil, err - } - } - } - switch edgeType { - case biz.EdgeTypeUnspecified: - return nil, errors.BadRequest("Unsupported edge type", "") - case biz.EdgeTypeGeneral: - return nil, errors.BadRequest("Unsupported edge type", "") - case biz.EdgeTypeEqual: - if src.Type != dst.Type { - return nil, errors.BadRequest("illegal edge", "EQUAL must link vertex with same type") - } - q = append(q, quad.MakeIRI(string(dst.ID), toString(edgeType), string(src.ID), toString(nil))) - case biz.EdgeTypeCreate: - if src.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "CREATE must start at ENTITY") - } - case biz.EdgeTypeEnjoy: - if src.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "ENJOY must start at ENTITY") - } - case biz.EdgeTypeMention: - if src.Type != biz.VertexTypeMessage && src.Type != biz.VertexTypeObject { - return nil, errors.BadRequest("illegal edge", "MENTION must start at MESSAGE or OBJECT") - } - case biz.EdgeTypeDerive: - if src.Type != biz.VertexTypeObject { - return nil, errors.BadRequest("illegal edge", "DERIVE must start at OBJECT") - } - case biz.EdgeTypeControl: - if src.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "CONTROL must start at ENTITY") - } - if dst.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "CONTROL must end at ENTITY") - } - case biz.EdgeTypeFollow: - if src.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "FOLLOW must start at ENTITY") - } - if dst.Type != biz.VertexTypeEntity { - return nil, errors.BadRequest("illegal edge", "CONTROL must end at ENTITY") - } - case biz.EdgeTypeDescribe: - if src.Type != biz.VertexTypeMetadata { - return nil, errors.BadRequest("illegal edge", "DESCRIBE must start at METADATA") - } - default: - return nil, errors.BadRequest("Unsupported edge type", "") - } - return q, nil -} - -func (r *cayleyMapperRepo) writeVertex(v Vertex) error { - qw := graph.NewWriter(r.db) - _, err := schema.NewConfig().WriteAsQuads(qw, v) - _ = qw.Close() - return err -} - -func (r *cayleyMapperRepo) readVertex(ctx context.Context, v *Vertex) error { - return schema.NewConfig().LoadTo(ctx, r.db, v, v.ID) -} - -func (r *cayleyMapperRepo) handleAbstractEqual(src, dst *Vertex) error { - if src.Type == dst.Type { - return nil - } - if src.Type == biz.VertexTypeAbstract { - // TODO check exist edges - src.Type = dst.Type - return r.writeVertex(*src) - } - if dst.Type == biz.VertexTypeAbstract { - // TODO check exist edges - dst.Type = src.Type - return r.writeVertex(*dst) - } - return nil -} - -func toString(i interface{}) string { - return fmt.Sprint(i) -} - -func toIRI(i interface{}) quad.IRI { - return quad.IRI(fmt.Sprint(i)) -} - -func toBizID(id quad.IRI) (int64, error) { - return strconv.ParseInt(string(id), 10, 64) -} diff --git a/app/mapper/internal/data/data.go b/app/mapper/internal/data/data.go deleted file mode 100644 index 5cbe700d..00000000 --- a/app/mapper/internal/data/data.go +++ /dev/null @@ -1,29 +0,0 @@ -package data - -import ( - "errors" - - "github.com/tuihub/librarian/app/mapper/internal/biz" - - "github.com/cayleygraph/cayley" - "github.com/google/wire" - "github.com/zhihu/norm" -) - -// ProviderSet is data providers. -var ProviderSet = wire.NewSet(NewNebula, NewCayley, NewMapperRepo) - -// NewMapperRepo . -func NewMapperRepo(n *norm.DB, c *cayley.Handle) (biz.MapperRepo, error) { - if n != nil { - return &nebulaMapperRepo{ - db: n, - }, nil - } - if c != nil { - return &cayleyMapperRepo{ - db: c, - }, nil - } - return nil, errors.New("no valid db backend") -} diff --git a/app/mapper/internal/data/nebula.go b/app/mapper/internal/data/nebula.go deleted file mode 100644 index 0e55c0a4..00000000 --- a/app/mapper/internal/data/nebula.go +++ /dev/null @@ -1,89 +0,0 @@ -package data - -import ( - "context" - "time" - - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/logger" - - "github.com/zhihu/norm" - "github.com/zhihu/norm/dialectors" -) - -type nebulaMapperRepo struct { - db *norm.DB -} - -func (r *nebulaMapperRepo) InsertVertex(ctx context.Context, vertex []*biz.Vertex) error { - // TODO implement me - panic("implement me") -} - -func (r *nebulaMapperRepo) InsertEdge(ctx context.Context, edge []*biz.Edge) error { - // TODO implement me - panic("implement me") -} - -func (r *nebulaMapperRepo) FetchEqualVertex(ctx context.Context, vertices biz.Vertex) ([]*biz.Vertex, error) { - // TODO implement me - panic("implement me") -} - -// NewNebula . -func NewNebula(c *conf.Mapper_Data) (*norm.DB, func()) { - if c == nil || c.GetNebula() == nil { - return nil, func() {} - } - - dialector, err := dialectors.NewNebulaDialector(dialectors.DialectorConfig{ - Username: c.GetNebula().GetUsername(), - Password: c.GetNebula().GetPassword(), - Space: c.GetNebula().GetSpace(), - Timeout: time.Second * 5, //nolint:mnd //TODO - IdleTime: 0, - MaxConnPoolSize: 0, - MinConnPoolSize: 0, - Addresses: c.GetNebula().GetAddress(), - }) - if err != nil { - logger.Errorf("Failed to initialize Nebula Dialector, %s", err.Error()) - return nil, nil - } - - db, err := norm.Open( - dialector, - norm.Config{ - DebugMode: false, - }, - norm.WithLogger(NebulaLoggerWrapper{}), - ) - if err != nil { - logger.Errorf("Failed to initialize Nebula DB, %s", err.Error()) - return nil, nil - } - return db, func() { - logger.Info("closing the data resources") - db.Close() - dialector.Close() - } -} - -type NebulaLoggerWrapper struct{} - -func (l NebulaLoggerWrapper) Info(msg string) { - logger.Info(msg) -} - -func (l NebulaLoggerWrapper) Warn(msg string) { - logger.Warn(msg) -} - -func (l NebulaLoggerWrapper) Error(msg string) { - logger.Error(msg) -} - -func (l NebulaLoggerWrapper) Fatal(msg string) { - logger.Fatal(msg) -} diff --git a/app/mapper/internal/server/grpc.go b/app/mapper/internal/server/grpc.go deleted file mode 100644 index 0b173038..00000000 --- a/app/mapper/internal/server/grpc.go +++ /dev/null @@ -1,37 +0,0 @@ -package server - -import ( - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - pb "github.com/tuihub/protos/pkg/librarian/mapper/v1" - - "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/logging" - "github.com/go-kratos/kratos/v2/middleware/recovery" - "github.com/go-kratos/kratos/v2/transport/grpc" -) - -// NewGRPCServer new a gRPC server. -func NewGRPCServer(c *conf.Mapper_Server, service pb.LibrarianMapperServiceServer, app *libapp.Settings) *grpc.Server { - var middlewares = []middleware.Middleware{ - logging.Server(libapp.GetLogger()), - } - if app.EnablePanicRecovery { - middlewares = append(middlewares, recovery.Recovery()) - } - var opts = []grpc.ServerOption{ - grpc.Middleware(middlewares...), - } - if c.GetGrpc().GetNetwork() != "" { - opts = append(opts, grpc.Network(c.GetGrpc().GetNetwork())) - } - if c.GetGrpc().GetAddr() != "" { - opts = append(opts, grpc.Address(c.GetGrpc().GetAddr())) - } - if c.GetGrpc().GetTimeout() != nil { - opts = append(opts, grpc.Timeout(c.GetGrpc().GetTimeout().AsDuration())) - } - srv := grpc.NewServer(opts...) - pb.RegisterLibrarianMapperServiceServer(srv, service) - return srv -} diff --git a/app/mapper/internal/server/server.go b/app/mapper/internal/server/server.go deleted file mode 100644 index b5aa82c1..00000000 --- a/app/mapper/internal/server/server.go +++ /dev/null @@ -1,8 +0,0 @@ -package server - -import ( - "github.com/google/wire" -) - -// ProviderSet is server providers. -var ProviderSet = wire.NewSet(NewGRPCServer) diff --git a/app/mapper/internal/service/librarianmapperservice.go b/app/mapper/internal/service/librarianmapperservice.go deleted file mode 100644 index ab2b3160..00000000 --- a/app/mapper/internal/service/librarianmapperservice.go +++ /dev/null @@ -1,51 +0,0 @@ -package service - -import ( - "context" - - "github.com/tuihub/librarian/app/mapper/internal/biz" - pb "github.com/tuihub/protos/pkg/librarian/mapper/v1" -) - -type LibrarianMapperServiceService struct { - pb.UnimplementedLibrarianMapperServiceServer - - m *biz.Mapper -} - -func NewLibrarianMapperServiceService(m *biz.Mapper) pb.LibrarianMapperServiceServer { - return &LibrarianMapperServiceService{ - UnimplementedLibrarianMapperServiceServer: pb.UnimplementedLibrarianMapperServiceServer{}, - m: m, - } -} - -func (s *LibrarianMapperServiceService) InsertVertex(ctx context.Context, req *pb.InsertVertexRequest) ( - *pb.InsertVertexResponse, error) { - err := s.m.InsertVertex(ctx, toBizVertexList(req.GetVertexList())) - if err != nil { - return nil, err - } - return &pb.InsertVertexResponse{}, nil -} -func (s *LibrarianMapperServiceService) InsertEdge(ctx context.Context, req *pb.InsertEdgeRequest) ( - *pb.InsertEdgeResponse, error) { - err := s.m.InsertEdge(ctx, toBizEdgeList(req.GetEdgeList())) - if err != nil { - return nil, err - } - return &pb.InsertEdgeResponse{}, nil -} -func (s *LibrarianMapperServiceService) FetchEqualVertex(ctx context.Context, req *pb.FetchEqualVertexRequest) ( - *pb.FetchEqualVertexResponse, error) { - vl, err := s.m.FetchEqualVertex(ctx, biz.Vertex{ - ID: req.GetSrcVid(), - Type: 0, - }) - if err != nil { - return nil, err - } - return &pb.FetchEqualVertexResponse{ - VertexList: toPBVertexList(vl), - }, nil -} diff --git a/app/mapper/internal/service/service.go b/app/mapper/internal/service/service.go deleted file mode 100644 index cfe3c220..00000000 --- a/app/mapper/internal/service/service.go +++ /dev/null @@ -1,6 +0,0 @@ -package service - -import "github.com/google/wire" - -// ProviderSet is service providers. -var ProviderSet = wire.NewSet(NewLibrarianMapperServiceService) diff --git a/app/mapper/internal/service/type_conv.go b/app/mapper/internal/service/type_conv.go deleted file mode 100644 index 340b1fac..00000000 --- a/app/mapper/internal/service/type_conv.go +++ /dev/null @@ -1,121 +0,0 @@ -package service - -import ( - "github.com/tuihub/librarian/app/mapper/internal/biz" - pb "github.com/tuihub/protos/pkg/librarian/mapper/v1" -) - -func toBizVertexType(t pb.VertexType) biz.VertexType { - switch t { - case pb.VertexType_VERTEX_TYPE_UNSPECIFIED: - return biz.VertexTypeUnspecified - case pb.VertexType_VERTEX_TYPE_ABSTRACT: - return biz.VertexTypeAbstract - case pb.VertexType_VERTEX_TYPE_ENTITY: - return biz.VertexTypeEntity - case pb.VertexType_VERTEX_TYPE_MESSAGE: - return biz.VertexTypeMessage - case pb.VertexType_VERTEX_TYPE_OBJECT: - return biz.VertexTypeObject - case pb.VertexType_VERTEX_TYPE_METADATA: - return biz.VertexTypeMetadata - default: - return biz.VertexTypeUnspecified - } -} - -func toPBVertexType(t biz.VertexType) pb.VertexType { - switch t { - case biz.VertexTypeUnspecified: - return pb.VertexType_VERTEX_TYPE_UNSPECIFIED - case biz.VertexTypeAbstract: - return pb.VertexType_VERTEX_TYPE_ABSTRACT - case biz.VertexTypeEntity: - return pb.VertexType_VERTEX_TYPE_ENTITY - case biz.VertexTypeMessage: - return pb.VertexType_VERTEX_TYPE_MESSAGE - case biz.VertexTypeObject: - return pb.VertexType_VERTEX_TYPE_OBJECT - case biz.VertexTypeMetadata: - return pb.VertexType_VERTEX_TYPE_METADATA - default: - return pb.VertexType_VERTEX_TYPE_UNSPECIFIED - } -} - -func toBizEdgeType(t pb.EdgeType) biz.EdgeType { - switch t { - case pb.EdgeType_EDGE_TYPE_UNSPECIFIED: - return biz.EdgeTypeUnspecified - case pb.EdgeType_EDGE_TYPE_GENERAL: - return biz.EdgeTypeGeneral - case pb.EdgeType_EDGE_TYPE_EQUAL: - return biz.EdgeTypeEqual - case pb.EdgeType_EDGE_TYPE_CREATE: - return biz.EdgeTypeCreate - case pb.EdgeType_EDGE_TYPE_ENJOY: - return biz.EdgeTypeEnjoy - case pb.EdgeType_EDGE_TYPE_MENTION: - return biz.EdgeTypeMention - case pb.EdgeType_EDGE_TYPE_DERIVE: - return biz.EdgeTypeDerive - case pb.EdgeType_EDGE_TYPE_CONTROL: - return biz.EdgeTypeControl - case pb.EdgeType_EDGE_TYPE_FOLLOW: - return biz.EdgeTypeFollow - case pb.EdgeType_EDGE_TYPE_DESCRIBE: - return biz.EdgeTypeDescribe - default: - return biz.EdgeTypeUnspecified - } -} - -func toBizVertex(v *pb.Vertex) biz.Vertex { - return biz.Vertex{ - ID: v.GetVid(), - Type: toBizVertexType(v.GetType()), - } -} - -func toBizVertexList(vl []*pb.Vertex) []*biz.Vertex { - res := make([]*biz.Vertex, len(vl)) - for i, v := range vl { - r := toBizVertex(v) - res[i] = &r - } - return res -} - -func toPBVertex(v biz.Vertex) pb.Vertex { - return pb.Vertex{ - Vid: v.ID, - Type: toPBVertexType(v.Type), - Prop: nil, - } -} - -func toPBVertexList(vl []*biz.Vertex) []*pb.Vertex { - res := make([]*pb.Vertex, len(vl)) - for i, v := range vl { - r := toPBVertex(*v) - res[i] = &r - } - return res -} - -func toBizEdge(e *pb.Edge) biz.Edge { - return biz.Edge{ - SourceID: e.GetSrcVid(), - DestinationID: e.GetDstVid(), - Type: toBizEdgeType(e.GetType()), - } -} - -func toBizEdgeList(el []*pb.Edge) []*biz.Edge { - res := make([]*biz.Edge, len(el)) - for i, e := range el { - r := toBizEdge(e) - res[i] = &r - } - return res -} diff --git a/app/mapper/pkg/service/service.go b/app/mapper/pkg/service/service.go deleted file mode 100644 index 6a205d1c..00000000 --- a/app/mapper/pkg/service/service.go +++ /dev/null @@ -1,7 +0,0 @@ -package service - -import ( - "github.com/google/wire" -) - -var ProviderSet = wire.NewSet(NewMapperService) diff --git a/app/mapper/pkg/service/wire.go b/app/mapper/pkg/service/wire.go deleted file mode 100644 index fafd0201..00000000 --- a/app/mapper/pkg/service/wire.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build wireinject - -// The build tag makes sure the stub is not built in the final build. - -package service - -import ( - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/app/mapper/internal/data" - "github.com/tuihub/librarian/app/mapper/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - pb "github.com/tuihub/protos/pkg/librarian/mapper/v1" - - "github.com/google/wire" -) - -func NewMapperService(*conf.Mapper_Data, *libapp.Settings) (pb.LibrarianMapperServiceServer, func(), error) { - panic(wire.Build(data.ProviderSet, biz.ProviderSet, service.ProviderSet)) -} diff --git a/app/mapper/pkg/service/wire_gen.go b/app/mapper/pkg/service/wire_gen.go deleted file mode 100644 index 9adc20c4..00000000 --- a/app/mapper/pkg/service/wire_gen.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by Wire. DO NOT EDIT. - -//go:generate go run -mod=mod github.com/google/wire/cmd/wire -//go:build !wireinject -// +build !wireinject - -package service - -import ( - "github.com/tuihub/librarian/app/mapper/internal/biz" - "github.com/tuihub/librarian/app/mapper/internal/data" - "github.com/tuihub/librarian/app/mapper/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - "github.com/tuihub/protos/pkg/librarian/mapper/v1" -) - -// Injectors from wire.go: - -func NewMapperService(mapper_Data *conf.Mapper_Data, settings *libapp.Settings) (v1.LibrarianMapperServiceServer, func(), error) { - db, cleanup := data.NewNebula(mapper_Data) - handle, cleanup2, err := data.NewCayley(mapper_Data, settings) - if err != nil { - cleanup() - return nil, nil, err - } - mapperRepo, err := data.NewMapperRepo(db, handle) - if err != nil { - cleanup2() - cleanup() - return nil, nil, err - } - mapper := biz.NewMapper(mapperRepo) - librarianMapperServiceServer := service.NewLibrarianMapperServiceService(mapper) - return librarianMapperServiceServer, func() { - cleanup2() - cleanup() - }, nil -} diff --git a/app/searcher/cmd/searcher/main.go b/app/searcher/cmd/searcher/main.go deleted file mode 100644 index 34be54b3..00000000 --- a/app/searcher/cmd/searcher/main.go +++ /dev/null @@ -1,63 +0,0 @@ -package main - -import ( - "os" - - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/go-kratos/kratos/v2" - "github.com/go-kratos/kratos/v2/registry" - "github.com/go-kratos/kratos/v2/transport/grpc" -) - -// go build -ldflags "-X main.version=x.y.z". -var ( - // name is the name of the compiled software. - name = "searcher" //nolint:gochecknoglobals //TODO - // version is the version of the compiled software. - version string - - id, _ = os.Hostname() //nolint:gochecknoglobals //TODO - - // date is the build date of the compiled software. - date string //nolint:gochecknoglobals //TODO - - // version is the proto version of the compiled software. - protoVersion string //nolint:gochecknoglobals //TODO -) - -func newApp(gs *grpc.Server, r registry.Registrar) *kratos.App { - return kratos.New( - kratos.ID(id+name), - kratos.Name(name), - kratos.Version(version), - kratos.Metadata(map[string]string{}), - kratos.Server(gs), - kratos.Registrar(r), - ) -} - -func main() { - appSettings, err := libapp.NewAppSettings(id, name, version, protoVersion, date) - if err != nil { - panic(err) - } - - var bc conf.Searcher - err = appSettings.LoadConfig(&bc) - if err != nil { - panic(err) - } - - app, cleanup, err := wireApp(bc.GetServer(), bc.GetData(), bc.GetConsul(), appSettings) - if err != nil { - panic(err) - } - defer cleanup() - - // start and wait for stop signal - if err = app.Run(); err != nil { - panic(err) - } -} diff --git a/app/searcher/cmd/searcher/wire.go b/app/searcher/cmd/searcher/wire.go deleted file mode 100644 index 976e20c2..00000000 --- a/app/searcher/cmd/searcher/wire.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build wireinject - -// The build tag makes sure the stub is not built in the final build. - -package main - -import ( - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/data" - "github.com/tuihub/librarian/app/searcher/internal/server" - "github.com/tuihub/librarian/app/searcher/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/go-kratos/kratos/v2" - "github.com/google/wire" -) - -// wireApp init kratos application. -func wireApp(*conf.Searcher_Server, *conf.Searcher_Data, *conf.Consul, *libapp.Settings) (*kratos.App, func(), error) { - panic(wire.Build( - server.ProviderSet, - data.ProviderSet, - biz.ProviderSet, - service.ProviderSet, - libapp.ProviderSet, - newApp, - )) -} diff --git a/app/searcher/cmd/searcher/wire_gen.go b/app/searcher/cmd/searcher/wire_gen.go deleted file mode 100644 index 164c98f3..00000000 --- a/app/searcher/cmd/searcher/wire_gen.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by Wire. DO NOT EDIT. - -//go:generate go run -mod=mod github.com/google/wire/cmd/wire -//go:build !wireinject -// +build !wireinject - -package main - -import ( - "github.com/go-kratos/kratos/v2" - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/data" - "github.com/tuihub/librarian/app/searcher/internal/server" - "github.com/tuihub/librarian/app/searcher/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" -) - -// Injectors from wire.go: - -// wireApp init kratos application. -func wireApp(searcher_Server *conf.Searcher_Server, searcher_Data *conf.Searcher_Data, consul *conf.Consul, settings *libapp.Settings) (*kratos.App, func(), error) { - v, err := data.NewBleve(searcher_Data, settings) - if err != nil { - return nil, nil, err - } - serviceManager, err := data.NewMeili(searcher_Data, settings) - if err != nil { - return nil, nil, err - } - sonyflake := data.NewSnowFlake() - searcherRepo, err := data.NewSearcherRepo(v, serviceManager, sonyflake) - if err != nil { - return nil, nil, err - } - searcher := biz.NewSearcher(searcherRepo) - librarianSearcherServiceServer := service.NewLibrarianSearcherServiceService(searcher) - grpcServer := server.NewGRPCServer(searcher_Server, librarianSearcherServiceServer, settings) - registrar, err := libapp.NewRegistrar(consul) - if err != nil { - return nil, nil, err - } - app := newApp(grpcServer, registrar) - return app, func() { - }, nil -} diff --git a/app/searcher/configs/config.yaml b/app/searcher/configs/config.yaml deleted file mode 100644 index 42a13d89..00000000 --- a/app/searcher/configs/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -server: - grpc: - addr: 0.0.0.0:10002 - timeout: 1s -data: - bleve: - enable: \ No newline at end of file diff --git a/app/searcher/internal/biz/biz.go b/app/searcher/internal/biz/biz.go deleted file mode 100644 index d357d654..00000000 --- a/app/searcher/internal/biz/biz.go +++ /dev/null @@ -1,6 +0,0 @@ -package biz - -import "github.com/google/wire" - -// ProviderSet is biz providers. -var ProviderSet = wire.NewSet(NewSearcher) diff --git a/app/searcher/internal/biz/searcher.go b/app/searcher/internal/biz/searcher.go deleted file mode 100644 index e020ce27..00000000 --- a/app/searcher/internal/biz/searcher.go +++ /dev/null @@ -1,72 +0,0 @@ -package biz - -import ( - "context" - - "github.com/tuihub/librarian/internal/model" -) - -type SearcherRepo interface { - NewID(context.Context) (int64, error) - DescribeID(context.Context, model.InternalID, Index, bool, string) error - SearchID(context.Context, Index, model.Paging, string) ([]*SearchResult, error) -} - -type Searcher struct { - repo SearcherRepo -} - -type SearchResult struct { - ID model.InternalID - Rank int64 -} - -type Index int - -const ( - IndexUnspecified Index = iota - IndexGeneral - IndexGeburaApp - IndexChesedImage -) - -func IndexNameMap() map[Index]string { - return map[Index]string{ - IndexUnspecified: "", - IndexGeneral: "general", - IndexGeburaApp: "gebura", - IndexChesedImage: "chesed", - } -} - -func NewSearcher(repo SearcherRepo) *Searcher { - return &Searcher{repo: repo} -} - -func (g *Searcher) NewID(ctx context.Context) (int64, error) { - return g.repo.NewID(ctx) -} - -func (g *Searcher) NewBatchIDs(ctx context.Context, num int) ([]int64, error) { - var res []int64 - for range num { - id, err := g.repo.NewID(ctx) - if err != nil { - return nil, err - } - res = append(res, id) - } - return res, nil -} - -func (g *Searcher) DescribeID( - ctx context.Context, id model.InternalID, index Index, append_ bool, description string, -) error { - return g.repo.DescribeID(ctx, id, index, append_, description) -} - -func (g *Searcher) SearchID( - ctx context.Context, paging model.Paging, index Index, query string, -) ([]*SearchResult, error) { - return g.repo.SearchID(ctx, index, paging, query) -} diff --git a/app/searcher/internal/data/data.go b/app/searcher/internal/data/data.go deleted file mode 100644 index fc459101..00000000 --- a/app/searcher/internal/data/data.go +++ /dev/null @@ -1,76 +0,0 @@ -package data - -import ( - "context" - "time" - - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/internal/lib/logger" - "github.com/tuihub/librarian/internal/model" - - "github.com/blevesearch/bleve/v2" - "github.com/google/wire" - "github.com/meilisearch/meilisearch-go" - "github.com/sony/sonyflake" -) - -// ProviderSet is data providers. -var ProviderSet = wire.NewSet(NewSearcherRepo, NewSnowFlake, NewBleve, NewMeili) - -func NewSearcherRepo( - b map[biz.Index]bleve.Index, m meilisearch.ServiceManager, sf *sonyflake.Sonyflake, -) (biz.SearcherRepo, error) { - if m != nil { - return &meiliSearcherRepo{ - sf: sf, - search: m, - }, nil - } - if b != nil { - return &bleveSearcherRepo{ - sf: sf, - search: b, - }, nil - } - logger.Warnf("no valid search backend, search function will not work") - return &defaultSearcherRepo{sf: sf}, nil -} - -type defaultSearcherRepo struct { - sf *sonyflake.Sonyflake -} - -func (d defaultSearcherRepo) DescribeID( - context.Context, model.InternalID, biz.Index, bool, string) error { - return nil // search disabled -} - -func (d defaultSearcherRepo) SearchID( - context.Context, biz.Index, model.Paging, string) ([]*biz.SearchResult, error) { - return nil, nil // search disabled -} - -func NewSnowFlake() *sonyflake.Sonyflake { - return sonyflake.NewSonyflake(sonyflake.Settings{ - StartTime: time.Time{}, - MachineID: func() (uint16, error) { // TODO - return 0, nil - }, - CheckMachineID: nil, - }) -} - -func (d defaultSearcherRepo) NewID(ctx context.Context) (int64, error) { - id, err := d.sf.NextID() - return int64(id), err //nolint:gosec // safe -} - -func (r *bleveSearcherRepo) NewID(ctx context.Context) (int64, error) { - id, err := r.sf.NextID() - return int64(id), err //nolint:gosec // safe -} - -func (m *meiliSearcherRepo) NewID(ctx context.Context) (int64, error) { - id, err := m.sf.NextID() - return int64(id), err //nolint:gosec // safe -} diff --git a/app/searcher/internal/server/grpc.go b/app/searcher/internal/server/grpc.go deleted file mode 100644 index 0f200b37..00000000 --- a/app/searcher/internal/server/grpc.go +++ /dev/null @@ -1,41 +0,0 @@ -package server - -import ( - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - pb "github.com/tuihub/protos/pkg/librarian/searcher/v1" - - "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/logging" - "github.com/go-kratos/kratos/v2/middleware/recovery" - "github.com/go-kratos/kratos/v2/transport/grpc" -) - -// NewGRPCServer new a gRPC server. -func NewGRPCServer( - c *conf.Searcher_Server, - greeter pb.LibrarianSearcherServiceServer, - app *libapp.Settings, -) *grpc.Server { - var middlewares = []middleware.Middleware{ - logging.Server(libapp.GetLogger()), - } - if app.EnablePanicRecovery { - middlewares = append(middlewares, recovery.Recovery()) - } - var opts = []grpc.ServerOption{ - grpc.Middleware(middlewares...), - } - if c.GetGrpc().GetNetwork() != "" { - opts = append(opts, grpc.Network(c.GetGrpc().GetNetwork())) - } - if c.GetGrpc().GetAddr() != "" { - opts = append(opts, grpc.Address(c.GetGrpc().GetAddr())) - } - if c.GetGrpc().GetTimeout() != nil { - opts = append(opts, grpc.Timeout(c.GetGrpc().GetTimeout().AsDuration())) - } - srv := grpc.NewServer(opts...) - pb.RegisterLibrarianSearcherServiceServer(srv, greeter) - return srv -} diff --git a/app/searcher/internal/server/server.go b/app/searcher/internal/server/server.go deleted file mode 100644 index b5aa82c1..00000000 --- a/app/searcher/internal/server/server.go +++ /dev/null @@ -1,8 +0,0 @@ -package server - -import ( - "github.com/google/wire" -) - -// ProviderSet is server providers. -var ProviderSet = wire.NewSet(NewGRPCServer) diff --git a/app/searcher/internal/service/librariansearcherservice.go b/app/searcher/internal/service/librariansearcherservice.go deleted file mode 100644 index 613545be..00000000 --- a/app/searcher/internal/service/librariansearcherservice.go +++ /dev/null @@ -1,85 +0,0 @@ -package service - -import ( - "context" - - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/internal/model" - pb "github.com/tuihub/protos/pkg/librarian/searcher/v1" - librarian "github.com/tuihub/protos/pkg/librarian/v1" -) - -type LibrarianSearcherServiceService struct { - pb.UnimplementedLibrarianSearcherServiceServer - - uc *biz.Searcher -} - -func NewLibrarianSearcherServiceService(uc *biz.Searcher) pb.LibrarianSearcherServiceServer { - return &LibrarianSearcherServiceService{ - UnimplementedLibrarianSearcherServiceServer: pb.UnimplementedLibrarianSearcherServiceServer{}, - uc: uc, - } -} - -func (s *LibrarianSearcherServiceService) NewID(ctx context.Context, req *pb.NewIDRequest) ( - *pb.NewIDResponse, error) { - id, err := s.uc.NewID(ctx) - if err != nil { - return nil, err - } - return &pb.NewIDResponse{ - Id: &librarian.InternalID{Id: id}, - }, nil -} -func (s *LibrarianSearcherServiceService) NewBatchIDs(ctx context.Context, req *pb.NewBatchIDsRequest) ( - *pb.NewBatchIDsResponse, error) { - ids, err := s.uc.NewBatchIDs(ctx, int(req.GetNum())) - if err != nil { - return nil, err - } - res := make([]*librarian.InternalID, len(ids)) - for i, id := range ids { - res[i] = &librarian.InternalID{ - Id: id, - } - } - return &pb.NewBatchIDsResponse{Ids: res}, nil -} -func (s *LibrarianSearcherServiceService) DescribeID(ctx context.Context, req *pb.DescribeIDRequest) ( - *pb.DescribeIDResponse, error) { - err := s.uc.DescribeID( - ctx, - model.InternalID(req.GetId().GetId()), - toBizIndex(req.GetIndex()), - req.GetMode() == pb.DescribeIDRequest_DESCRIBE_MODE_APPEND, - req.GetDescription(), - ) - if err != nil { - return nil, err - } - return &pb.DescribeIDResponse{}, nil -} -func (s *LibrarianSearcherServiceService) SearchID(ctx context.Context, req *pb.SearchIDRequest) ( - *pb.SearchIDResponse, error) { - res, err := s.uc.SearchID( - ctx, - model.ToBizPaging(req.GetPaging()), - toBizIndex(req.GetIndex()), - req.GetQuery(), - ) - if err != nil { - return nil, err - } - result := make([]*pb.SearchIDResponse_Result, len(res)) - for i := range res { - result[i] = &pb.SearchIDResponse_Result{ - Id: &librarian.InternalID{Id: int64(res[i].ID)}, - Rank: res[i].Rank, - } - } - return &pb.SearchIDResponse{ - Paging: nil, - Result: result, - }, nil -} diff --git a/app/searcher/internal/service/service.go b/app/searcher/internal/service/service.go deleted file mode 100644 index 8a6a9d34..00000000 --- a/app/searcher/internal/service/service.go +++ /dev/null @@ -1,6 +0,0 @@ -package service - -import "github.com/google/wire" - -// ProviderSet is service providers. -var ProviderSet = wire.NewSet(NewLibrarianSearcherServiceService) diff --git a/app/searcher/internal/service/service_test.go b/app/searcher/internal/service/service_test.go deleted file mode 100644 index 1ac8fefe..00000000 --- a/app/searcher/internal/service/service_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package service_test - -import ( - "context" - "errors" - "testing" - - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/service" - "github.com/tuihub/librarian/internal/model" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -type mockedSearcherRepo struct { - mock.Mock -} - -func (m *mockedSearcherRepo) NewID(ctx context.Context) (int64, error) { - args := m.Called(ctx) - return args.Get(0).(int64), args.Error(1) -} - -func (m *mockedSearcherRepo) DescribeID( - ctx context.Context, id model.InternalID, index biz.Index, b bool, s string, -) error { - // TODO implement me - panic("implement me") -} - -func (m *mockedSearcherRepo) SearchID( - ctx context.Context, index biz.Index, p model.Paging, s string, -) ([]*biz.SearchResult, error) { - // TODO implement me - panic("implement me") -} - -func TestLibrarianSearcherServiceService_NewID(t *testing.T) { - m := mockedSearcherRepo{ - Mock: mock.Mock{ - ExpectedCalls: nil, - Calls: nil, - }, - } - s := service.NewLibrarianSearcherServiceService(biz.NewSearcher(&m)) - - mc := m.On("NewID", context.Background()).Return((int64)(123), nil) - id, err := s.NewID(context.Background(), &searcher.NewIDRequest{}) - m.AssertExpectations(t) - require.NoError(t, err) - if assert.NotNil(t, id) { - assert.Equal(t, (int64)(123), id.GetId().GetId()) - } - mc.Unset() - - e := errors.New("test error") - m.On("NewID", context.Background()).Return((int64)(0), e) - id, err = s.NewID(context.Background(), &searcher.NewIDRequest{}) - m.AssertExpectations(t) - assert.Equal(t, err, e) - assert.Nil(t, id) -} diff --git a/app/searcher/internal/service/type_conv.go b/app/searcher/internal/service/type_conv.go deleted file mode 100644 index a227072b..00000000 --- a/app/searcher/internal/service/type_conv.go +++ /dev/null @@ -1,21 +0,0 @@ -package service - -import ( - "github.com/tuihub/librarian/app/searcher/internal/biz" - pb "github.com/tuihub/protos/pkg/librarian/searcher/v1" -) - -func toBizIndex(index pb.Index) biz.Index { - switch index { - case pb.Index_INDEX_UNSPECIFIED: - return biz.IndexUnspecified - case pb.Index_INDEX_GENERAL: - return biz.IndexGeneral - case pb.Index_INDEX_GEBURA_APP: - return biz.IndexGeburaApp - case pb.Index_INDEX_CHESED_IMAGE: - return biz.IndexChesedImage - default: - return biz.IndexUnspecified - } -} diff --git a/app/searcher/pkg/service/service.go b/app/searcher/pkg/service/service.go deleted file mode 100644 index 16b3af84..00000000 --- a/app/searcher/pkg/service/service.go +++ /dev/null @@ -1,5 +0,0 @@ -package service - -import "github.com/google/wire" - -var ProviderSet = wire.NewSet(NewSearcherService) diff --git a/app/searcher/pkg/service/wire.go b/app/searcher/pkg/service/wire.go deleted file mode 100644 index a4caafb9..00000000 --- a/app/searcher/pkg/service/wire.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build wireinject - -// The build tag makes sure the stub is not built in the final build. - -package service - -import ( - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/data" - "github.com/tuihub/librarian/app/searcher/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - - "github.com/google/wire" - pb "github.com/tuihub/protos/pkg/librarian/searcher/v1" -) - -func NewSearcherService(*conf.Searcher_Data, *libapp.Settings) (pb.LibrarianSearcherServiceServer, func(), error) { - panic(wire.Build(data.ProviderSet, biz.ProviderSet, service.ProviderSet)) -} diff --git a/app/searcher/pkg/service/wire_gen.go b/app/searcher/pkg/service/wire_gen.go deleted file mode 100644 index 725674cf..00000000 --- a/app/searcher/pkg/service/wire_gen.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by Wire. DO NOT EDIT. - -//go:generate go run -mod=mod github.com/google/wire/cmd/wire -//go:build !wireinject -// +build !wireinject - -package service - -import ( - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/data" - "github.com/tuihub/librarian/app/searcher/internal/service" - "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" - "github.com/tuihub/protos/pkg/librarian/searcher/v1" -) - -// Injectors from wire.go: - -func NewSearcherService(searcher_Data *conf.Searcher_Data, settings *libapp.Settings) (v1.LibrarianSearcherServiceServer, func(), error) { - v, err := data.NewBleve(searcher_Data, settings) - if err != nil { - return nil, nil, err - } - serviceManager, err := data.NewMeili(searcher_Data, settings) - if err != nil { - return nil, nil, err - } - sonyflake := data.NewSnowFlake() - searcherRepo, err := data.NewSearcherRepo(v, serviceManager, sonyflake) - if err != nil { - return nil, nil, err - } - searcher := biz.NewSearcher(searcherRepo) - librarianSearcherServiceServer := service.NewLibrarianSearcherServiceService(searcher) - return librarianSearcherServiceServer, func() { - }, nil -} diff --git a/app/sephirah/cmd/sephirah/main.go b/app/sephirah/cmd/sephirah/main.go index db748b61..bd8bb884 100644 --- a/app/sephirah/cmd/sephirah/main.go +++ b/app/sephirah/cmd/sephirah/main.go @@ -62,6 +62,7 @@ func main() { bc.GetMq(), bc.GetCache(), bc.GetConsul(), + bc.GetSearch(), appSettings, ) if err != nil { diff --git a/app/sephirah/cmd/sephirah/wire.go b/app/sephirah/cmd/sephirah/wire.go index c4b60fe7..44cf4548 100644 --- a/app/sephirah/cmd/sephirah/wire.go +++ b/app/sephirah/cmd/sephirah/wire.go @@ -16,8 +16,10 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" "github.com/tuihub/librarian/internal/lib/libobserve" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/server" "github.com/go-kratos/kratos/v2" @@ -34,6 +36,7 @@ func wireApp( *conf.MQ, *conf.Cache, *conf.Consul, + *conf.Search, *libapp.Settings, ) (*kratos.App, func(), error) { panic(wire.Build( @@ -50,6 +53,8 @@ func wireApp( libcache.ProviderSet, libobserve.ProviderSet, libapp.ProviderSet, + libidgenerator.ProviderSet, + libsearch.ProviderSet, newApp, )) } diff --git a/app/sephirah/cmd/sephirah/wire_gen.go b/app/sephirah/cmd/sephirah/wire_gen.go index 581468f7..c17d6816 100644 --- a/app/sephirah/cmd/sephirah/wire_gen.go +++ b/app/sephirah/cmd/sephirah/wire_gen.go @@ -25,15 +25,17 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" "github.com/tuihub/librarian/internal/lib/libobserve" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/server" ) // Injectors from wire.go: // wireApp init kratos application. -func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, auth *conf.Auth, mq *conf.MQ, cache *conf.Cache, consul *conf.Consul, settings *libapp.Settings) (*kratos.App, func(), error) { +func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, auth *conf.Auth, mq *conf.MQ, cache *conf.Cache, consul *conf.Consul, search *conf.Search, settings *libapp.Settings) (*kratos.App, func(), error) { libauthAuth, err := libauth.NewAuth(auth) if err != nil { return nil, nil, err @@ -67,14 +69,8 @@ func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *c return nil, nil, err } netzachRepo := data.NewNetzachRepo(dataData) - librarianSearcherServiceClient, err := client2.NewSearcherClient(consul, settings) - if err != nil { - cleanup2() - cleanup() - return nil, nil, err - } - searcher := client.NewSearcher(librarianSearcherServiceClient) - topic := biznetzach.NewSystemNotificationTopic(netzachRepo, searcher) + idGenerator := libidgenerator.NewIDGenerator() + topic := biznetzach.NewSystemNotificationTopic(netzachRepo, idGenerator) tipherethRepo := data.NewTipherethRepo(dataData) store, err := libcache.NewStore(cache) if err != nil { @@ -91,7 +87,13 @@ func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *c return nil, nil, err } geburaRepo := data.NewGeburaRepo(dataData) - angelaBase, err := bizangela.NewAngelaBase(angelaRepo, supervisorSupervisor, geburaRepo, librarianPorterServiceClient, searcher) + libsearchSearch, err := libsearch.NewSearch(search, settings) + if err != nil { + cleanup2() + cleanup() + return nil, nil, err + } + angelaBase, err := bizangela.NewAngelaBase(angelaRepo, supervisorSupervisor, geburaRepo, librarianPorterServiceClient, libsearchSearch, idGenerator) if err != nil { cleanup2() cleanup() @@ -122,13 +124,13 @@ func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *c return nil, nil, err } key := biztiphereth.NewUserCountCache(tipherethRepo, store) - tiphereth, err := biztiphereth.NewTiphereth(settings, tipherethRepo, libauthAuth, supervisorSupervisor, searcher, topic4, cron, key, libcacheMap) + tiphereth, err := biztiphereth.NewTiphereth(settings, tipherethRepo, libauthAuth, supervisorSupervisor, idGenerator, libsearchSearch, topic4, cron, key, libcacheMap) if err != nil { cleanup2() cleanup() return nil, nil, err } - gebura := bizgebura.NewGebura(geburaRepo, libauthAuth, searcher, librarianPorterServiceClient, supervisorSupervisor, libmqTopic, topic2, map3) + gebura := bizgebura.NewGebura(geburaRepo, libauthAuth, idGenerator, libsearchSearch, librarianPorterServiceClient, supervisorSupervisor, libmqTopic, topic2, map3) binahRepo, err := data.NewBinahRepo(s3) if err != nil { cleanup2() @@ -136,16 +138,16 @@ func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *c return nil, nil, err } controlBlock := bizbinah.NewControlBlock(libauthAuth) - binah := bizbinah.NewBinah(binahRepo, controlBlock, libauthAuth, librarianSearcherServiceClient) + binah := bizbinah.NewBinah(binahRepo, controlBlock, libauthAuth) yesodRepo := data.NewYesodRepo(dataData) map7 := bizyesod.NewFeedOwnerCache(yesodRepo, store) - yesod, err := bizyesod.NewYesod(yesodRepo, supervisorSupervisor, cron, searcher, topic8, topic, map7) + yesod, err := bizyesod.NewYesod(yesodRepo, supervisorSupervisor, cron, idGenerator, libsearchSearch, topic8, topic, map7) if err != nil { cleanup2() cleanup() return nil, nil, err } - netzach, err := biznetzach.NewNetzach(netzachRepo, supervisorSupervisor, searcher, libmqMQ, map5, map4, map6, topic) + netzach, err := biznetzach.NewNetzach(netzachRepo, supervisorSupervisor, idGenerator, libsearchSearch, libmqMQ, map5, map4, map6, topic) if err != nil { cleanup2() cleanup() @@ -159,7 +161,7 @@ func wireApp(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *c return nil, nil, err } map8 := bizchesed.NewImageCache(store) - chesed, err := bizchesed.NewChesed(chesedRepo, binahRepo, cron, librarianPorterServiceClient, searcher, librarianMinerServiceClient, controlBlock, map8) + chesed, err := bizchesed.NewChesed(chesedRepo, binahRepo, idGenerator, libsearchSearch, cron, librarianPorterServiceClient, librarianMinerServiceClient, controlBlock, map8) if err != nil { cleanup2() cleanup() diff --git a/app/sephirah/internal/biz/bizangela/account.go b/app/sephirah/internal/biz/bizangela/account.go index 8a090ad9..cf8610cd 100644 --- a/app/sephirah/internal/biz/bizangela/account.go +++ b/app/sephirah/internal/biz/bizangela/account.go @@ -87,7 +87,7 @@ func NewPullAccountAppInfoRelationTopic( } infos := make([]*modelgebura.AppInfo, 0, infoNum) var infoIDs []model.InternalID - if id, err := a.searcher.NewBatchIDs(ctx, infoNum); err != nil { + if id, err := a.id.BatchNew(infoNum); err != nil { return err } else { infoIDs = id diff --git a/app/sephirah/internal/biz/bizangela/angela.go b/app/sephirah/internal/biz/bizangela/angela.go index 42a9f204..35f8efe0 100644 --- a/app/sephirah/internal/biz/bizangela/angela.go +++ b/app/sephirah/internal/biz/bizangela/angela.go @@ -4,14 +4,15 @@ import ( "context" "github.com/tuihub/librarian/app/sephirah/internal/biz/bizgebura" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelangela" "github.com/tuihub/librarian/app/sephirah/internal/model/modelgebura" "github.com/tuihub/librarian/app/sephirah/internal/model/modelsupervisor" "github.com/tuihub/librarian/app/sephirah/internal/model/modeltiphereth" "github.com/tuihub/librarian/app/sephirah/internal/model/modelyesod" "github.com/tuihub/librarian/app/sephirah/internal/supervisor" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/model" "github.com/tuihub/librarian/internal/model/modelfeed" porter "github.com/tuihub/protos/pkg/librarian/porter/v1" @@ -41,12 +42,12 @@ type Angela struct { mq *libmq.MQ } type AngelaBase struct { - repo AngelaRepo - supv *supervisor.Supervisor - g bizgebura.GeburaRepo - // mapper mapper.LibrarianMapperServiceClient - searcher *client.Searcher - porter porter.LibrarianPorterServiceClient + repo AngelaRepo + supv *supervisor.Supervisor + g bizgebura.GeburaRepo + porter porter.LibrarianPorterServiceClient + search libsearch.Search + id *libidgenerator.IDGenerator } type AngelaRepo interface { @@ -68,17 +69,17 @@ func NewAngelaBase( repo AngelaRepo, supv *supervisor.Supervisor, g bizgebura.GeburaRepo, - // mClient mapper.LibrarianMapperServiceClient, pClient porter.LibrarianPorterServiceClient, - sClient *client.Searcher, + search libsearch.Search, + id *libidgenerator.IDGenerator, ) (*AngelaBase, error) { return &AngelaBase{ - repo: repo, - supv: supv, - g: g, - //mapper: mClient, - porter: pClient, - searcher: sClient, + repo: repo, + supv: supv, + g: g, + porter: pClient, + search: search, + id: id, }, nil } diff --git a/app/sephirah/internal/biz/bizangela/app.go b/app/sephirah/internal/biz/bizangela/app.go index 13b23745..4d5b55a4 100644 --- a/app/sephirah/internal/biz/bizangela/app.go +++ b/app/sephirah/internal/biz/bizangela/app.go @@ -37,7 +37,7 @@ func NewPullAppInfoTopic( return nil } } - id, err := a.searcher.NewID(ctx) + id, err := a.id.New() if err != nil { return err } diff --git a/app/sephirah/internal/biz/bizangela/feed.go b/app/sephirah/internal/biz/bizangela/feed.go index 26ffba9e..483d5141 100644 --- a/app/sephirah/internal/biz/bizangela/feed.go +++ b/app/sephirah/internal/biz/bizangela/feed.go @@ -67,7 +67,7 @@ func NewPullFeedTopic( //nolint:gocognit // TODO } feed := modelfeed.FromPBFeed(resp.GetData()) feed.ID = p.InternalID - ids, err := a.searcher.NewBatchIDs(ctx, len(feed.Items)) + ids, err := a.id.BatchNew(len(feed.Items)) if err != nil { fc.LatestPullMessage = fmt.Sprintf("Generate IDs failed: %s", err.Error()) return err diff --git a/app/sephirah/internal/biz/bizangela/index.go b/app/sephirah/internal/biz/bizangela/index.go index 740b62e4..341eafdf 100644 --- a/app/sephirah/internal/biz/bizangela/index.go +++ b/app/sephirah/internal/biz/bizangela/index.go @@ -5,7 +5,7 @@ import ( "github.com/tuihub/librarian/app/sephirah/internal/model/modelangela" "github.com/tuihub/librarian/internal/lib/libmq" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" + "github.com/tuihub/librarian/internal/lib/libsearch" ) func NewUpdateAppInfoIndexTopic( @@ -23,11 +23,11 @@ func NewUpdateAppInfoIndexTopic( for _, other := range info.Others { desc += other.Name } - err = a.searcher.DescribeID(ctx, + err = a.search.DescribeID(ctx, info.Internal.ID, + libsearch.SearchIndexGeburaApp, + false, desc, - searcher.DescribeIDRequest_DESCRIBE_MODE_OVERRIDE, - searcher.Index_INDEX_GEBURA_APP, ) if err != nil { return err diff --git a/app/sephirah/internal/biz/bizbinah/binah.go b/app/sephirah/internal/biz/bizbinah/binah.go index 8ab1c074..9c095f82 100644 --- a/app/sephirah/internal/biz/bizbinah/binah.go +++ b/app/sephirah/internal/biz/bizbinah/binah.go @@ -7,7 +7,6 @@ import ( "github.com/tuihub/librarian/app/sephirah/internal/model/modelbinah" "github.com/tuihub/librarian/internal/lib/libauth" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" "github.com/google/wire" ) @@ -21,8 +20,6 @@ type Binah struct { repo BinahRepo callback *modelbinah.ControlBlock auth *libauth.Auth - // mapper mapper.LibrarianMapperServiceClient - searcher searcher.LibrarianSearcherServiceClient } type BinahRepo interface { @@ -43,15 +40,11 @@ func NewBinah( repo BinahRepo, callback *modelbinah.ControlBlock, auth *libauth.Auth, - // mClient mapper.LibrarianMapperServiceClient, - sClient searcher.LibrarianSearcherServiceClient, ) *Binah { return &Binah{ repo: repo, callback: callback, auth: auth, - //mapper: mClient, - searcher: sClient, } } diff --git a/app/sephirah/internal/biz/bizchesed/chesed.go b/app/sephirah/internal/biz/bizchesed/chesed.go index 29b58c10..a410b541 100644 --- a/app/sephirah/internal/biz/bizchesed/chesed.go +++ b/app/sephirah/internal/biz/bizchesed/chesed.go @@ -7,17 +7,17 @@ import ( "github.com/tuihub/librarian/app/sephirah/internal/biz/bizbinah" "github.com/tuihub/librarian/app/sephirah/internal/biz/bizutils" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelbinah" "github.com/tuihub/librarian/app/sephirah/internal/model/modelchesed" "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/lib/libtime" "github.com/tuihub/librarian/internal/model" miner "github.com/tuihub/protos/pkg/librarian/miner/v1" porter "github.com/tuihub/protos/pkg/librarian/porter/v1" - searcherpb "github.com/tuihub/protos/pkg/librarian/searcher/v1" pb "github.com/tuihub/protos/pkg/librarian/sephirah/v1" "github.com/go-kratos/kratos/v2/errors" @@ -40,7 +40,8 @@ type ChesedRepo interface { type Chesed struct { repo ChesedRepo b bizbinah.BinahRepo - searcher *client.Searcher + id *libidgenerator.IDGenerator + search libsearch.Search porter porter.LibrarianPorterServiceClient miner miner.LibrarianMinerServiceClient upload *modelbinah.UploadCallBack @@ -52,9 +53,10 @@ type Chesed struct { func NewChesed( repo ChesedRepo, b bizbinah.BinahRepo, + id *libidgenerator.IDGenerator, + search libsearch.Search, cron *libcron.Cron, pClient porter.LibrarianPorterServiceClient, - sClient *client.Searcher, miClient miner.LibrarianMinerServiceClient, block *modelbinah.ControlBlock, imageCache *libcache.Map[model.InternalID, modelchesed.Image], @@ -62,8 +64,9 @@ func NewChesed( c := &Chesed{ repo: repo, b: b, + id: id, + search: search, porter: pClient, - searcher: sClient, miner: miClient, upload: nil, download: nil, @@ -107,7 +110,7 @@ func (c *Chesed) UploadImage(ctx context.Context, image modelchesed.Image, if err := metadata.Check(); err != nil { return "", pb.ErrorErrorReasonBadRequest("invalid file metadata: %s", err.Error()) } - id, err := c.searcher.NewID(ctx) + id, err := c.id.New() if err != nil { return "", pb.ErrorErrorReasonUnspecified("%s", err.Error()) } @@ -166,11 +169,11 @@ func (c *Chesed) ScanImage(ctx context.Context) error { for _, r := range results.GetResults() { desReq += r.GetText() + " " } - if err = c.searcher.DescribeID(ctx, + if err = c.search.DescribeID(ctx, image.ID, + libsearch.SearchIndexChesedImage, + true, desReq, - searcherpb.DescribeIDRequest_DESCRIBE_MODE_APPEND, - searcherpb.Index_INDEX_CHESED_IMAGE, ); err != nil { return err } @@ -202,14 +205,18 @@ func (c *Chesed) SearchImages(ctx context.Context, paging model.Paging, query st if libauth.FromContextAssertUserType(ctx) == nil { return nil, bizutils.NoPermissionError() } - ids, err := c.searcher.SearchID(ctx, + results, err := c.search.SearchID(ctx, + libsearch.SearchIndexChesedImage, paging, query, - searcherpb.Index_INDEX_CHESED_IMAGE, ) if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } + ids := make([]model.InternalID, 0, len(results)) + for _, r := range results { + ids = append(ids, r.ID) + } return ids, nil } diff --git a/app/sephirah/internal/biz/bizgebura/app.go b/app/sephirah/internal/biz/bizgebura/app.go index d770974b..f8e671eb 100644 --- a/app/sephirah/internal/biz/bizgebura/app.go +++ b/app/sephirah/internal/biz/bizgebura/app.go @@ -20,7 +20,7 @@ func (g *Gebura) CreateApp( if claims == nil { return nil, bizutils.NoPermissionError() } - id, err := g.searcher.NewID(ctx) + id, err := g.id.New() if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } diff --git a/app/sephirah/internal/biz/bizgebura/app_info.go b/app/sephirah/internal/biz/bizgebura/app_info.go index 762319c3..22287e38 100644 --- a/app/sephirah/internal/biz/bizgebura/app_info.go +++ b/app/sephirah/internal/biz/bizgebura/app_info.go @@ -10,9 +10,9 @@ import ( "github.com/tuihub/librarian/app/sephirah/internal/model/modelangela" "github.com/tuihub/librarian/app/sephirah/internal/model/modelgebura" "github.com/tuihub/librarian/internal/lib/libauth" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/model" porter "github.com/tuihub/protos/pkg/librarian/porter/v1" - searcherpb "github.com/tuihub/protos/pkg/librarian/searcher/v1" pb "github.com/tuihub/protos/pkg/librarian/sephirah/v1" "github.com/go-kratos/kratos/v2/errors" @@ -25,7 +25,7 @@ func (g *Gebura) CreateAppInfo( if libauth.FromContextAssertUserType(ctx, libauth.UserTypeAdmin) == nil { return nil, bizutils.NoPermissionError() } - id, err := g.searcher.NewID(ctx) + id, err := g.id.New() if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } @@ -95,7 +95,7 @@ func (g *Gebura) SyncAppInfos( return nil, bizutils.NoPermissionError() } appInfos := make([]*modelgebura.AppInfo, 0, len(infoIDs)) - ids, err := g.searcher.NewBatchIDs(ctx, len(infoIDs)) + ids, err := g.id.BatchNew(len(infoIDs)) if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } @@ -144,10 +144,14 @@ func (g *Gebura) SearchAppInfos(ctx context.Context, paging model.Paging, query if libauth.FromContextAssertUserType(ctx) == nil { return nil, 0, bizutils.NoPermissionError() } - ids, err := g.searcher.SearchID(ctx, paging, query, searcherpb.Index_INDEX_GEBURA_APP) + results, err := g.search.SearchID(ctx, libsearch.SearchIndexGeburaApp, paging, query) if err != nil { return nil, 0, pb.ErrorErrorReasonUnspecified("%s", err) } + ids := make([]model.InternalID, 0, len(results)) + for _, r := range results { + ids = append(ids, r.ID) + } infos, err := g.repo.GetBatchBoundAppInfos(ctx, ids) if err != nil { return nil, 0, pb.ErrorErrorReasonUnspecified("%s", err) @@ -224,7 +228,7 @@ func (g *Gebura) PurchaseAppInfo(ctx context.Context, infoID *modelgebura.AppInf if infoID.Internal { return errors.BadRequest("app not found", "") } - ids, err := g.searcher.NewBatchIDs(ctx2, 2) //nolint:mnd // checked + ids, err := g.id.BatchNew(2) //nolint:mnd // checked if err != nil { return err } diff --git a/app/sephirah/internal/biz/bizgebura/app_inst.go b/app/sephirah/internal/biz/bizgebura/app_inst.go index 827db8e9..d3cb8193 100644 --- a/app/sephirah/internal/biz/bizgebura/app_inst.go +++ b/app/sephirah/internal/biz/bizgebura/app_inst.go @@ -20,7 +20,7 @@ func (g *Gebura) CreateAppInst( if claims == nil { return nil, bizutils.NoPermissionError() } - id, err := g.searcher.NewID(ctx) + id, err := g.id.New() if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } diff --git a/app/sephirah/internal/biz/bizgebura/gebura.go b/app/sephirah/internal/biz/bizgebura/gebura.go index 6322e896..c75d8d64 100644 --- a/app/sephirah/internal/biz/bizgebura/gebura.go +++ b/app/sephirah/internal/biz/bizgebura/gebura.go @@ -4,13 +4,14 @@ import ( "context" "time" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelangela" "github.com/tuihub/librarian/app/sephirah/internal/model/modelgebura" "github.com/tuihub/librarian/app/sephirah/internal/supervisor" "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/model" porter "github.com/tuihub/protos/pkg/librarian/porter/v1" @@ -52,10 +53,10 @@ type GeburaRepo interface { } type Gebura struct { - auth *libauth.Auth - repo GeburaRepo - // mapper mapper.LibrarianMapperServiceClient - searcher *client.Searcher + auth *libauth.Auth + repo GeburaRepo + id *libidgenerator.IDGenerator + search libsearch.Search porter porter.LibrarianPorterServiceClient supv *supervisor.Supervisor updateAppInfoIndex *libmq.Topic[modelangela.UpdateAppInfoIndex] @@ -66,8 +67,8 @@ type Gebura struct { func NewGebura( repo GeburaRepo, auth *libauth.Auth, - // mClient mapper.LibrarianMapperServiceClient, - sClient *client.Searcher, + id *libidgenerator.IDGenerator, + search libsearch.Search, pClient porter.LibrarianPorterServiceClient, supv *supervisor.Supervisor, updateAppIndex *libmq.Topic[modelangela.UpdateAppInfoIndex], @@ -75,10 +76,10 @@ func NewGebura( appInfoCache *libcache.Map[modelgebura.AppInfoID, modelgebura.AppInfo], ) *Gebura { return &Gebura{ - auth: auth, - repo: repo, - //mapper: mClient, - searcher: sClient, + auth: auth, + repo: repo, + id: id, + search: search, porter: pClient, supv: supv, updateAppInfoIndex: updateAppIndex, diff --git a/app/sephirah/internal/biz/biznetzach/netzach.go b/app/sephirah/internal/biz/biznetzach/netzach.go index 159717c7..56481e96 100644 --- a/app/sephirah/internal/biz/biznetzach/netzach.go +++ b/app/sephirah/internal/biz/biznetzach/netzach.go @@ -4,13 +4,14 @@ import ( "context" "github.com/tuihub/librarian/app/sephirah/internal/biz/bizutils" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelangela" "github.com/tuihub/librarian/app/sephirah/internal/model/modelnetzach" "github.com/tuihub/librarian/app/sephirah/internal/supervisor" "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/lib/logger" "github.com/tuihub/librarian/internal/model" pb "github.com/tuihub/protos/pkg/librarian/sephirah/v1" @@ -47,7 +48,8 @@ type NetzachRepo interface { type Netzach struct { repo NetzachRepo supv *supervisor.Supervisor - searcher *client.Searcher + id *libidgenerator.IDGenerator + search libsearch.Search notifySourceCache *libcache.Map[model.InternalID, modelangela.FeedToNotifyFlowValue] notifyFlowCache *libcache.Map[model.InternalID, modelnetzach.NotifyFlow] notifyTargetCache *libcache.Map[model.InternalID, modelnetzach.NotifyTarget] @@ -56,7 +58,8 @@ type Netzach struct { func NewNetzach( repo NetzachRepo, supv *supervisor.Supervisor, - sClient *client.Searcher, + id *libidgenerator.IDGenerator, + search libsearch.Search, mq *libmq.MQ, notifySourceCache *libcache.Map[model.InternalID, modelangela.FeedToNotifyFlowValue], notifyFlowCache *libcache.Map[model.InternalID, modelnetzach.NotifyFlow], @@ -69,7 +72,8 @@ func NewNetzach( y := &Netzach{ repo, supv, - sClient, + id, + search, notifySourceCache, notifyFlowCache, notifyTargetCache, @@ -89,7 +93,7 @@ func (n *Netzach) CreateNotifyTarget(ctx context.Context, target *modelnetzach.N if target == nil { return 0, pb.ErrorErrorReasonBadRequest("notify target required") } - id, err := n.searcher.NewID(ctx) + id, err := n.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } @@ -146,7 +150,7 @@ func (n *Netzach) CreateNotifyFlow(ctx context.Context, flow *modelnetzach.Notif if flow == nil { return 0, pb.ErrorErrorReasonBadRequest("notify target required") } - id, err := n.searcher.NewID(ctx) + id, err := n.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/biznetzach/system.go b/app/sephirah/internal/biz/biznetzach/system.go index 0a8a901b..d0c77b78 100644 --- a/app/sephirah/internal/biz/biznetzach/system.go +++ b/app/sephirah/internal/biz/biznetzach/system.go @@ -3,20 +3,20 @@ package biznetzach import ( "context" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelnetzach" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" ) func NewSystemNotificationTopic( repo NetzachRepo, - searcher *client.Searcher, + idGenerator *libidgenerator.IDGenerator, ) *libmq.Topic[modelnetzach.SystemNotify] { return libmq.NewTopic[modelnetzach.SystemNotify]( "SystemNotify", func(ctx context.Context, r *modelnetzach.SystemNotify) error { if r.Notification.ID == 0 { - id, err := searcher.NewID(ctx) + id, err := idGenerator.New() if err != nil { return err } diff --git a/app/sephirah/internal/biz/biztiphereth/account.go b/app/sephirah/internal/biz/biztiphereth/account.go index 871b91b8..cf5f2b12 100644 --- a/app/sephirah/internal/biz/biztiphereth/account.go +++ b/app/sephirah/internal/biz/biztiphereth/account.go @@ -24,7 +24,7 @@ func (t *Tiphereth) LinkAccount( if !t.supv.HasAccountPlatform(a.Platform) { return nil, bizutils.UnsupportedFeatureError() } - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } diff --git a/app/sephirah/internal/biz/biztiphereth/porter.go b/app/sephirah/internal/biz/biztiphereth/porter.go index e39bf237..027a162d 100644 --- a/app/sephirah/internal/biz/biztiphereth/porter.go +++ b/app/sephirah/internal/biz/biztiphereth/porter.go @@ -33,7 +33,7 @@ func (t *Tiphereth) updatePorters(ctx context.Context) error { if len(newPorters) == 0 { return nil } - ids, err := t.searcher.NewBatchIDs(ctx, len(newPorters)) + ids, err := t.id.BatchNew(len(newPorters)) if err != nil { logger.Errorf("new batch ids failed: %s", err.Error()) return err @@ -85,7 +85,7 @@ func (t *Tiphereth) CreatePorterContext(ctx context.Context, context *modelsuper if claims == nil { return 0, bizutils.NoPermissionError() } - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/biztiphereth/tiphereth.go b/app/sephirah/internal/biz/biztiphereth/tiphereth.go index 17ee86f3..7a10f977 100644 --- a/app/sephirah/internal/biz/biztiphereth/tiphereth.go +++ b/app/sephirah/internal/biz/biztiphereth/tiphereth.go @@ -4,7 +4,6 @@ import ( "context" "strconv" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelsupervisor" "github.com/tuihub/librarian/app/sephirah/internal/model/modeltiphereth" "github.com/tuihub/librarian/app/sephirah/internal/supervisor" @@ -12,7 +11,9 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/lib/libtime" "github.com/tuihub/librarian/internal/lib/logger" "github.com/tuihub/librarian/internal/model" @@ -61,12 +62,12 @@ type TipherethRepo interface { } type Tiphereth struct { - app *libapp.Settings - auth *libauth.Auth - repo TipherethRepo - supv *supervisor.Supervisor - // mapper mapper.LibrarianMapperServiceClient - searcher *client.Searcher + app *libapp.Settings + auth *libauth.Auth + repo TipherethRepo + supv *supervisor.Supervisor + id *libidgenerator.IDGenerator + search libsearch.Search pullAccount *libmq.Topic[modeltiphereth.PullAccountInfo] userCountCache *libcache.Key[modeltiphereth.UserCount] porterInstanceCache *libcache.Map[string, modelsupervisor.PorterInstance] @@ -77,20 +78,20 @@ func NewTiphereth( repo TipherethRepo, auth *libauth.Auth, supv *supervisor.Supervisor, - // mClient mapper.LibrarianMapperServiceClient, - sClient *client.Searcher, + id *libidgenerator.IDGenerator, + search libsearch.Search, pullAccount *libmq.Topic[modeltiphereth.PullAccountInfo], cron *libcron.Cron, userCountCache *libcache.Key[modeltiphereth.UserCount], porterInstanceCache *libcache.Map[string, modelsupervisor.PorterInstance], ) (*Tiphereth, error) { t := &Tiphereth{ - app: app, - auth: auth, - repo: repo, - supv: supv, - //mapper: mClient, - searcher: sClient, + app: app, + auth: auth, + repo: repo, + supv: supv, + id: id, + search: search, pullAccount: pullAccount, userCountCache: userCountCache, porterInstanceCache: porterInstanceCache, @@ -135,7 +136,7 @@ func (t *Tiphereth) CreateConfiguredAdmin() { return } user.PassWord = password - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return } diff --git a/app/sephirah/internal/biz/biztiphereth/token.go b/app/sephirah/internal/biz/biztiphereth/token.go index b620004e..3605cc81 100644 --- a/app/sephirah/internal/biz/biztiphereth/token.go +++ b/app/sephirah/internal/biz/biztiphereth/token.go @@ -39,7 +39,7 @@ func (t *Tiphereth) GetToken( return "", "", pb.ErrorErrorReasonUnauthorized("user not active") } - sessionID, err := t.searcher.NewID(ctx) + sessionID, err := t.id.New() if err != nil { return "", "", pb.ErrorErrorReasonUnspecified("%s", err.Error()) } @@ -200,7 +200,7 @@ func (t *Tiphereth) RegisterDevice( if libauth.FromContextAssertUserType(ctx) == nil { return 0, bizutils.NoPermissionError() } - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/biztiphereth/user.go b/app/sephirah/internal/biz/biztiphereth/user.go index 60578f01..b864e660 100644 --- a/app/sephirah/internal/biz/biztiphereth/user.go +++ b/app/sephirah/internal/biz/biztiphereth/user.go @@ -36,7 +36,7 @@ func (t *Tiphereth) CreateUser(ctx context.Context, user *modeltiphereth.User) ( return nil, pb.ErrorErrorReasonBadRequest("invalid password") } user.PassWord = password - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return nil, pb.ErrorErrorReasonUnspecified("%s", err) } @@ -183,7 +183,7 @@ func (t *Tiphereth) RegisterUser( logger.Infof("generate password failed: %s", err.Error()) return nil, "", pb.ErrorErrorReasonBadRequest("invalid password") } - id, err := t.searcher.NewID(ctx) + id, err := t.id.New() if err != nil { return nil, "", pb.ErrorErrorReasonUnspecified("%s", err) } diff --git a/app/sephirah/internal/biz/bizyesod/collection.go b/app/sephirah/internal/biz/bizyesod/collection.go index 3a1dbda8..e89de57f 100644 --- a/app/sephirah/internal/biz/bizyesod/collection.go +++ b/app/sephirah/internal/biz/bizyesod/collection.go @@ -20,7 +20,7 @@ func (y *Yesod) CreateFeedItemCollection( if claims == nil { return 0, bizutils.NoPermissionError() } - id, err := y.searcher.NewID(ctx) + id, err := y.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/bizyesod/feed_action.go b/app/sephirah/internal/biz/bizyesod/feed_action.go index a1c95f0d..a52cc322 100644 --- a/app/sephirah/internal/biz/bizyesod/feed_action.go +++ b/app/sephirah/internal/biz/bizyesod/feed_action.go @@ -23,7 +23,7 @@ func (y *Yesod) CreateFeedActionSet( if len(set.Actions) == 0 { return 0, pb.ErrorErrorReasonBadRequest("actions is empty") } - id, err := y.searcher.NewID(ctx) + id, err := y.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/bizyesod/feed_config.go b/app/sephirah/internal/biz/bizyesod/feed_config.go index bbdebca5..f48558a4 100644 --- a/app/sephirah/internal/biz/bizyesod/feed_config.go +++ b/app/sephirah/internal/biz/bizyesod/feed_config.go @@ -20,7 +20,7 @@ func (y *Yesod) CreateFeedConfig(ctx context.Context, config *modelyesod.FeedCon if !y.supv.HasFeedSource(config.Source) { return 0, bizutils.UnsupportedFeatureError() } - id, err := y.searcher.NewID(ctx) + id, err := y.id.New() if err != nil { return 0, pb.ErrorErrorReasonUnspecified("%s", err.Error()) } diff --git a/app/sephirah/internal/biz/bizyesod/yesod.go b/app/sephirah/internal/biz/bizyesod/yesod.go index c8ca42bf..b039d803 100644 --- a/app/sephirah/internal/biz/bizyesod/yesod.go +++ b/app/sephirah/internal/biz/bizyesod/yesod.go @@ -6,7 +6,6 @@ import ( "strconv" "time" - "github.com/tuihub/librarian/app/sephirah/internal/client" "github.com/tuihub/librarian/app/sephirah/internal/model/modelnetzach" "github.com/tuihub/librarian/app/sephirah/internal/model/modelsupervisor" "github.com/tuihub/librarian/app/sephirah/internal/model/modeltiphereth" @@ -14,7 +13,9 @@ import ( "github.com/tuihub/librarian/app/sephirah/internal/supervisor" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/lib/libtime" "github.com/tuihub/librarian/internal/lib/logger" "github.com/tuihub/librarian/internal/model" @@ -60,10 +61,10 @@ type YesodRepo interface { } type Yesod struct { - repo YesodRepo - supv *supervisor.Supervisor - // mapper mapper.LibrarianMapperServiceClient - searcher *client.Searcher + repo YesodRepo + supv *supervisor.Supervisor + id *libidgenerator.IDGenerator + search libsearch.Search pullFeed *libmq.Topic[modelyesod.PullFeed] systemNotify *libmq.Topic[modelnetzach.SystemNotify] feedOwner *libcache.Map[modelyesod.FeedConfig, modeltiphereth.User] @@ -74,8 +75,8 @@ func NewYesod( repo YesodRepo, supv *supervisor.Supervisor, cron *libcron.Cron, - // mClient mapper.LibrarianMapperServiceClient, - sClient *client.Searcher, + id *libidgenerator.IDGenerator, + search libsearch.Search, pullFeed *libmq.Topic[modelyesod.PullFeed], systemNotify *libmq.Topic[modelnetzach.SystemNotify], feedOwner *libcache.Map[modelyesod.FeedConfig, modeltiphereth.User], @@ -85,10 +86,10 @@ func NewYesod( return nil, err } y := &Yesod{ - repo: repo, - supv: supv, - //mapper: mClient, - searcher: sClient, + repo: repo, + supv: supv, + id: id, + search: search, pullFeed: pullFeed, systemNotify: systemNotify, feedOwner: feedOwner, @@ -127,7 +128,7 @@ func (y *Yesod) PullFeeds(ctx context.Context) error { fmt.Sprintf("%s: Update Feed %s", modelnetzach.SystemNotifyTitleCronJob, c.Name), "Queued", ) - un.Notification.ID, err = y.searcher.NewID(ctx) + un.Notification.ID, err = y.id.New() if err != nil { return nil } diff --git a/app/sephirah/internal/client/client.go b/app/sephirah/internal/client/client.go index 5d55b4e8..65595367 100644 --- a/app/sephirah/internal/client/client.go +++ b/app/sephirah/internal/client/client.go @@ -4,4 +4,4 @@ import ( "github.com/google/wire" ) -var ProviderSet = wire.NewSet(NewSearcher, NewPorter, NewPorterClient) +var ProviderSet = wire.NewSet(NewPorter, NewPorterClient) diff --git a/app/sephirah/internal/client/searcher.go b/app/sephirah/internal/client/searcher.go deleted file mode 100644 index cfc29fae..00000000 --- a/app/sephirah/internal/client/searcher.go +++ /dev/null @@ -1,79 +0,0 @@ -package client - -import ( - "context" - - "github.com/tuihub/librarian/app/sephirah/internal/model/converter" - "github.com/tuihub/librarian/internal/lib/libcodec" - "github.com/tuihub/librarian/internal/lib/logger" - "github.com/tuihub/librarian/internal/model" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" -) - -type Searcher struct { - client searcher.LibrarianSearcherServiceClient -} - -func NewSearcher( - client searcher.LibrarianSearcherServiceClient, -) *Searcher { - return &Searcher{client: client} -} - -func (s *Searcher) NewID(ctx context.Context) (model.InternalID, error) { - resp, err := s.client.NewID(ctx, &searcher.NewIDRequest{}) - if err != nil { - logger.Infof("NewID failed: %s", err.Error()) - return 0, err - } - return converter.ToBizInternalID(resp.GetId()), nil -} - -func (s *Searcher) NewBatchIDs(ctx context.Context, num int) ([]model.InternalID, error) { - resp, err := s.client.NewBatchIDs(ctx, &searcher.NewBatchIDsRequest{ - Num: int64(num), - }) - if err != nil { - logger.Infof("NewBatchIDs failed: %s", err.Error()) - return nil, err - } - return converter.ToBizInternalIDList(resp.GetIds()), nil -} - -func (s *Searcher) DescribeID( - ctx context.Context, - id model.InternalID, - desc interface{}, - mode searcher.DescribeIDRequest_DescribeMode, - index searcher.Index, -) error { - descStr, err := libcodec.Marshal(libcodec.JSON, desc) - if err != nil { - return err - } - _, err = s.client.DescribeID(ctx, &searcher.DescribeIDRequest{ - Id: converter.ToPBInternalID(id), - Description: string(descStr), - Mode: mode, - Index: index, - }) - return err -} - -func (s *Searcher) SearchID( - ctx context.Context, paging model.Paging, query string, index searcher.Index, -) ([]model.InternalID, error) { - resp, err := s.client.SearchID(ctx, &searcher.SearchIDRequest{ - Paging: model.ToPBPaging(paging), - Query: query, - Index: index, - }) - if err != nil { - return nil, err - } - res := make([]model.InternalID, 0, len(resp.GetResult())) - for _, r := range resp.GetResult() { - res = append(res, converter.ToBizInternalID(r.GetId())) - } - return res, nil -} diff --git a/app/sephirah/internal/data/internal/converter/generated.go b/app/sephirah/internal/data/internal/converter/generated.go index 1c427b86..9c1d4b1e 100644 --- a/app/sephirah/internal/data/internal/converter/generated.go +++ b/app/sephirah/internal/data/internal/converter/generated.go @@ -56,9 +56,10 @@ func ToBizApp(source *ent.App) *modelgebura.App { var pModelgeburaApp *modelgebura.App if source != nil { var modelgeburaApp modelgebura.App - modelgeburaApp.ID = model.InternalID((*source).ID) + modelgeburaApp.ID = modelInternalIDToModelInternalID((*source).ID) modelgeburaApp.Name = (*source).Name modelgeburaApp.Description = (*source).Description + modelgeburaApp.DeviceID = modelInternalIDToModelInternalID((*source).DeviceID) modelgeburaApp.Public = (*source).Public pModelgeburaApp = &modelgeburaApp } diff --git a/app/sephirah/internal/data/internal/ent/app.go b/app/sephirah/internal/data/internal/ent/app.go index 9c68adfe..16670312 100644 --- a/app/sephirah/internal/data/internal/ent/app.go +++ b/app/sephirah/internal/data/internal/ent/app.go @@ -24,6 +24,8 @@ type App struct { Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` + // DeviceID holds the value of the "device_id" field. + DeviceID model.InternalID `json:"device_id,omitempty"` // Public holds the value of the "public" field. Public bool `json:"public,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -78,7 +80,7 @@ func (*App) scanValues(columns []string) ([]any, error) { switch columns[i] { case app.FieldPublic: values[i] = new(sql.NullBool) - case app.FieldID: + case app.FieldID, app.FieldDeviceID: values[i] = new(sql.NullInt64) case app.FieldName, app.FieldDescription: values[i] = new(sql.NullString) @@ -121,6 +123,12 @@ func (a *App) assignValues(columns []string, values []any) error { } else if value.Valid { a.Description = value.String } + case app.FieldDeviceID: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field device_id", values[i]) + } else if value.Valid { + a.DeviceID = model.InternalID(value.Int64) + } case app.FieldPublic: if value, ok := values[i].(*sql.NullBool); !ok { return fmt.Errorf("unexpected type %T for field public", values[i]) @@ -205,6 +213,9 @@ func (a *App) String() string { builder.WriteString("description=") builder.WriteString(a.Description) builder.WriteString(", ") + builder.WriteString("device_id=") + builder.WriteString(fmt.Sprintf("%v", a.DeviceID)) + builder.WriteString(", ") builder.WriteString("public=") builder.WriteString(fmt.Sprintf("%v", a.Public)) builder.WriteString(", ") diff --git a/app/sephirah/internal/data/internal/ent/app/app.go b/app/sephirah/internal/data/internal/ent/app/app.go index 21720cb7..06cf73c7 100644 --- a/app/sephirah/internal/data/internal/ent/app/app.go +++ b/app/sephirah/internal/data/internal/ent/app/app.go @@ -18,6 +18,8 @@ const ( FieldName = "name" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" + // FieldDeviceID holds the string denoting the device_id field in the database. + FieldDeviceID = "device_id" // FieldPublic holds the string denoting the public field in the database. FieldPublic = "public" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -51,6 +53,7 @@ var Columns = []string{ FieldID, FieldName, FieldDescription, + FieldDeviceID, FieldPublic, FieldUpdatedAt, FieldCreatedAt, @@ -105,6 +108,11 @@ func ByDescription(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDescription, opts...).ToFunc() } +// ByDeviceID orders the results by the device_id field. +func ByDeviceID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDeviceID, opts...).ToFunc() +} + // ByPublic orders the results by the public field. func ByPublic(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPublic, opts...).ToFunc() diff --git a/app/sephirah/internal/data/internal/ent/app/where.go b/app/sephirah/internal/data/internal/ent/app/where.go index 122bac0f..8cb5ab60 100644 --- a/app/sephirah/internal/data/internal/ent/app/where.go +++ b/app/sephirah/internal/data/internal/ent/app/where.go @@ -66,6 +66,12 @@ func Description(v string) predicate.App { return predicate.App(sql.FieldEQ(FieldDescription, v)) } +// DeviceID applies equality check predicate on the "device_id" field. It's identical to DeviceIDEQ. +func DeviceID(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldEQ(FieldDeviceID, vc)) +} + // Public applies equality check predicate on the "public" field. It's identical to PublicEQ. func Public(v bool) predicate.App { return predicate.App(sql.FieldEQ(FieldPublic, v)) @@ -211,6 +217,60 @@ func DescriptionContainsFold(v string) predicate.App { return predicate.App(sql.FieldContainsFold(FieldDescription, v)) } +// DeviceIDEQ applies the EQ predicate on the "device_id" field. +func DeviceIDEQ(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldEQ(FieldDeviceID, vc)) +} + +// DeviceIDNEQ applies the NEQ predicate on the "device_id" field. +func DeviceIDNEQ(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldNEQ(FieldDeviceID, vc)) +} + +// DeviceIDIn applies the In predicate on the "device_id" field. +func DeviceIDIn(vs ...model.InternalID) predicate.App { + v := make([]any, len(vs)) + for i := range v { + v[i] = int64(vs[i]) + } + return predicate.App(sql.FieldIn(FieldDeviceID, v...)) +} + +// DeviceIDNotIn applies the NotIn predicate on the "device_id" field. +func DeviceIDNotIn(vs ...model.InternalID) predicate.App { + v := make([]any, len(vs)) + for i := range v { + v[i] = int64(vs[i]) + } + return predicate.App(sql.FieldNotIn(FieldDeviceID, v...)) +} + +// DeviceIDGT applies the GT predicate on the "device_id" field. +func DeviceIDGT(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldGT(FieldDeviceID, vc)) +} + +// DeviceIDGTE applies the GTE predicate on the "device_id" field. +func DeviceIDGTE(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldGTE(FieldDeviceID, vc)) +} + +// DeviceIDLT applies the LT predicate on the "device_id" field. +func DeviceIDLT(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldLT(FieldDeviceID, vc)) +} + +// DeviceIDLTE applies the LTE predicate on the "device_id" field. +func DeviceIDLTE(v model.InternalID) predicate.App { + vc := int64(v) + return predicate.App(sql.FieldLTE(FieldDeviceID, vc)) +} + // PublicEQ applies the EQ predicate on the "public" field. func PublicEQ(v bool) predicate.App { return predicate.App(sql.FieldEQ(FieldPublic, v)) diff --git a/app/sephirah/internal/data/internal/ent/app_create.go b/app/sephirah/internal/data/internal/ent/app_create.go index 83ea0e2f..ecec294c 100644 --- a/app/sephirah/internal/data/internal/ent/app_create.go +++ b/app/sephirah/internal/data/internal/ent/app_create.go @@ -37,6 +37,12 @@ func (ac *AppCreate) SetDescription(s string) *AppCreate { return ac } +// SetDeviceID sets the "device_id" field. +func (ac *AppCreate) SetDeviceID(mi model.InternalID) *AppCreate { + ac.mutation.SetDeviceID(mi) + return ac +} + // SetPublic sets the "public" field. func (ac *AppCreate) SetPublic(b bool) *AppCreate { ac.mutation.SetPublic(b) @@ -160,6 +166,9 @@ func (ac *AppCreate) check() error { if _, ok := ac.mutation.Description(); !ok { return &ValidationError{Name: "description", err: errors.New(`ent: missing required field "App.description"`)} } + if _, ok := ac.mutation.DeviceID(); !ok { + return &ValidationError{Name: "device_id", err: errors.New(`ent: missing required field "App.device_id"`)} + } if _, ok := ac.mutation.Public(); !ok { return &ValidationError{Name: "public", err: errors.New(`ent: missing required field "App.public"`)} } @@ -213,6 +222,10 @@ func (ac *AppCreate) createSpec() (*App, *sqlgraph.CreateSpec) { _spec.SetField(app.FieldDescription, field.TypeString, value) _node.Description = value } + if value, ok := ac.mutation.DeviceID(); ok { + _spec.SetField(app.FieldDeviceID, field.TypeInt64, value) + _node.DeviceID = value + } if value, ok := ac.mutation.Public(); ok { _spec.SetField(app.FieldPublic, field.TypeBool, value) _node.Public = value @@ -335,6 +348,24 @@ func (u *AppUpsert) UpdateDescription() *AppUpsert { return u } +// SetDeviceID sets the "device_id" field. +func (u *AppUpsert) SetDeviceID(v model.InternalID) *AppUpsert { + u.Set(app.FieldDeviceID, v) + return u +} + +// UpdateDeviceID sets the "device_id" field to the value that was provided on create. +func (u *AppUpsert) UpdateDeviceID() *AppUpsert { + u.SetExcluded(app.FieldDeviceID) + return u +} + +// AddDeviceID adds v to the "device_id" field. +func (u *AppUpsert) AddDeviceID(v model.InternalID) *AppUpsert { + u.Add(app.FieldDeviceID, v) + return u +} + // SetPublic sets the "public" field. func (u *AppUpsert) SetPublic(v bool) *AppUpsert { u.Set(app.FieldPublic, v) @@ -447,6 +478,27 @@ func (u *AppUpsertOne) UpdateDescription() *AppUpsertOne { }) } +// SetDeviceID sets the "device_id" field. +func (u *AppUpsertOne) SetDeviceID(v model.InternalID) *AppUpsertOne { + return u.Update(func(s *AppUpsert) { + s.SetDeviceID(v) + }) +} + +// AddDeviceID adds v to the "device_id" field. +func (u *AppUpsertOne) AddDeviceID(v model.InternalID) *AppUpsertOne { + return u.Update(func(s *AppUpsert) { + s.AddDeviceID(v) + }) +} + +// UpdateDeviceID sets the "device_id" field to the value that was provided on create. +func (u *AppUpsertOne) UpdateDeviceID() *AppUpsertOne { + return u.Update(func(s *AppUpsert) { + s.UpdateDeviceID() + }) +} + // SetPublic sets the "public" field. func (u *AppUpsertOne) SetPublic(v bool) *AppUpsertOne { return u.Update(func(s *AppUpsert) { @@ -731,6 +783,27 @@ func (u *AppUpsertBulk) UpdateDescription() *AppUpsertBulk { }) } +// SetDeviceID sets the "device_id" field. +func (u *AppUpsertBulk) SetDeviceID(v model.InternalID) *AppUpsertBulk { + return u.Update(func(s *AppUpsert) { + s.SetDeviceID(v) + }) +} + +// AddDeviceID adds v to the "device_id" field. +func (u *AppUpsertBulk) AddDeviceID(v model.InternalID) *AppUpsertBulk { + return u.Update(func(s *AppUpsert) { + s.AddDeviceID(v) + }) +} + +// UpdateDeviceID sets the "device_id" field to the value that was provided on create. +func (u *AppUpsertBulk) UpdateDeviceID() *AppUpsertBulk { + return u.Update(func(s *AppUpsert) { + s.UpdateDeviceID() + }) +} + // SetPublic sets the "public" field. func (u *AppUpsertBulk) SetPublic(v bool) *AppUpsertBulk { return u.Update(func(s *AppUpsert) { diff --git a/app/sephirah/internal/data/internal/ent/app_update.go b/app/sephirah/internal/data/internal/ent/app_update.go index 7a6f1f7b..e13c5a7b 100644 --- a/app/sephirah/internal/data/internal/ent/app_update.go +++ b/app/sephirah/internal/data/internal/ent/app_update.go @@ -59,6 +59,27 @@ func (au *AppUpdate) SetNillableDescription(s *string) *AppUpdate { return au } +// SetDeviceID sets the "device_id" field. +func (au *AppUpdate) SetDeviceID(mi model.InternalID) *AppUpdate { + au.mutation.ResetDeviceID() + au.mutation.SetDeviceID(mi) + return au +} + +// SetNillableDeviceID sets the "device_id" field if the given value is not nil. +func (au *AppUpdate) SetNillableDeviceID(mi *model.InternalID) *AppUpdate { + if mi != nil { + au.SetDeviceID(*mi) + } + return au +} + +// AddDeviceID adds mi to the "device_id" field. +func (au *AppUpdate) AddDeviceID(mi model.InternalID) *AppUpdate { + au.mutation.AddDeviceID(mi) + return au +} + // SetPublic sets the "public" field. func (au *AppUpdate) SetPublic(b bool) *AppUpdate { au.mutation.SetPublic(b) @@ -202,6 +223,12 @@ func (au *AppUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := au.mutation.Description(); ok { _spec.SetField(app.FieldDescription, field.TypeString, value) } + if value, ok := au.mutation.DeviceID(); ok { + _spec.SetField(app.FieldDeviceID, field.TypeInt64, value) + } + if value, ok := au.mutation.AddedDeviceID(); ok { + _spec.AddField(app.FieldDeviceID, field.TypeInt64, value) + } if value, ok := au.mutation.Public(); ok { _spec.SetField(app.FieldPublic, field.TypeBool, value) } @@ -317,6 +344,27 @@ func (auo *AppUpdateOne) SetNillableDescription(s *string) *AppUpdateOne { return auo } +// SetDeviceID sets the "device_id" field. +func (auo *AppUpdateOne) SetDeviceID(mi model.InternalID) *AppUpdateOne { + auo.mutation.ResetDeviceID() + auo.mutation.SetDeviceID(mi) + return auo +} + +// SetNillableDeviceID sets the "device_id" field if the given value is not nil. +func (auo *AppUpdateOne) SetNillableDeviceID(mi *model.InternalID) *AppUpdateOne { + if mi != nil { + auo.SetDeviceID(*mi) + } + return auo +} + +// AddDeviceID adds mi to the "device_id" field. +func (auo *AppUpdateOne) AddDeviceID(mi model.InternalID) *AppUpdateOne { + auo.mutation.AddDeviceID(mi) + return auo +} + // SetPublic sets the "public" field. func (auo *AppUpdateOne) SetPublic(b bool) *AppUpdateOne { auo.mutation.SetPublic(b) @@ -490,6 +538,12 @@ func (auo *AppUpdateOne) sqlSave(ctx context.Context) (_node *App, err error) { if value, ok := auo.mutation.Description(); ok { _spec.SetField(app.FieldDescription, field.TypeString, value) } + if value, ok := auo.mutation.DeviceID(); ok { + _spec.SetField(app.FieldDeviceID, field.TypeInt64, value) + } + if value, ok := auo.mutation.AddedDeviceID(); ok { + _spec.AddField(app.FieldDeviceID, field.TypeInt64, value) + } if value, ok := auo.mutation.Public(); ok { _spec.SetField(app.FieldPublic, field.TypeBool, value) } diff --git a/app/sephirah/internal/data/internal/ent/migrate/schema.go b/app/sephirah/internal/data/internal/ent/migrate/schema.go index 0703bf58..f629fce8 100644 --- a/app/sephirah/internal/data/internal/ent/migrate/schema.go +++ b/app/sephirah/internal/data/internal/ent/migrate/schema.go @@ -46,6 +46,7 @@ var ( {Name: "id", Type: field.TypeInt64}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Size: 2147483647}, + {Name: "device_id", Type: field.TypeInt64}, {Name: "public", Type: field.TypeBool}, {Name: "updated_at", Type: field.TypeTime}, {Name: "created_at", Type: field.TypeTime}, @@ -60,13 +61,13 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "apps_app_infos_app", - Columns: []*schema.Column{AppsColumns[6]}, + Columns: []*schema.Column{AppsColumns[7]}, RefColumns: []*schema.Column{AppInfosColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "apps_users_app", - Columns: []*schema.Column{AppsColumns[7]}, + Columns: []*schema.Column{AppsColumns[8]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, diff --git a/app/sephirah/internal/data/internal/ent/mutation.go b/app/sephirah/internal/data/internal/ent/mutation.go index 18de03d0..491d8337 100644 --- a/app/sephirah/internal/data/internal/ent/mutation.go +++ b/app/sephirah/internal/data/internal/ent/mutation.go @@ -898,6 +898,8 @@ type AppMutation struct { id *model.InternalID name *string description *string + device_id *model.InternalID + adddevice_id *model.InternalID public *bool updated_at *time.Time created_at *time.Time @@ -1087,6 +1089,62 @@ func (m *AppMutation) ResetDescription() { m.description = nil } +// SetDeviceID sets the "device_id" field. +func (m *AppMutation) SetDeviceID(mi model.InternalID) { + m.device_id = &mi + m.adddevice_id = nil +} + +// DeviceID returns the value of the "device_id" field in the mutation. +func (m *AppMutation) DeviceID() (r model.InternalID, exists bool) { + v := m.device_id + if v == nil { + return + } + return *v, true +} + +// OldDeviceID returns the old "device_id" field's value of the App entity. +// If the App object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *AppMutation) OldDeviceID(ctx context.Context) (v model.InternalID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldDeviceID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldDeviceID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldDeviceID: %w", err) + } + return oldValue.DeviceID, nil +} + +// AddDeviceID adds mi to the "device_id" field. +func (m *AppMutation) AddDeviceID(mi model.InternalID) { + if m.adddevice_id != nil { + *m.adddevice_id += mi + } else { + m.adddevice_id = &mi + } +} + +// AddedDeviceID returns the value that was added to the "device_id" field in this mutation. +func (m *AppMutation) AddedDeviceID() (r model.InternalID, exists bool) { + v := m.adddevice_id + if v == nil { + return + } + return *v, true +} + +// ResetDeviceID resets all changes to the "device_id" field. +func (m *AppMutation) ResetDeviceID() { + m.device_id = nil + m.adddevice_id = nil +} + // SetPublic sets the "public" field. func (m *AppMutation) SetPublic(b bool) { m.public = &b @@ -1307,13 +1365,16 @@ func (m *AppMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *AppMutation) Fields() []string { - fields := make([]string, 0, 5) + fields := make([]string, 0, 6) if m.name != nil { fields = append(fields, app.FieldName) } if m.description != nil { fields = append(fields, app.FieldDescription) } + if m.device_id != nil { + fields = append(fields, app.FieldDeviceID) + } if m.public != nil { fields = append(fields, app.FieldPublic) } @@ -1335,6 +1396,8 @@ func (m *AppMutation) Field(name string) (ent.Value, bool) { return m.Name() case app.FieldDescription: return m.Description() + case app.FieldDeviceID: + return m.DeviceID() case app.FieldPublic: return m.Public() case app.FieldUpdatedAt: @@ -1354,6 +1417,8 @@ func (m *AppMutation) OldField(ctx context.Context, name string) (ent.Value, err return m.OldName(ctx) case app.FieldDescription: return m.OldDescription(ctx) + case app.FieldDeviceID: + return m.OldDeviceID(ctx) case app.FieldPublic: return m.OldPublic(ctx) case app.FieldUpdatedAt: @@ -1383,6 +1448,13 @@ func (m *AppMutation) SetField(name string, value ent.Value) error { } m.SetDescription(v) return nil + case app.FieldDeviceID: + v, ok := value.(model.InternalID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetDeviceID(v) + return nil case app.FieldPublic: v, ok := value.(bool) if !ok { @@ -1411,13 +1483,21 @@ func (m *AppMutation) SetField(name string, value ent.Value) error { // AddedFields returns all numeric fields that were incremented/decremented during // this mutation. func (m *AppMutation) AddedFields() []string { - return nil + var fields []string + if m.adddevice_id != nil { + fields = append(fields, app.FieldDeviceID) + } + return fields } // AddedField returns the numeric value that was incremented/decremented on a field // with the given name. The second boolean return value indicates that this field // was not set, or was not defined in the schema. func (m *AppMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case app.FieldDeviceID: + return m.AddedDeviceID() + } return nil, false } @@ -1426,6 +1506,13 @@ func (m *AppMutation) AddedField(name string) (ent.Value, bool) { // type. func (m *AppMutation) AddField(name string, value ent.Value) error { switch name { + case app.FieldDeviceID: + v, ok := value.(model.InternalID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddDeviceID(v) + return nil } return fmt.Errorf("unknown App numeric field %s", name) } @@ -1459,6 +1546,9 @@ func (m *AppMutation) ResetField(name string) error { case app.FieldDescription: m.ResetDescription() return nil + case app.FieldDeviceID: + m.ResetDeviceID() + return nil case app.FieldPublic: m.ResetPublic() return nil diff --git a/app/sephirah/internal/data/internal/ent/runtime.go b/app/sephirah/internal/data/internal/ent/runtime.go index 4c991b35..70b61a0d 100644 --- a/app/sephirah/internal/data/internal/ent/runtime.go +++ b/app/sephirah/internal/data/internal/ent/runtime.go @@ -54,13 +54,13 @@ func init() { appFields := schema.App{}.Fields() _ = appFields // appDescUpdatedAt is the schema descriptor for updated_at field. - appDescUpdatedAt := appFields[4].Descriptor() + appDescUpdatedAt := appFields[5].Descriptor() // app.DefaultUpdatedAt holds the default value on creation for the updated_at field. app.DefaultUpdatedAt = appDescUpdatedAt.Default.(func() time.Time) // app.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. app.UpdateDefaultUpdatedAt = appDescUpdatedAt.UpdateDefault.(func() time.Time) // appDescCreatedAt is the schema descriptor for created_at field. - appDescCreatedAt := appFields[5].Descriptor() + appDescCreatedAt := appFields[6].Descriptor() // app.DefaultCreatedAt holds the default value on creation for the created_at field. app.DefaultCreatedAt = appDescCreatedAt.Default.(func() time.Time) appbinaryFields := schema.AppBinary{}.Fields() diff --git a/app/sephirah/internal/data/internal/ent/schema/app.go b/app/sephirah/internal/data/internal/ent/schema/app.go index f2469a23..351c9489 100644 --- a/app/sephirah/internal/data/internal/ent/schema/app.go +++ b/app/sephirah/internal/data/internal/ent/schema/app.go @@ -3,6 +3,8 @@ package schema import ( "time" + "github.com/tuihub/librarian/internal/model" + "entgo.io/ent" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" @@ -17,6 +19,7 @@ func (App) Fields() []ent.Field { defaultPrimaryKey(), field.String("name"), field.Text("description"), + field.Int64("device_id").GoType(model.InternalID(0)), field.Bool("public"), field.Time("updated_at"). Default(time.Now).UpdateDefault(time.Now), diff --git a/app/sephirah/internal/model/converter/biz_to_pb.go b/app/sephirah/internal/model/converter/biz_to_pb.go index 02548073..16afe5e6 100644 --- a/app/sephirah/internal/model/converter/biz_to_pb.go +++ b/app/sephirah/internal/model/converter/biz_to_pb.go @@ -124,8 +124,8 @@ type toPBConverter interface { //nolint:unused // used by generator // goverter:ignore Chunks ToPBAppBinary(*modelgebura.AppBinary) *pb.AppBinary - ToPBAppInst(*modelgebura.AppInst) *pb.AppInst - ToPBAppInstList([]*modelgebura.AppInst) []*pb.AppInst + // ToPBAppInst(*modelgebura.AppInst) *pb.AppInst + // ToPBAppInstList([]*modelgebura.AppInst) []*pb.AppInst ToPBFeed(*modelfeed.Feed) *librarian.Feed ToPBFeedItem(*modelfeed.Item) *librarian.FeedItem diff --git a/app/sephirah/internal/model/converter/generated.go b/app/sephirah/internal/model/converter/generated.go index d2ebe2c8..b4294f01 100755 --- a/app/sephirah/internal/model/converter/generated.go +++ b/app/sephirah/internal/model/converter/generated.go @@ -38,6 +38,7 @@ func ToBizApp(source *v11.App) *modelgebura.App { modelgeburaApp.ID = ToBizInternalID((*source).Id) modelgeburaApp.Name = (*source).Name modelgeburaApp.Description = (*source).Description + modelgeburaApp.DeviceID = ToBizInternalID((*source).DeviceId) modelgeburaApp.Public = (*source).Public modelgeburaApp.AssignedAppInfoID = ToBizInternalID((*source).AssignedAppInfoId) pModelgeburaApp = &modelgeburaApp @@ -141,17 +142,6 @@ func ToBizAppInfoList(source []*v1.AppInfo) []*modelgebura.AppInfo { } return pModelgeburaAppInfoList } -func ToBizAppInst(source *v11.AppInst) *modelgebura.AppInst { - var pModelgeburaAppInst *modelgebura.AppInst - if source != nil { - var modelgeburaAppInst modelgebura.AppInst - modelgeburaAppInst.ID = ToBizInternalID((*source).Id) - modelgeburaAppInst.AppID = ToBizInternalID((*source).AppId) - modelgeburaAppInst.DeviceID = ToBizInternalID((*source).DeviceId) - pModelgeburaAppInst = &modelgeburaAppInst - } - return pModelgeburaAppInst -} func ToBizAppType(source v1.AppType) modelgebura.AppType { var modelgeburaAppType modelgebura.AppType switch source { @@ -859,6 +849,7 @@ func ToPBApp(source *modelgebura.App) *v11.App { v1App.Name = (*source).Name v1App.Description = (*source).Description v1App.AssignedAppInfoId = ToPBInternalID((*source).AssignedAppInfoID) + v1App.DeviceId = ToPBInternalID((*source).DeviceID) v1App.Public = (*source).Public pV1App = &v1App } @@ -963,27 +954,6 @@ func ToPBAppInfoMixedList(source []*modelgebura.AppInfoMixed) []*v1.AppInfoMixed } return pV1AppInfoMixedList } -func ToPBAppInst(source *modelgebura.AppInst) *v11.AppInst { - var pV1AppInst *v11.AppInst - if source != nil { - var v1AppInst v11.AppInst - v1AppInst.Id = ToPBInternalID((*source).ID) - v1AppInst.DeviceId = ToPBInternalID((*source).DeviceID) - v1AppInst.AppId = ToPBInternalID((*source).AppID) - pV1AppInst = &v1AppInst - } - return pV1AppInst -} -func ToPBAppInstList(source []*modelgebura.AppInst) []*v11.AppInst { - var pV1AppInstList []*v11.AppInst - if source != nil { - pV1AppInstList = make([]*v11.AppInst, len(source)) - for i := 0; i < len(source); i++ { - pV1AppInstList[i] = ToPBAppInst(source[i]) - } - } - return pV1AppInstList -} func ToPBAppList(source []*modelgebura.App) []*v11.App { var pV1AppList []*v11.App if source != nil { diff --git a/app/sephirah/internal/model/converter/pb_to_biz.go b/app/sephirah/internal/model/converter/pb_to_biz.go index 25b795fd..0d5b545c 100644 --- a/app/sephirah/internal/model/converter/pb_to_biz.go +++ b/app/sephirah/internal/model/converter/pb_to_biz.go @@ -102,7 +102,7 @@ type toBizConverter interface { //nolint:unused // used by generator // goverter:enum:map AppType_APP_TYPE_GAME AppTypeGame ToBizAppType(librarian.AppType) modelgebura.AppType - ToBizAppInst(*pb.AppInst) *modelgebura.AppInst + // ToBizAppInst(*pb.AppInst) *modelgebura.AppInst // goverter:ignore DigestDescription // goverter:ignore DigestImages diff --git a/app/sephirah/internal/model/modelgebura/modelgebura.go b/app/sephirah/internal/model/modelgebura/modelgebura.go index 153f4916..cf517493 100644 --- a/app/sephirah/internal/model/modelgebura/modelgebura.go +++ b/app/sephirah/internal/model/modelgebura/modelgebura.go @@ -62,6 +62,7 @@ type App struct { ID model.InternalID Name string Description string + DeviceID model.InternalID Public bool AssignedAppInfoID model.InternalID } diff --git a/app/sephirah/internal/service/gebura.go b/app/sephirah/internal/service/gebura.go index 8fa59529..0d61f28a 100644 --- a/app/sephirah/internal/service/gebura.go +++ b/app/sephirah/internal/service/gebura.go @@ -252,79 +252,79 @@ func (s *LibrarianSephirahServiceService) UnAssignApp( // } // } -func (s *LibrarianSephirahServiceService) CreateAppInst( - ctx context.Context, - req *pb.CreateAppInstRequest, -) (*pb.CreateAppInstResponse, error) { - ap, err := s.g.CreateAppInst(ctx, converter.ToBizAppInst(req.GetAppInst())) - if err != nil { - return nil, err - } - return &pb.CreateAppInstResponse{Id: converter.ToPBInternalID(ap.ID)}, nil -} - -func (s *LibrarianSephirahServiceService) UpdateAppInst( - ctx context.Context, - req *pb.UpdateAppInstRequest, -) (*pb.UpdateAppInstResponse, error) { - err := s.g.UpdateAppInst(ctx, converter.ToBizAppInst(req.GetAppInst())) - if err != nil { - return nil, err - } - return &pb.UpdateAppInstResponse{}, nil -} - -func (s *LibrarianSephirahServiceService) ListAppInsts( - ctx context.Context, - req *pb.ListAppInstsRequest, -) (*pb.ListAppInstsResponse, error) { - ap, total, err := s.g.ListAppInsts(ctx, - model.ToBizPaging(req.GetPaging()), - converter.ToBizInternalIDList(req.GetIdFilter()), - converter.ToBizInternalIDList(req.GetAppIdFilter()), - converter.ToBizInternalIDList(req.GetDeviceIdFilter()), - ) - if err != nil { - return nil, err - } - return &pb.ListAppInstsResponse{ - Paging: &librarian.PagingResponse{TotalSize: int64(total)}, - AppInsts: converter.ToPBAppInstList(ap), - }, nil -} - -func (s *LibrarianSephirahServiceService) AddAppInstRunTime( - ctx context.Context, - req *pb.AddAppInstRunTimeRequest, -) (*pb.AddAppInstRunTimeResponse, error) { - err := s.g.AddAppInstRunTime(ctx, - converter.ToBizInternalID(req.GetAppInstId()), - converter.ToBizTimeRange(req.GetTimeRange()), - ) - if err != nil { - return nil, err - } - return &pb.AddAppInstRunTimeResponse{}, nil -} -func (s *LibrarianSephirahServiceService) SumAppInstRunTime( - ctx context.Context, - req *pb.SumAppInstRunTimeRequest, -) (*pb.SumAppInstRunTimeResponse, error) { - if req.GetTimeAggregation().GetAggregationType() != librarian.TimeAggregation_AGGREGATION_TYPE_OVERALL { - return nil, pb.ErrorErrorReasonBadRequest("unsupported aggregation type") - } - res, err := s.g.SumAppInstRunTime(ctx, - converter.ToBizInternalID(req.GetAppInstId()), - converter.ToBizTimeRange(req.GetTimeAggregation().GetTimeRange()), - ) - if err != nil { - return nil, err - } - return &pb.SumAppInstRunTimeResponse{RunTimeGroups: []*pb.SumAppInstRunTimeResponse_Group{{ - TimeRange: req.GetTimeAggregation().GetTimeRange(), - Duration: converter.ToPBDuration(res), - }}}, nil -} +// func (s *LibrarianSephirahServiceService) CreateAppInst( +// ctx context.Context, +// req *pb.CreateAppInstRequest, +// ) (*pb.CreateAppInstResponse, error) { +// ap, err := s.g.CreateAppInst(ctx, converter.ToBizAppInst(req.GetAppInst())) +// if err != nil { +// return nil, err +// } +// return &pb.CreateAppInstResponse{Id: converter.ToPBInternalID(ap.ID)}, nil +//} +// +// func (s *LibrarianSephirahServiceService) UpdateAppInst( +// ctx context.Context, +// req *pb.UpdateAppInstRequest, +// ) (*pb.UpdateAppInstResponse, error) { +// err := s.g.UpdateAppInst(ctx, converter.ToBizAppInst(req.GetAppInst())) +// if err != nil { +// return nil, err +// } +// return &pb.UpdateAppInstResponse{}, nil +//} +// +// func (s *LibrarianSephirahServiceService) ListAppInsts( +// ctx context.Context, +// req *pb.ListAppInstsRequest, +// ) (*pb.ListAppInstsResponse, error) { +// ap, total, err := s.g.ListAppInsts(ctx, +// model.ToBizPaging(req.GetPaging()), +// converter.ToBizInternalIDList(req.GetIdFilter()), +// converter.ToBizInternalIDList(req.GetAppIdFilter()), +// converter.ToBizInternalIDList(req.GetDeviceIdFilter()), +// ) +// if err != nil { +// return nil, err +// } +// return &pb.ListAppInstsResponse{ +// Paging: &librarian.PagingResponse{TotalSize: int64(total)}, +// AppInsts: converter.ToPBAppInstList(ap), +// }, nil +//} +// +// func (s *LibrarianSephirahServiceService) AddAppInstRunTime( +// ctx context.Context, +// req *pb.AddAppInstRunTimeRequest, +// ) (*pb.AddAppInstRunTimeResponse, error) { +// err := s.g.AddAppInstRunTime(ctx, +// converter.ToBizInternalID(req.GetAppInstId()), +// converter.ToBizTimeRange(req.GetTimeRange()), +// ) +// if err != nil { +// return nil, err +// } +// return &pb.AddAppInstRunTimeResponse{}, nil +// } +// func (s *LibrarianSephirahServiceService) SumAppInstRunTime( +// ctx context.Context, +// req *pb.SumAppInstRunTimeRequest, +// ) (*pb.SumAppInstRunTimeResponse, error) { +// if req.GetTimeAggregation().GetAggregationType() != librarian.TimeAggregation_AGGREGATION_TYPE_OVERALL { +// return nil, pb.ErrorErrorReasonBadRequest("unsupported aggregation type") +// } +// res, err := s.g.SumAppInstRunTime(ctx, +// converter.ToBizInternalID(req.GetAppInstId()), +// converter.ToBizTimeRange(req.GetTimeAggregation().GetTimeRange()), +// ) +// if err != nil { +// return nil, err +// } +// return &pb.SumAppInstRunTimeResponse{RunTimeGroups: []*pb.SumAppInstRunTimeResponse_Group{{ +// TimeRange: req.GetTimeAggregation().GetTimeRange(), +// Duration: converter.ToPBDuration(res), +// }}}, nil +// } func (s *LibrarianSephirahServiceService) UploadAppSaveFile( ctx context.Context, diff --git a/app/sephirah/pkg/service/wire.go b/app/sephirah/pkg/service/wire.go index f3f9af17..9926df38 100644 --- a/app/sephirah/pkg/service/wire.go +++ b/app/sephirah/pkg/service/wire.go @@ -15,9 +15,10 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" + "github.com/tuihub/librarian/internal/lib/libsearch" miner "github.com/tuihub/protos/pkg/librarian/miner/v1" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" pb "github.com/tuihub/protos/pkg/librarian/sephirah/v1" @@ -35,8 +36,8 @@ func NewSephirahService( *libcron.Cron, libcache.Store, *libapp.Settings, - //mapper.LibrarianMapperServiceClient, - searcher.LibrarianSearcherServiceClient, + *libidgenerator.IDGenerator, + libsearch.Search, miner.LibrarianMinerServiceClient, ) (pb.LibrarianSephirahServiceServer, func(), error) { panic(wire.Build( diff --git a/app/sephirah/pkg/service/wire_gen.go b/app/sephirah/pkg/service/wire_gen.go index 68b89789..265774af 100644 --- a/app/sephirah/pkg/service/wire_gen.go +++ b/app/sephirah/pkg/service/wire_gen.go @@ -23,15 +23,16 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" - v1_2 "github.com/tuihub/protos/pkg/librarian/miner/v1" - "github.com/tuihub/protos/pkg/librarian/searcher/v1" - v1_3 "github.com/tuihub/protos/pkg/librarian/sephirah/v1" + "github.com/tuihub/librarian/internal/lib/libsearch" + "github.com/tuihub/protos/pkg/librarian/miner/v1" + v1_2 "github.com/tuihub/protos/pkg/librarian/sephirah/v1" ) // Injectors from wire.go: -func NewSephirahService(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, consul *conf.Consul, auth *libauth.Auth, mq *libmq.MQ, cron *libcron.Cron, store libcache.Store, settings *libapp.Settings, librarianSearcherServiceClient v1.LibrarianSearcherServiceClient, librarianMinerServiceClient v1_2.LibrarianMinerServiceClient) (v1_3.LibrarianSephirahServiceServer, func(), error) { +func NewSephirahService(sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, consul *conf.Consul, auth *libauth.Auth, mq *libmq.MQ, cron *libcron.Cron, store libcache.Store, settings *libapp.Settings, idGenerator *libidgenerator.IDGenerator, search libsearch.Search, librarianMinerServiceClient v1.LibrarianMinerServiceClient) (v1_2.LibrarianSephirahServiceServer, func(), error) { entClient, cleanup, err := data.NewSQLClient(database, settings) if err != nil { return nil, nil, err @@ -49,8 +50,7 @@ func NewSephirahService(sephirahServer *conf.SephirahServer, database *conf.Data return nil, nil, err } netzachRepo := data.NewNetzachRepo(dataData) - searcher := client.NewSearcher(librarianSearcherServiceClient) - topic := biznetzach.NewSystemNotificationTopic(netzachRepo, searcher) + topic := biznetzach.NewSystemNotificationTopic(netzachRepo, idGenerator) tipherethRepo := data.NewTipherethRepo(dataData) libcacheMap := biztiphereth.NewPorterInstanceCache(tipherethRepo, store) map2 := biztiphereth.NewPorterContextCache(tipherethRepo, store) @@ -60,7 +60,7 @@ func NewSephirahService(sephirahServer *conf.SephirahServer, database *conf.Data return nil, nil, err } geburaRepo := data.NewGeburaRepo(dataData) - angelaBase, err := bizangela.NewAngelaBase(angelaRepo, supervisorSupervisor, geburaRepo, librarianPorterServiceClient, searcher) + angelaBase, err := bizangela.NewAngelaBase(angelaRepo, supervisorSupervisor, geburaRepo, librarianPorterServiceClient, search, idGenerator) if err != nil { cleanup() return nil, nil, err @@ -83,34 +83,34 @@ func NewSephirahService(sephirahServer *conf.SephirahServer, database *conf.Data return nil, nil, err } key := biztiphereth.NewUserCountCache(tipherethRepo, store) - tiphereth, err := biztiphereth.NewTiphereth(settings, tipherethRepo, auth, supervisorSupervisor, searcher, topic4, cron, key, libcacheMap) + tiphereth, err := biztiphereth.NewTiphereth(settings, tipherethRepo, auth, supervisorSupervisor, idGenerator, search, topic4, cron, key, libcacheMap) if err != nil { cleanup() return nil, nil, err } - gebura := bizgebura.NewGebura(geburaRepo, auth, searcher, librarianPorterServiceClient, supervisorSupervisor, libmqTopic, topic2, map3) + gebura := bizgebura.NewGebura(geburaRepo, auth, idGenerator, search, librarianPorterServiceClient, supervisorSupervisor, libmqTopic, topic2, map3) binahRepo, err := data.NewBinahRepo(s3) if err != nil { cleanup() return nil, nil, err } controlBlock := bizbinah.NewControlBlock(auth) - binah := bizbinah.NewBinah(binahRepo, controlBlock, auth, librarianSearcherServiceClient) + binah := bizbinah.NewBinah(binahRepo, controlBlock, auth) yesodRepo := data.NewYesodRepo(dataData) map7 := bizyesod.NewFeedOwnerCache(yesodRepo, store) - yesod, err := bizyesod.NewYesod(yesodRepo, supervisorSupervisor, cron, searcher, topic8, topic, map7) + yesod, err := bizyesod.NewYesod(yesodRepo, supervisorSupervisor, cron, idGenerator, search, topic8, topic, map7) if err != nil { cleanup() return nil, nil, err } - netzach, err := biznetzach.NewNetzach(netzachRepo, supervisorSupervisor, searcher, mq, map5, map4, map6, topic) + netzach, err := biznetzach.NewNetzach(netzachRepo, supervisorSupervisor, idGenerator, search, mq, map5, map4, map6, topic) if err != nil { cleanup() return nil, nil, err } chesedRepo := data.NewChesedRepo(dataData) map8 := bizchesed.NewImageCache(store) - chesed, err := bizchesed.NewChesed(chesedRepo, binahRepo, cron, librarianPorterServiceClient, searcher, librarianMinerServiceClient, controlBlock, map8) + chesed, err := bizchesed.NewChesed(chesedRepo, binahRepo, idGenerator, search, cron, librarianPorterServiceClient, librarianMinerServiceClient, controlBlock, map8) if err != nil { cleanup() return nil, nil, err diff --git a/cmd/librarian/main.go b/cmd/librarian/main.go index 5dd65cb6..5cbdac1f 100644 --- a/cmd/librarian/main.go +++ b/cmd/librarian/main.go @@ -13,7 +13,6 @@ import ( "github.com/tuihub/librarian/internal/lib/libsentry" "github.com/tuihub/librarian/internal/lib/libzap" miner "github.com/tuihub/protos/pkg/librarian/miner/v1" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/v2/transport/grpc" @@ -40,8 +39,6 @@ var ( var ProviderSet = wire.NewSet( newApp, - // mapperClientSelector, - searcherClientSelector, minerClientSelector, ) @@ -106,13 +103,12 @@ func main() { bc.GetDatabase(), bc.GetS3(), bc.GetPorter(), - bc.GetMapper().GetData(), - bc.GetSearcher().GetData(), bc.GetMiner().GetData(), bc.GetAuth(), bc.GetMq(), bc.GetCache(), bc.GetConsul(), + bc.GetSearch(), appSettings, ) if err != nil { @@ -138,18 +134,6 @@ func main() { // return inproc.Mapper, nil //} -func searcherClientSelector( - conf *conf.Librarian_EnableServiceDiscovery, - c *conf.Consul, - inproc *inprocgrpc.InprocClients, - app *libapp.Settings, -) (searcher.LibrarianSearcherServiceClient, error) { - if conf.GetSearcher() { - return client.NewSearcherClient(c, app) - } - return inproc.Searcher, nil -} - func minerClientSelector( conf *conf.Librarian_EnableServiceDiscovery, c *conf.Consul, diff --git a/cmd/librarian/wire.go b/cmd/librarian/wire.go index 4ae8607b..353f9220 100644 --- a/cmd/librarian/wire.go +++ b/cmd/librarian/wire.go @@ -6,7 +6,6 @@ package main import ( minerService "github.com/tuihub/librarian/app/miner/pkg/service" - searcherService "github.com/tuihub/librarian/app/searcher/pkg/service" sephirahService "github.com/tuihub/librarian/app/sephirah/pkg/service" "github.com/tuihub/librarian/internal/conf" "github.com/tuihub/librarian/internal/inprocgrpc" @@ -14,8 +13,10 @@ import ( "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" "github.com/tuihub/librarian/internal/lib/libobserve" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/server" "github.com/go-kratos/kratos/v2" @@ -29,20 +30,17 @@ func wireApp( *conf.Database, *conf.S3, *conf.Porter, - *conf.Mapper_Data, - *conf.Searcher_Data, *conf.Miner_Data, *conf.Auth, *conf.MQ, *conf.Cache, *conf.Consul, + *conf.Search, *libapp.Settings, ) (*kratos.App, func(), error) { panic( wire.Build( sephirahService.ProviderSet, - //mapperService.ProviderSet, - searcherService.ProviderSet, minerService.ProviderSet, server.ProviderSet, inprocgrpc.ProviderSet, @@ -51,6 +49,8 @@ func wireApp( libcron.ProviderSet, libcache.ProviderSet, libobserve.ProviderSet, + libidgenerator.ProviderSet, + libsearch.ProviderSet, ProviderSet, ), ) diff --git a/cmd/librarian/wire_gen.go b/cmd/librarian/wire_gen.go index 91e74bbc..59507bf6 100644 --- a/cmd/librarian/wire_gen.go +++ b/cmd/librarian/wire_gen.go @@ -8,24 +8,25 @@ package main import ( "github.com/go-kratos/kratos/v2" - service2 "github.com/tuihub/librarian/app/miner/pkg/service" - "github.com/tuihub/librarian/app/searcher/pkg/service" - service3 "github.com/tuihub/librarian/app/sephirah/pkg/service" + "github.com/tuihub/librarian/app/miner/pkg/service" + service2 "github.com/tuihub/librarian/app/sephirah/pkg/service" "github.com/tuihub/librarian/internal/conf" "github.com/tuihub/librarian/internal/inprocgrpc" "github.com/tuihub/librarian/internal/lib/libapp" "github.com/tuihub/librarian/internal/lib/libauth" "github.com/tuihub/librarian/internal/lib/libcache" "github.com/tuihub/librarian/internal/lib/libcron" + "github.com/tuihub/librarian/internal/lib/libidgenerator" "github.com/tuihub/librarian/internal/lib/libmq" "github.com/tuihub/librarian/internal/lib/libobserve" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/server" ) // Injectors from wire.go: // wireApp init kratos application. -func wireApp(librarian_EnableServiceDiscovery *conf.Librarian_EnableServiceDiscovery, sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, mapper_Data *conf.Mapper_Data, searcher_Data *conf.Searcher_Data, miner_Data *conf.Miner_Data, auth *conf.Auth, mq *conf.MQ, cache *conf.Cache, consul *conf.Consul, settings *libapp.Settings) (*kratos.App, func(), error) { +func wireApp(librarian_EnableServiceDiscovery *conf.Librarian_EnableServiceDiscovery, sephirahServer *conf.SephirahServer, database *conf.Database, s3 *conf.S3, porter *conf.Porter, miner_Data *conf.Miner_Data, auth *conf.Auth, mq *conf.MQ, cache *conf.Cache, consul *conf.Consul, search *conf.Search, settings *libapp.Settings) (*kratos.App, func(), error) { libauthAuth, err := libauth.NewAuth(auth) if err != nil { return nil, nil, err @@ -48,42 +49,32 @@ func wireApp(librarian_EnableServiceDiscovery *conf.Librarian_EnableServiceDisco cleanup() return nil, nil, err } - librarianSearcherServiceServer, cleanup2, err := service.NewSearcherService(searcher_Data, settings) + idGenerator := libidgenerator.NewIDGenerator() + libsearchSearch, err := libsearch.NewSearch(search, settings) if err != nil { cleanup() return nil, nil, err } - librarianMinerServiceServer, cleanup3, err := service2.NewMinerService(miner_Data, settings) + librarianMinerServiceServer, cleanup2, err := service.NewMinerService(miner_Data, settings) if err != nil { - cleanup2() - cleanup() - return nil, nil, err - } - inprocClients := inprocgrpc.NewInprocClients(librarianSearcherServiceServer, librarianMinerServiceServer) - librarianSearcherServiceClient, err := searcherClientSelector(librarian_EnableServiceDiscovery, consul, inprocClients, settings) - if err != nil { - cleanup3() - cleanup2() cleanup() return nil, nil, err } + inprocClients := inprocgrpc.NewInprocClients(librarianMinerServiceServer) librarianMinerServiceClient, err := minerClientSelector(librarian_EnableServiceDiscovery, consul, inprocClients, settings) if err != nil { - cleanup3() cleanup2() cleanup() return nil, nil, err } - librarianSephirahServiceServer, cleanup4, err := service3.NewSephirahService(sephirahServer, database, s3, porter, consul, libauthAuth, libmqMQ, cron, store, settings, librarianSearcherServiceClient, librarianMinerServiceClient) + librarianSephirahServiceServer, cleanup3, err := service2.NewSephirahService(sephirahServer, database, s3, porter, consul, libauthAuth, libmqMQ, cron, store, settings, idGenerator, libsearchSearch, librarianMinerServiceClient) if err != nil { - cleanup3() cleanup2() cleanup() return nil, nil, err } grpcServer, err := server.NewGRPCServer(sephirahServer, libauthAuth, librarianSephirahServiceServer, settings, builtInObserver) if err != nil { - cleanup4() cleanup3() cleanup2() cleanup() @@ -91,7 +82,6 @@ func wireApp(librarian_EnableServiceDiscovery *conf.Librarian_EnableServiceDisco } httpServer, err := server.NewGrpcWebServer(grpcServer, sephirahServer, libauthAuth, settings, builtInObserver) if err != nil { - cleanup4() cleanup3() cleanup2() cleanup() @@ -99,14 +89,12 @@ func wireApp(librarian_EnableServiceDiscovery *conf.Librarian_EnableServiceDisco } app, err := newApp(grpcServer, httpServer, libmqMQ, cron, builtInObserver, consul) if err != nil { - cleanup4() cleanup3() cleanup2() cleanup() return nil, nil, err } return app, func() { - cleanup4() cleanup3() cleanup2() cleanup() diff --git a/go.mod b/go.mod index eaf9beb8..212ce0ed 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,6 @@ require ( github.com/ThreeDotsLabs/watermill-sql/v3 v3.1.0 github.com/blevesearch/bleve/v2 v2.4.3 github.com/bufbuild/protovalidate-go v0.7.3 - github.com/cayleygraph/cayley v0.7.7 - github.com/cayleygraph/quad v1.3.0 github.com/dchest/captcha v1.1.0 github.com/dgraph-io/ristretto v0.2.0 github.com/fullstorydev/grpchan v1.1.1 @@ -35,9 +33,7 @@ require ( github.com/minio/minio-go/v7 v7.0.81 github.com/redis/go-redis/v9 v9.7.0 github.com/sony/sonyflake v1.2.0 - github.com/stretchr/testify v1.10.0 - github.com/tuihub/protos v0.4.23 - github.com/zhihu/norm v0.1.11 + github.com/tuihub/protos v0.4.25 go.opentelemetry.io/otel v1.32.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0 @@ -98,12 +94,9 @@ require ( github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/facebook/fbthrift/thrift/lib/go/thrift v0.0.0-20240106173148-f66811508108 // indirect github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-ini/ini v1.67.0 // indirect @@ -113,9 +106,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/inflect v0.19.0 // indirect github.com/go-playground/form/v4 v4.2.0 // indirect - github.com/gobuffalo/logger v1.0.7 // indirect - github.com/gobuffalo/packd v1.0.2 // indirect - github.com/gobuffalo/packr/v2 v2.8.3 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect @@ -133,20 +123,15 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl/v2 v2.16.1 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jhump/protoreflect v1.15.1 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/karrick/godirwalk v1.17.0 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/lithammer/shortuuid/v3 v3.0.7 // indirect github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/markbates/errx v1.1.0 // indirect - github.com/markbates/oncer v1.0.0 // indirect - github.com/markbates/safe v1.0.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/md5-simd v1.1.2 // indirect @@ -158,25 +143,18 @@ require ( github.com/mschoch/smat v0.2.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/xid v1.6.0 // indirect github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect github.com/shirou/gopsutil/v3 v3.23.6 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/sony/gobreaker v1.0.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.10.0 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/vesoft-inc/nebula-go/v2 v2.6.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect @@ -192,7 +170,6 @@ require ( golang.org/x/net v0.32.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/tools v0.28.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -201,5 +178,3 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect ) - -replace github.com/cayleygraph/cayley v0.7.7 => github.com/cayleygraph/cayley v0.7.7-0.20220304214302-275a7428fb10 diff --git a/go.sum b/go.sum index c0692afc..737d82b1 100644 --- a/go.sum +++ b/go.sum @@ -6,50 +6,11 @@ cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= entgo.io/ent v0.14.1 h1:fUERL506Pqr92EPHJqr8EYxbPioflJo6PudkrEA8a/s= entgo.io/ent v0.14.1/go.mod h1:MH6XLG0KXpkcDQhKiHfANZSzR55TJyPL5IGNpI8wpco= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= @@ -58,9 +19,6 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20O github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.10.0 h1:6fiXdLuUvYs2OJSvNRqlNPoBm6YABE226xrbavY5Wv4= github.com/PuerkitoBio/goquery v1.10.0/go.mod h1:TjZZl68Q3eGHNBA8CWaxAN7rOU1EbDz3CWuolcO5Yu4= github.com/Rican7/retry v0.3.1 h1:scY4IbO8swckzoA/11HgBwaZRJEyY9vaNJshcdhp1Mc= @@ -88,7 +46,6 @@ github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1 github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -96,7 +53,6 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= @@ -109,7 +65,6 @@ github.com/aws/aws-sdk-go v1.44.256/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8 github.com/aws/aws-sdk-go v1.49.5 h1:y2yfBlwjPDi3/sBVKeznYEdDy6wIhjA2L5NCBMLUIYA= github.com/aws/aws-sdk-go v1.49.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/badgerodon/peg v0.0.0-20130729175151-9e5f7f4d07ca/go.mod h1:TWe0N2hv5qvpLHT+K16gYcGBllld4h65dQ/5CNuirmk= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -120,7 +75,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blevesearch/bleve/v2 v2.4.3 h1:XDYj+1prgX84L2Cf+V3ojrOPqXxy0qxyd2uLMmeuD+4= github.com/blevesearch/bleve/v2 v2.4.3/go.mod h1:hEPDPrbYw3vyrm5VOa36GyS4bHWuIf4Fflp7460QQXY= github.com/blevesearch/bleve_index_api v1.1.12 h1:P4bw9/G/5rulOF7SJ9l4FsDoo7UFJ+5kexNy1RXfegY= @@ -157,7 +111,6 @@ github.com/blevesearch/zapx/v15 v15.3.16 h1:Ct3rv7FUJPfPk99TI/OofdC+Kpb4IdyfdMH4 github.com/blevesearch/zapx/v15 v15.3.16/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= github.com/blevesearch/zapx/v16 v16.1.8 h1:Bxzpw6YQpFs7UjoCV1+RvDw6fmAT2GZxldwX8b3wVBM= github.com/blevesearch/zapx/v16 v16.1.8/go.mod h1:JqQlOqlRVaYDkpLIl3JnKql8u4zKTNlVEa3nLsi0Gn8= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -169,12 +122,6 @@ github.com/bufbuild/protovalidate-go v0.7.3/go.mod h1:CFv34wMqiBzAHdQ4q/tWYi9ILF github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cayleygraph/cayley v0.7.7-0.20220304214302-275a7428fb10 h1:ZWd1JFIfAFJWsCwPA+njtu8n2hv/R8jr7Nd9K70tY/I= -github.com/cayleygraph/cayley v0.7.7-0.20220304214302-275a7428fb10/go.mod h1:j6ORoXMqfTuxXMwgDZS89+TE8xSdg09Wfxf3QUUupDo= -github.com/cayleygraph/quad v1.2.4/go.mod h1:XOianlRdDK5Upno/6svE6APe/wD8XgYrL9smqK875nU= -github.com/cayleygraph/quad v1.3.0 h1:xg7HOLWWPgvZ4CcvzEpfCwq42L8mzYUR+8V0jtYoBzc= -github.com/cayleygraph/quad v1.3.0/go.mod h1:NadtM7uMm78FskmX++XiOOrNvgkq0E1KvvhQdMseMz4= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= @@ -184,82 +131,42 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cevatbarisyilmaz/ara v0.0.4 h1:SGH10hXpBJhhTlObuZzTuFn1rrdmjQImITXnZVPSodc= github.com/cevatbarisyilmaz/ara v0.0.4/go.mod h1:BfFOxnUd6Mj6xmcvRxHN3Sr21Z1T3U2MYkYOmoQe4Ts= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cznic/mathutil v0.0.0-20170313102836-1447ad269d64/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkEQxENCrlLo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dchest/captcha v1.1.0 h1:2kt47EoYUUkaISobUdTbqwx55xvKOJxyScVfw25xzhQ= github.com/dchest/captcha v1.1.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo= -github.com/dennwc/base v1.0.0/go.mod h1:zaTDIiAcg2oKW9XhjIaRc1kJVteCFXSSW6jwmCedUaI= -github.com/dennwc/graphql v0.0.0-20180603144102-12cfed44bc5d/go.mod h1:lg9KQn0BgRCSCGNpcGvJp/0Ljf1Yxk8TZq9HSYc43fk= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.5.4/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= -github.com/dgraph-io/badger v1.5.5/go.mod h1:QgCntgIUPsjnp7cMLhUybJHb7iIoQWAHT6tF8ngCjWk= github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE= github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190416075124-e1214b5e05dc/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.1.4 h1:1udHhhGkIMplSrLeMJpPN7BHz1Iq2wVBUcb+3fxzhQM= -github.com/dlclark/regexp2 v1.1.4/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/docker v0.7.3-0.20180412203414-a422774e593b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20190105122144-6d5bf35058fa h1:cA2OMt2CQ2yq2WhQw16mHv6ej9YY07H4pzfR/z/y+1Q= -github.com/dop251/goja v0.0.0-20190105122144-6d5bf35058fa/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -270,36 +177,22 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.13.1 h1:vPfJZCkob6yTMEgS+0TwfTUfbHjfy/6vOJ8hUWX/uXE= github.com/envoyproxy/go-control-plane v0.13.1/go.mod h1:X45hY0mufo6Fd0KW3rqsGvQMw58jvjymeCzBU3mWyHw= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= -github.com/facebook/fbthrift v0.0.0-20190922225929-2f9839604e25/go.mod h1:2tncLx5rmw69e5kMBv/yJneERbzrr1yr5fdlnTbu8lU= -github.com/facebook/fbthrift v0.31.1-0.20210223140454-614a73a42488/go.mod h1:2tncLx5rmw69e5kMBv/yJneERbzrr1yr5fdlnTbu8lU= -github.com/facebook/fbthrift/thrift/lib/go/thrift v0.0.0-20240106173148-f66811508108 h1:z3LU9oDT61PcrS/eSWsVaq22fkws3PU1khFNc+tlsxY= -github.com/facebook/fbthrift/thrift/lib/go/thrift v0.0.0-20240106173148-f66811508108/go.mod h1:K4L8XPImuqv5aCqxL7niUuXP0Anr7k0oTLyuXxIQoPs= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/flimzy/diff v0.1.5/go.mod h1:lFJtC7SPsK0EroDmGTSrdtWKAxOk3rO+q+e04LL05Hs= -github.com/flimzy/diff v0.1.6/go.mod h1:lFJtC7SPsK0EroDmGTSrdtWKAxOk3rO+q+e04LL05Hs= -github.com/flimzy/kivik v1.8.1/go.mod h1:S2aPycbG0eDFll4wgXt9uacSNkXISPufutnc9sv+mdA= -github.com/flimzy/testy v0.1.16/go.mod h1:3szguN8NXqgq9bt9Gu8TQVj698PJWmyx/VY1frwwKrM= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fsouza/go-dockerclient v1.2.2/go.mod h1:KpcjM623fQYE9MZiTGzKhjfxXAV9wbyX2C1cyRHfhl0= github.com/fullstorydev/grpchan v1.1.1 h1:heQqIJlAv5Cnks9a70GRL2EJke6QQoUB25VGR6TZQas= github.com/fullstorydev/grpchan v1.1.1/go.mod h1:f4HpiV8V6htfY/K44GWV1ESQzHBTq7DinhzqQ95lpgc= github.com/getsentry/sentry-go v0.30.0 h1:lWUwDnY7sKHaVIoZ9wYqRHJ5iEmoc0pqcRqFkosKzBo= @@ -314,18 +207,12 @@ github.com/go-co-op/gocron/v2 v2.12.4 h1:h1HWApo3T+61UrZqEY2qG1LUpDnB7tkYITxf6YI github.com/go-co-op/gocron/v2 v2.12.4/go.mod h1:xY7bJxGazKam1cz04EebrlP4S9q4iWdiAylMGP3jY9w= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kivik/couchdb v1.8.1/go.mod h1:5XJRkAMpBlEVA4q0ktIZjUPYBjoBmRoiWvwUBzP3BOQ= -github.com/go-kivik/kivik v1.8.1/go.mod h1:nIuJ8z4ikBrVUSk3Ua8NoDqYKULPNjuddjqRvlSUyyQ= -github.com/go-kivik/kiviktest v1.1.2/go.mod h1:JdhVyzixoYhoIDUt6hRf1yAfYyaDa5/u9SDOindDkfQ= -github.com/go-kivik/pouchdb v1.3.5/go.mod h1:U+siUrqLCVxeMU3QjQTYIC3/F/e6EUKm+o5buJb7vpw= github.com/go-kratos/aegis v0.2.0 h1:dObzCDWn3XVjUkgxyBp6ZeWtx/do0DPZ7LY3yNSJLUQ= github.com/go-kratos/aegis v0.2.0/go.mod h1:v0R2m73WgEEYB3XYu6aE2WcMwsZkJ/Rzuf5eVccm7bI= github.com/go-kratos/kratos/contrib/log/zap/v2 v2.0.0-20241105072421-f8b97f675b32 h1:Auyu3uKRKyu3rqf0JqnP0hP+VhQhB32USqpLYbVZdcA= @@ -359,27 +246,12 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= -github.com/gobuffalo/logger v1.0.7 h1:LTLwWelETXDYyqF/ASf0nxaIcdEOIJNxRokPcfI/xbU= -github.com/gobuffalo/logger v1.0.7/go.mod h1:u40u6Bq3VVvaMcy5sRBclD8SXhBYPS0Qk95ubt+1xJM= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY= -github.com/gobuffalo/packd v1.0.2 h1:Yg523YqnOxGIWCp69W12yYBKsoChwI7mtu6ceM9Bwfw= -github.com/gobuffalo/packd v1.0.2/go.mod h1:sUc61tDqGMXON80zpKGp92lDb86Km28jfvX7IAyxFT8= -github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= -github.com/gobuffalo/packr/v2 v2.8.3 h1:xE1yzvnO56cUC0sTpKR3DIbxZgB54AftTFMhB2XEWlY= -github.com/gobuffalo/packr/v2 v2.8.3/go.mod h1:0SahksCVcx4IMnigTjiFuyldmTrdTctXsOdiU5KwbKc= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -388,13 +260,10 @@ github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -403,24 +272,12 @@ github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFig github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -431,12 +288,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -449,73 +304,41 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI= github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/jsbuiltin v0.0.0-20180426082241-50091555e127/go.mod h1:7X1acUyFRf+oVFTU6SWw9mnb57Vxn+Nbh8iPbKg95hs= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.30.0 h1:ArHVMMILb1nQv8vZSGIwwQd2gtc+oSQZ6CalyiyH2XQ= github.com/hashicorp/consul/api v1.30.0/go.mod h1:B2uGchvaXVW2JhFoS8nqTxMD5PBykr4ebY4JWHTTeLM= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= @@ -558,7 +381,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.16.1 h1:BwuxEMD/tsYgbhIW7UuI3crjovf3MzuFWiVgiv57iHg= github.com/hashicorp/hcl/v2 v2.16.1/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -570,23 +392,16 @@ github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4 github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hidal-go/hidalgo v0.0.0-20190814174001-42e03f3b5eaa/go.mod h1:bPkrxDlroXxigw8BMWTEPTv4W5/rQwNgg2BECXsgyX0= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= @@ -599,8 +414,6 @@ github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/ github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx v3.3.0+incompatible h1:Wa90/+qsITBAPkAZjiByeIGHFcj3Ztu+VzrrIpHjL90= -github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= @@ -615,7 +428,6 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/johannesboyne/gofakes3 v0.0.0-20241026070602-0da3aa9c32ca h1:aLV7i5W7KKNHUwcmPZKDKXut6ZnJ8sdQWYDTKwhIzBU= github.com/johannesboyne/gofakes3 v0.0.0-20241026070602-0da3aa9c32ca/go.mod h1:t6osVdP++3g4v2awHz4+HFccij23BbdT1rX3W7IijqQ= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= @@ -627,20 +439,12 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= -github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= -github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -650,9 +454,7 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -666,33 +468,18 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linkeddata/gojsonld v0.0.0-20170418210642-4f5db6791326/go.mod h1:nfqkuSNlsk1bvti/oa7TThx4KmRMBmSxf3okHI9wp3E= github.com/lithammer/shortuuid/v3 v3.0.7 h1:trX0KTHy4Pbwo/6ia8fscyHoGA+mf1jWbPJVuvyJQQ8= github.com/lithammer/shortuuid/v3 v3.0.7/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a h1:N9zuLhTvBSRt0gWSiJswwQ2HqDmtX/ZCDJURnKUt1Ik= github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= -github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= -github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY= -github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= -github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -710,7 +497,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -736,7 +522,6 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -759,7 +544,6 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -767,14 +551,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/selinux v1.0.0/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -783,35 +561,23 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/piprate/json-gold v0.3.0/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= -github.com/piprate/json-gold v0.5.0 h1:RmGh1PYboCFcchVFuh2pbSWAZy4XJaqTMU4KQYsApbM= -github.com/piprate/json-gold v0.5.0/go.mod h1:WZ501QQMbZZ+3pXFPhQKzNwS1+jls0oqov3uQ2WasLs= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -822,12 +588,8 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig= github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k= -github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -838,9 +600,7 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= @@ -848,27 +608,17 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= -github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237 h1:HQagqIiBmr8YXawX/le3+O26N+vPPC1PtjaF3mwnook= -github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -876,14 +626,11 @@ github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= @@ -894,19 +641,12 @@ github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFt github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= @@ -914,27 +654,10 @@ github.com/sony/gobreaker v1.0.0 h1:feX5fGGXSl3dYd4aHZItw+FpHLvvoaqkawKjVNiFMNQ= github.com/sony/gobreaker v1.0.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sony/sonyflake v1.2.0 h1:Pfr3A+ejSg+0SPqpoAmQgEtNDAhc2G1SUYk205qVMLQ= github.com/sony/sonyflake v1.2.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -950,7 +673,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -960,72 +682,40 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tuihub/protos v0.4.23 h1:qKRxguvvVbDNBPItSB3dGYxpz+lsex2sZDXt2NyT8rE= -github.com/tuihub/protos v0.4.23/go.mod h1:lmf29LH3wf7Fb0in47Q/ar2qf2V7ogckV6dnlBrsZ1I= +github.com/tuihub/protos v0.4.25 h1:TaNV9mQRaXJEIyNYOKE0cBNFJgI49cGU+z86U9WjUvE= +github.com/tuihub/protos v0.4.25/go.mod h1:wtL6Qtrb6w+S8GgQfhEq4hxxws6eVyw4XecX1IAlL2o= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tylertreat/BoomFilters v0.0.0-20181028192813-611b3dbe80e8/go.mod h1:OYRfF6eb5wY9VRFkXJH8FFBi3plw2v+giaIu7P054pM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vesoft-inc/nebula-go/v2 v2.0.0-ga/go.mod h1:qvrlydV8O1Jbff7b7cXSLOvZNs9BcE8pFZa/1nvB3fo= -github.com/vesoft-inc/nebula-go/v2 v2.6.0 h1:yS5JH8eNjXtHSZXDRcNihdYaW9FyjOsrpG5iIMkIFBs= -github.com/vesoft-inc/nebula-go/v2 v2.6.0/go.mod h1:fehDUs97/mpmxXi9WezhznX0Dg7hmQRUoOWgDZv9zG0= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -github.com/zhihu/norm v0.1.11 h1:uFVvfkCuYOZP19ZG7hJOWqOVDSwDOoY+auZ8UPObJcU= -github.com/zhihu/norm v0.1.11/go.mod h1:VBH+aIV1TJfLIM5kyhCD812ghzjp0XIYYv5W/sdOA5A= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.mongodb.org/mongo-driver v1.0.4/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 h1:WzNab7hOOLzdDF/EoWCt4glhrbMPVMOO5JYTmpz36Ls= @@ -1061,14 +751,12 @@ go.shabbyrobe.org/gocovmerge v0.0.0-20230507111327-fa4f82cfbf4d/go.mod h1:92Uoe3 go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/ratelimit v0.3.1 h1:K4qVE+byfv/B3tC+4nYWP7v/6SimcO7HzHekoMNBma0= @@ -1076,20 +764,14 @@ go.uber.org/ratelimit v0.3.1/go.mod h1:6euWsTB6U/Nb3X++xEUXA8ciPJvr19Q/0h1+oDcJh go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1099,14 +781,6 @@ golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20241210194714-1829a127f884 h1:Y/Mj/94zIQQGHVSv1tTtQBDaQaJe62U9bkDZKKyhPCU= golang.org/x/exp v0.0.0-20241210194714-1829a127f884/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= @@ -1116,25 +790,11 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1154,39 +814,14 @@ golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1200,27 +835,12 @@ golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1236,72 +856,40 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190614160838-b47fdc937951/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1319,22 +907,15 @@ golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= @@ -1346,72 +927,24 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= @@ -1424,84 +957,19 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= @@ -1511,26 +979,14 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= @@ -1552,26 +1008,21 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/olivere/elastic.v5 v5.0.80/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= -gopkg.in/olivere/elastic.v5 v5.0.81/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1579,24 +1030,15 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/client/client.go b/internal/client/client.go index feb7bb65..12b806ca 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -3,4 +3,4 @@ package client import "github.com/google/wire" // ProviderSet is client providers. -var ProviderSet = wire.NewSet(NewMapperClient, NewSearcherClient, NewMinerClient) +var ProviderSet = wire.NewSet(NewMinerClient) diff --git a/internal/client/grpc.go b/internal/client/grpc.go index 2ebb4bb6..80d30e3a 100644 --- a/internal/client/grpc.go +++ b/internal/client/grpc.go @@ -5,56 +5,12 @@ import ( "github.com/tuihub/librarian/internal/conf" "github.com/tuihub/librarian/internal/lib/libapp" - mapper "github.com/tuihub/protos/pkg/librarian/mapper/v1" miner "github.com/tuihub/protos/pkg/librarian/miner/v1" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" "github.com/go-kratos/kratos/v2/middleware/recovery" "github.com/go-kratos/kratos/v2/transport/grpc" ) -func NewMapperClient(c *conf.Consul, app *libapp.Settings) (mapper.LibrarianMapperServiceClient, error) { - r, err := libapp.NewDiscovery(c) - if err != nil { - return nil, err - } - middlewares := []grpc.ClientOption{ - grpc.WithEndpoint("discovery:///mapper"), - grpc.WithDiscovery(r), - grpc.WithNodeFilter(libapp.NewNodeFilter()), - } - if app.EnablePanicRecovery { - middlewares = append(middlewares, grpc.WithMiddleware(recovery.Recovery())) - } - conn, err := grpc.DialInsecure( - context.Background(), - middlewares..., - ) - cli := mapper.NewLibrarianMapperServiceClient(conn) - return cli, err -} - -func NewSearcherClient(c *conf.Consul, app *libapp.Settings) (searcher.LibrarianSearcherServiceClient, error) { - r, err := libapp.NewDiscovery(c) - if err != nil { - return nil, err - } - middlewares := []grpc.ClientOption{ - grpc.WithEndpoint("discovery:///searcher"), - grpc.WithDiscovery(r), - grpc.WithNodeFilter(libapp.NewNodeFilter()), - } - if app.EnablePanicRecovery { - middlewares = append(middlewares, grpc.WithMiddleware(recovery.Recovery())) - } - conn, err := grpc.DialInsecure( - context.Background(), - middlewares..., - ) - cli := searcher.NewLibrarianSearcherServiceClient(conn) - return cli, err -} - func NewMinerClient(c *conf.Consul, app *libapp.Settings) (miner.LibrarianMinerServiceClient, error) { r, err := libapp.NewDiscovery(c) if err != nil { diff --git a/internal/conf/base.pb.go b/internal/conf/base.pb.go index 2fc67f03..f92ff4f2 100644 --- a/internal/conf/base.pb.go +++ b/internal/conf/base.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 +// protoc-gen-go v1.34.2 +// protoc v5.28.0 // source: conf/base.proto package conf @@ -620,6 +620,116 @@ func (x *OTLP) GetGrpcInsecure() bool { return false } +type Search struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"` + Meili *Search_MeiliSearch `protobuf:"bytes,2,opt,name=meili,proto3,oneof" json:"meili,omitempty"` +} + +func (x *Search) Reset() { + *x = Search{} + if protoimpl.UnsafeEnabled { + mi := &file_conf_base_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Search) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Search) ProtoMessage() {} + +func (x *Search) ProtoReflect() protoreflect.Message { + mi := &file_conf_base_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 Search.ProtoReflect.Descriptor instead. +func (*Search) Descriptor() ([]byte, []int) { + return file_conf_base_proto_rawDescGZIP(), []int{9} +} + +func (x *Search) GetDriver() string { + if x != nil { + return x.Driver + } + return "" +} + +func (x *Search) GetMeili() *Search_MeiliSearch { + if x != nil { + return x.Meili + } + return nil +} + +type Search_MeiliSearch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` +} + +func (x *Search_MeiliSearch) Reset() { + *x = Search_MeiliSearch{} + if protoimpl.UnsafeEnabled { + mi := &file_conf_base_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Search_MeiliSearch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Search_MeiliSearch) ProtoMessage() {} + +func (x *Search_MeiliSearch) ProtoReflect() protoreflect.Message { + mi := &file_conf_base_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 Search_MeiliSearch.ProtoReflect.Descriptor instead. +func (*Search_MeiliSearch) Descriptor() ([]byte, []int) { + return file_conf_base_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *Search_MeiliSearch) GetAddr() string { + if x != nil { + return x.Addr + } + return "" +} + +func (x *Search_MeiliSearch) GetApiKey() string { + if x != nil { + return x.ApiKey + } + return "" +} + var File_conf_base_proto protoreflect.FileDescriptor var file_conf_base_proto_rawDesc = []byte{ @@ -682,10 +792,20 @@ var file_conf_base_proto_rawDesc = []byte{ 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x67, 0x72, 0x70, 0x63, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x42, 0x1e, 0x5a, - 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x67, 0x72, 0x70, 0x63, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x22, 0xa1, 0x01, + 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x65, 0x69, 0x6c, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2e, 0x4d, 0x65, 0x69, 0x6c, 0x69, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, + 0x00, 0x52, 0x05, 0x6d, 0x65, 0x69, 0x6c, 0x69, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0b, 0x4d, + 0x65, 0x69, 0x6c, 0x69, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x17, + 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x65, 0x69, 0x6c, + 0x69, 0x42, 0x1e, 0x5a, 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, + 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -700,8 +820,8 @@ func file_conf_base_proto_rawDescGZIP() []byte { return file_conf_base_proto_rawDescData } -var file_conf_base_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_conf_base_proto_goTypes = []interface{}{ +var file_conf_base_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_conf_base_proto_goTypes = []any{ (*GRPC)(nil), // 0: kratos.api.GRPC (*Database)(nil), // 1: kratos.api.Database (*S3)(nil), // 2: kratos.api.S3 @@ -711,15 +831,18 @@ var file_conf_base_proto_goTypes = []interface{}{ (*Consul)(nil), // 6: kratos.api.Consul (*Sentry)(nil), // 7: kratos.api.Sentry (*OTLP)(nil), // 8: kratos.api.OTLP - (*durationpb.Duration)(nil), // 9: google.protobuf.Duration + (*Search)(nil), // 9: kratos.api.Search + (*Search_MeiliSearch)(nil), // 10: kratos.api.Search.MeiliSearch + (*durationpb.Duration)(nil), // 11: google.protobuf.Duration } var file_conf_base_proto_depIdxs = []int32{ - 9, // 0: kratos.api.GRPC.timeout:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 11, // 0: kratos.api.GRPC.timeout:type_name -> google.protobuf.Duration + 10, // 1: kratos.api.Search.meili:type_name -> kratos.api.Search.MeiliSearch + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] 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_conf_base_proto_init() } @@ -728,7 +851,7 @@ func file_conf_base_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_conf_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GRPC); i { case 0: return &v.state @@ -740,7 +863,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Database); i { case 0: return &v.state @@ -752,7 +875,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*S3); i { case 0: return &v.state @@ -764,7 +887,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*MQ); i { case 0: return &v.state @@ -776,7 +899,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Auth); i { case 0: return &v.state @@ -788,7 +911,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Cache); i { case 0: return &v.state @@ -800,7 +923,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Consul); i { case 0: return &v.state @@ -812,7 +935,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Sentry); i { case 0: return &v.state @@ -824,7 +947,7 @@ func file_conf_base_proto_init() { return nil } } - file_conf_base_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_conf_base_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*OTLP); i { case 0: return &v.state @@ -836,14 +959,39 @@ func file_conf_base_proto_init() { return nil } } + file_conf_base_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*Search); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_conf_base_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*Search_MeiliSearch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } + file_conf_base_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_conf_base_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/conf/base.proto b/internal/conf/base.proto index f294c818..b2beb28f 100644 --- a/internal/conf/base.proto +++ b/internal/conf/base.proto @@ -61,4 +61,13 @@ message OTLP { string endpoint = 2; string headers = 3; bool grpc_insecure = 4; +} + +message Search { + string driver = 1; + message MeiliSearch { + string addr = 1; + string api_key = 2; + } + optional MeiliSearch meili = 2; } \ No newline at end of file diff --git a/internal/conf/librarian.pb.go b/internal/conf/librarian.pb.go index 15fb6bc8..c88226b1 100644 --- a/internal/conf/librarian.pb.go +++ b/internal/conf/librarian.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 +// protoc-gen-go v1.34.2 +// protoc v5.28.0 // source: conf/librarian.proto package conf @@ -35,9 +35,8 @@ type Librarian struct { Porter *Porter `protobuf:"bytes,7,opt,name=porter,proto3" json:"porter,omitempty"` Consul *Consul `protobuf:"bytes,8,opt,name=consul,proto3" json:"consul,omitempty"` Sentry *Sentry `protobuf:"bytes,9,opt,name=sentry,proto3" json:"sentry,omitempty"` + Search *Search `protobuf:"bytes,11,opt,name=search,proto3" json:"search,omitempty"` Otlp *OTLP `protobuf:"bytes,14,opt,name=otlp,proto3" json:"otlp,omitempty"` - Mapper *Mapper `protobuf:"bytes,11,opt,name=mapper,proto3" json:"mapper,omitempty"` - Searcher *Searcher `protobuf:"bytes,12,opt,name=searcher,proto3" json:"searcher,omitempty"` Miner *Miner `protobuf:"bytes,13,opt,name=miner,proto3" json:"miner,omitempty"` } @@ -143,23 +142,16 @@ func (x *Librarian) GetSentry() *Sentry { return nil } -func (x *Librarian) GetOtlp() *OTLP { - if x != nil { - return x.Otlp - } - return nil -} - -func (x *Librarian) GetMapper() *Mapper { +func (x *Librarian) GetSearch() *Search { if x != nil { - return x.Mapper + return x.Search } return nil } -func (x *Librarian) GetSearcher() *Searcher { +func (x *Librarian) GetOtlp() *OTLP { if x != nil { - return x.Searcher + return x.Otlp } return nil } @@ -176,10 +168,8 @@ type Librarian_EnableServiceDiscovery struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mapper bool `protobuf:"varint,1,opt,name=mapper,proto3" json:"mapper,omitempty"` - Searcher bool `protobuf:"varint,2,opt,name=searcher,proto3" json:"searcher,omitempty"` - Porter bool `protobuf:"varint,3,opt,name=porter,proto3" json:"porter,omitempty"` - Miner bool `protobuf:"varint,4,opt,name=miner,proto3" json:"miner,omitempty"` + Porter bool `protobuf:"varint,1,opt,name=porter,proto3" json:"porter,omitempty"` + Miner bool `protobuf:"varint,2,opt,name=miner,proto3" json:"miner,omitempty"` } func (x *Librarian_EnableServiceDiscovery) Reset() { @@ -214,20 +204,6 @@ func (*Librarian_EnableServiceDiscovery) Descriptor() ([]byte, []int) { return file_conf_librarian_proto_rawDescGZIP(), []int{0, 0} } -func (x *Librarian_EnableServiceDiscovery) GetMapper() bool { - if x != nil { - return x.Mapper - } - return false -} - -func (x *Librarian_EnableServiceDiscovery) GetSearcher() bool { - if x != nil { - return x.Searcher - } - return false -} - func (x *Librarian_EnableServiceDiscovery) GetPorter() bool { if x != nil { return x.Porter @@ -249,63 +225,54 @@ var file_conf_librarian_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x73, 0x65, 0x70, 0x68, 0x69, 0x72, - 0x61, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x6d, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6e, - 0x66, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x95, 0x06, 0x0a, 0x09, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, - 0x12, 0x66, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x61, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x05, 0x0a, 0x09, 0x4c, + 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x12, 0x66, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x70, 0x68, 0x69, 0x72, 0x61, 0x68, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, - 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1e, - 0x0a, 0x02, 0x73, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6b, 0x72, 0x61, - 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x33, 0x52, 0x02, 0x73, 0x33, 0x12, 0x24, - 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, - 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, - 0x61, 0x75, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x02, 0x6d, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x51, - 0x52, 0x02, 0x6d, 0x71, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x2a, 0x0a, - 0x06, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x24, 0x0a, 0x04, 0x6f, 0x74, 0x6c, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x54, 0x4c, - 0x50, 0x52, 0x04, 0x6f, 0x74, 0x6c, 0x70, 0x12, 0x2a, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x52, 0x08, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x1a, 0x7a, - 0x0a, 0x16, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x1e, 0x5a, 0x1c, 0x4c, 0x69, - 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x32, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x70, 0x68, 0x69, 0x72, 0x61, 0x68, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x02, 0x73, 0x33, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x33, 0x52, 0x02, 0x73, 0x33, 0x12, 0x24, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x02, + 0x6d, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x51, 0x52, 0x02, 0x6d, 0x71, 0x12, 0x27, 0x0a, 0x05, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6b, 0x72, + 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x05, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x12, 0x2a, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x06, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x6f, 0x74, 0x6c, 0x70, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4f, 0x54, 0x4c, 0x50, 0x52, 0x04, 0x6f, 0x74, 0x6c, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6b, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x1a, 0x46, 0x0a, 0x16, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x1e, 0x5a, 0x1c, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -321,7 +288,7 @@ func file_conf_librarian_proto_rawDescGZIP() []byte { } var file_conf_librarian_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_conf_librarian_proto_goTypes = []interface{}{ +var file_conf_librarian_proto_goTypes = []any{ (*Librarian)(nil), // 0: kratos.api.Librarian (*Librarian_EnableServiceDiscovery)(nil), // 1: kratos.api.Librarian.EnableServiceDiscovery (*SephirahServer)(nil), // 2: kratos.api.SephirahServer @@ -333,10 +300,9 @@ var file_conf_librarian_proto_goTypes = []interface{}{ (*Porter)(nil), // 8: kratos.api.Porter (*Consul)(nil), // 9: kratos.api.Consul (*Sentry)(nil), // 10: kratos.api.Sentry - (*OTLP)(nil), // 11: kratos.api.OTLP - (*Mapper)(nil), // 12: kratos.api.Mapper - (*Searcher)(nil), // 13: kratos.api.Searcher - (*Miner)(nil), // 14: kratos.api.Miner + (*Search)(nil), // 11: kratos.api.Search + (*OTLP)(nil), // 12: kratos.api.OTLP + (*Miner)(nil), // 13: kratos.api.Miner } var file_conf_librarian_proto_depIdxs = []int32{ 1, // 0: kratos.api.Librarian.enable_service_discovery:type_name -> kratos.api.Librarian.EnableServiceDiscovery @@ -349,15 +315,14 @@ var file_conf_librarian_proto_depIdxs = []int32{ 8, // 7: kratos.api.Librarian.porter:type_name -> kratos.api.Porter 9, // 8: kratos.api.Librarian.consul:type_name -> kratos.api.Consul 10, // 9: kratos.api.Librarian.sentry:type_name -> kratos.api.Sentry - 11, // 10: kratos.api.Librarian.otlp:type_name -> kratos.api.OTLP - 12, // 11: kratos.api.Librarian.mapper:type_name -> kratos.api.Mapper - 13, // 12: kratos.api.Librarian.searcher:type_name -> kratos.api.Searcher - 14, // 13: kratos.api.Librarian.miner:type_name -> kratos.api.Miner - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 11, // 10: kratos.api.Librarian.search:type_name -> kratos.api.Search + 12, // 11: kratos.api.Librarian.otlp:type_name -> kratos.api.OTLP + 13, // 12: kratos.api.Librarian.miner:type_name -> kratos.api.Miner + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_conf_librarian_proto_init() } @@ -367,11 +332,9 @@ func file_conf_librarian_proto_init() { } file_conf_base_proto_init() file_conf_sephirah_proto_init() - file_conf_mapper_proto_init() - file_conf_searcher_proto_init() file_conf_miner_proto_init() if !protoimpl.UnsafeEnabled { - file_conf_librarian_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conf_librarian_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Librarian); i { case 0: return &v.state @@ -383,7 +346,7 @@ func file_conf_librarian_proto_init() { return nil } } - file_conf_librarian_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conf_librarian_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Librarian_EnableServiceDiscovery); i { case 0: return &v.state diff --git a/internal/conf/librarian.proto b/internal/conf/librarian.proto index ee7b0277..8e27ba22 100644 --- a/internal/conf/librarian.proto +++ b/internal/conf/librarian.proto @@ -5,16 +5,12 @@ option go_package = "Librarian/internal/conf;conf"; import "conf/base.proto"; import "conf/sephirah.proto"; -import "conf/mapper.proto"; -import "conf/searcher.proto"; import "conf/miner.proto"; message Librarian { message EnableServiceDiscovery { - bool mapper = 1; - bool searcher = 2; - bool porter = 3; - bool miner = 4; + bool porter = 1; + bool miner = 2; } EnableServiceDiscovery enable_service_discovery = 10; @@ -27,10 +23,9 @@ message Librarian { Porter porter = 7; Consul consul = 8; Sentry sentry = 9; + Search search = 11; OTLP otlp = 14; - Mapper mapper = 11; - Searcher searcher = 12; Miner miner = 13; } diff --git a/internal/conf/mapper.pb.go b/internal/conf/mapper.pb.go deleted file mode 100644 index 2044f934..00000000 --- a/internal/conf/mapper.pb.go +++ /dev/null @@ -1,500 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 -// source: conf/mapper.proto - -package conf - -import ( - 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) -) - -type Mapper struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Server *Mapper_Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` - Data *Mapper_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Consul *Consul `protobuf:"bytes,3,opt,name=consul,proto3" json:"consul,omitempty"` -} - -func (x *Mapper) Reset() { - *x = Mapper{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_mapper_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Mapper) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapper) ProtoMessage() {} - -func (x *Mapper) ProtoReflect() protoreflect.Message { - mi := &file_conf_mapper_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 Mapper.ProtoReflect.Descriptor instead. -func (*Mapper) Descriptor() ([]byte, []int) { - return file_conf_mapper_proto_rawDescGZIP(), []int{0} -} - -func (x *Mapper) GetServer() *Mapper_Server { - if x != nil { - return x.Server - } - return nil -} - -func (x *Mapper) GetData() *Mapper_Data { - if x != nil { - return x.Data - } - return nil -} - -func (x *Mapper) GetConsul() *Consul { - if x != nil { - return x.Consul - } - return nil -} - -type Mapper_Server struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grpc *GRPC `protobuf:"bytes,1,opt,name=grpc,proto3" json:"grpc,omitempty"` -} - -func (x *Mapper_Server) Reset() { - *x = Mapper_Server{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_mapper_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Mapper_Server) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapper_Server) ProtoMessage() {} - -func (x *Mapper_Server) ProtoReflect() protoreflect.Message { - mi := &file_conf_mapper_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 Mapper_Server.ProtoReflect.Descriptor instead. -func (*Mapper_Server) Descriptor() ([]byte, []int) { - return file_conf_mapper_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Mapper_Server) GetGrpc() *GRPC { - if x != nil { - return x.Grpc - } - return nil -} - -type Mapper_Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to GraphDB: - // - // *Mapper_Data_Nebula - // *Mapper_Data_Cayley - GraphDB isMapper_Data_GraphDB `protobuf_oneof:"GraphDB"` -} - -func (x *Mapper_Data) Reset() { - *x = Mapper_Data{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_mapper_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Mapper_Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapper_Data) ProtoMessage() {} - -func (x *Mapper_Data) ProtoReflect() protoreflect.Message { - mi := &file_conf_mapper_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 Mapper_Data.ProtoReflect.Descriptor instead. -func (*Mapper_Data) Descriptor() ([]byte, []int) { - return file_conf_mapper_proto_rawDescGZIP(), []int{0, 1} -} - -func (m *Mapper_Data) GetGraphDB() isMapper_Data_GraphDB { - if m != nil { - return m.GraphDB - } - return nil -} - -func (x *Mapper_Data) GetNebula() *Mapper_Data_NebulaGraph { - if x, ok := x.GetGraphDB().(*Mapper_Data_Nebula); ok { - return x.Nebula - } - return nil -} - -func (x *Mapper_Data) GetCayley() *Mapper_Data_CayleyGraph { - if x, ok := x.GetGraphDB().(*Mapper_Data_Cayley); ok { - return x.Cayley - } - return nil -} - -type isMapper_Data_GraphDB interface { - isMapper_Data_GraphDB() -} - -type Mapper_Data_Nebula struct { - Nebula *Mapper_Data_NebulaGraph `protobuf:"bytes,1,opt,name=nebula,proto3,oneof"` -} - -type Mapper_Data_Cayley struct { - Cayley *Mapper_Data_CayleyGraph `protobuf:"bytes,2,opt,name=cayley,proto3,oneof"` -} - -func (*Mapper_Data_Nebula) isMapper_Data_GraphDB() {} - -func (*Mapper_Data_Cayley) isMapper_Data_GraphDB() {} - -type Mapper_Data_NebulaGraph struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` - Space string `protobuf:"bytes,2,opt,name=space,proto3" json:"space,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *Mapper_Data_NebulaGraph) Reset() { - *x = Mapper_Data_NebulaGraph{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_mapper_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Mapper_Data_NebulaGraph) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapper_Data_NebulaGraph) ProtoMessage() {} - -func (x *Mapper_Data_NebulaGraph) ProtoReflect() protoreflect.Message { - mi := &file_conf_mapper_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 Mapper_Data_NebulaGraph.ProtoReflect.Descriptor instead. -func (*Mapper_Data_NebulaGraph) Descriptor() ([]byte, []int) { - return file_conf_mapper_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (x *Mapper_Data_NebulaGraph) GetAddress() []string { - if x != nil { - return x.Address - } - return nil -} - -func (x *Mapper_Data_NebulaGraph) GetSpace() string { - if x != nil { - return x.Space - } - return "" -} - -func (x *Mapper_Data_NebulaGraph) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *Mapper_Data_NebulaGraph) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type Mapper_Data_CayleyGraph struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` -} - -func (x *Mapper_Data_CayleyGraph) Reset() { - *x = Mapper_Data_CayleyGraph{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_mapper_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Mapper_Data_CayleyGraph) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapper_Data_CayleyGraph) ProtoMessage() {} - -func (x *Mapper_Data_CayleyGraph) ProtoReflect() protoreflect.Message { - mi := &file_conf_mapper_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 Mapper_Data_CayleyGraph.ProtoReflect.Descriptor instead. -func (*Mapper_Data_CayleyGraph) Descriptor() ([]byte, []int) { - return file_conf_mapper_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *Mapper_Data_CayleyGraph) GetStore() string { - if x != nil { - return x.Store - } - return "" -} - -var File_conf_mapper_proto protoreflect.FileDescriptor - -var file_conf_mapper_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x1a, - 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xf2, 0x03, 0x0a, 0x06, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x72, - 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2b, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6b, - 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, - 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x1a, 0x2e, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x24, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x52, 0x50, - 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0xab, 0x02, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x3d, 0x0a, 0x06, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x12, - 0x3d, 0x0a, 0x06, 0x63, 0x61, 0x79, 0x6c, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x79, 0x6c, 0x65, 0x79, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x79, 0x6c, 0x65, 0x79, 0x1a, 0x75, - 0x0a, 0x0b, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x23, 0x0a, 0x0b, 0x43, 0x61, 0x79, 0x6c, 0x65, 0x79, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x44, 0x42, 0x42, 0x1e, 0x5a, 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, - 0x61, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_conf_mapper_proto_rawDescOnce sync.Once - file_conf_mapper_proto_rawDescData = file_conf_mapper_proto_rawDesc -) - -func file_conf_mapper_proto_rawDescGZIP() []byte { - file_conf_mapper_proto_rawDescOnce.Do(func() { - file_conf_mapper_proto_rawDescData = protoimpl.X.CompressGZIP(file_conf_mapper_proto_rawDescData) - }) - return file_conf_mapper_proto_rawDescData -} - -var file_conf_mapper_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_conf_mapper_proto_goTypes = []interface{}{ - (*Mapper)(nil), // 0: kratos.api.Mapper - (*Mapper_Server)(nil), // 1: kratos.api.Mapper.Server - (*Mapper_Data)(nil), // 2: kratos.api.Mapper.Data - (*Mapper_Data_NebulaGraph)(nil), // 3: kratos.api.Mapper.Data.NebulaGraph - (*Mapper_Data_CayleyGraph)(nil), // 4: kratos.api.Mapper.Data.CayleyGraph - (*Consul)(nil), // 5: kratos.api.Consul - (*GRPC)(nil), // 6: kratos.api.GRPC -} -var file_conf_mapper_proto_depIdxs = []int32{ - 1, // 0: kratos.api.Mapper.server:type_name -> kratos.api.Mapper.Server - 2, // 1: kratos.api.Mapper.data:type_name -> kratos.api.Mapper.Data - 5, // 2: kratos.api.Mapper.consul:type_name -> kratos.api.Consul - 6, // 3: kratos.api.Mapper.Server.grpc:type_name -> kratos.api.GRPC - 3, // 4: kratos.api.Mapper.Data.nebula:type_name -> kratos.api.Mapper.Data.NebulaGraph - 4, // 5: kratos.api.Mapper.Data.cayley:type_name -> kratos.api.Mapper.Data.CayleyGraph - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_conf_mapper_proto_init() } -func file_conf_mapper_proto_init() { - if File_conf_mapper_proto != nil { - return - } - file_conf_base_proto_init() - if !protoimpl.UnsafeEnabled { - file_conf_mapper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mapper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_mapper_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mapper_Server); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_mapper_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mapper_Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_mapper_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mapper_Data_NebulaGraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_mapper_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mapper_Data_CayleyGraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_conf_mapper_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Mapper_Data_Nebula)(nil), - (*Mapper_Data_Cayley)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_conf_mapper_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_conf_mapper_proto_goTypes, - DependencyIndexes: file_conf_mapper_proto_depIdxs, - MessageInfos: file_conf_mapper_proto_msgTypes, - }.Build() - File_conf_mapper_proto = out.File - file_conf_mapper_proto_rawDesc = nil - file_conf_mapper_proto_goTypes = nil - file_conf_mapper_proto_depIdxs = nil -} diff --git a/internal/conf/mapper.proto b/internal/conf/mapper.proto deleted file mode 100644 index 9bfb7f7d..00000000 --- a/internal/conf/mapper.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package kratos.api; - -option go_package = "Librarian/internal/conf;conf"; - -import "conf/base.proto"; - -message Mapper { - message Server { - GRPC grpc = 1; - } - - message Data { - message NebulaGraph { - repeated string address = 1; - string space = 2; - string username = 3; - string password = 4; - } - message CayleyGraph { - string store = 1; - } - oneof GraphDB { - NebulaGraph nebula = 1; - CayleyGraph cayley = 2; - } - } - Server server = 1; - Data data = 2; - Consul consul = 3; -} - diff --git a/internal/conf/miner.pb.go b/internal/conf/miner.pb.go index 6204ef8e..90b82e74 100644 --- a/internal/conf/miner.pb.go +++ b/internal/conf/miner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 +// protoc-gen-go v1.34.2 +// protoc v5.28.0 // source: conf/miner.proto package conf @@ -266,7 +266,7 @@ func file_conf_miner_proto_rawDescGZIP() []byte { } var file_conf_miner_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_conf_miner_proto_goTypes = []interface{}{ +var file_conf_miner_proto_goTypes = []any{ (*Miner)(nil), // 0: kratos.api.Miner (*Miner_Server)(nil), // 1: kratos.api.Miner.Server (*Miner_Data)(nil), // 2: kratos.api.Miner.Data @@ -294,7 +294,7 @@ func file_conf_miner_proto_init() { } file_conf_base_proto_init() if !protoimpl.UnsafeEnabled { - file_conf_miner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conf_miner_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Miner); i { case 0: return &v.state @@ -306,7 +306,7 @@ func file_conf_miner_proto_init() { return nil } } - file_conf_miner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conf_miner_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Miner_Server); i { case 0: return &v.state @@ -318,7 +318,7 @@ func file_conf_miner_proto_init() { return nil } } - file_conf_miner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conf_miner_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Miner_Data); i { case 0: return &v.state @@ -330,7 +330,7 @@ func file_conf_miner_proto_init() { return nil } } - file_conf_miner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conf_miner_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Miner_Data_OCR); i { case 0: return &v.state diff --git a/internal/conf/searcher.pb.go b/internal/conf/searcher.pb.go deleted file mode 100644 index e2bc570e..00000000 --- a/internal/conf/searcher.pb.go +++ /dev/null @@ -1,471 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 -// source: conf/searcher.proto - -package conf - -import ( - 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) -) - -type Searcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Server *Searcher_Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` - Data *Searcher_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Consul *Consul `protobuf:"bytes,3,opt,name=consul,proto3" json:"consul,omitempty"` -} - -func (x *Searcher) Reset() { - *x = Searcher{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_searcher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Searcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Searcher) ProtoMessage() {} - -func (x *Searcher) ProtoReflect() protoreflect.Message { - mi := &file_conf_searcher_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 Searcher.ProtoReflect.Descriptor instead. -func (*Searcher) Descriptor() ([]byte, []int) { - return file_conf_searcher_proto_rawDescGZIP(), []int{0} -} - -func (x *Searcher) GetServer() *Searcher_Server { - if x != nil { - return x.Server - } - return nil -} - -func (x *Searcher) GetData() *Searcher_Data { - if x != nil { - return x.Data - } - return nil -} - -func (x *Searcher) GetConsul() *Consul { - if x != nil { - return x.Consul - } - return nil -} - -type Searcher_Server struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grpc *GRPC `protobuf:"bytes,1,opt,name=grpc,proto3" json:"grpc,omitempty"` -} - -func (x *Searcher_Server) Reset() { - *x = Searcher_Server{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_searcher_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Searcher_Server) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Searcher_Server) ProtoMessage() {} - -func (x *Searcher_Server) ProtoReflect() protoreflect.Message { - mi := &file_conf_searcher_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 Searcher_Server.ProtoReflect.Descriptor instead. -func (*Searcher_Server) Descriptor() ([]byte, []int) { - return file_conf_searcher_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Searcher_Server) GetGrpc() *GRPC { - if x != nil { - return x.Grpc - } - return nil -} - -type Searcher_Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to SearchEngine: - // - // *Searcher_Data_Bleve_ - // *Searcher_Data_Meilisearch - SearchEngine isSearcher_Data_SearchEngine `protobuf_oneof:"SearchEngine"` -} - -func (x *Searcher_Data) Reset() { - *x = Searcher_Data{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_searcher_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Searcher_Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Searcher_Data) ProtoMessage() {} - -func (x *Searcher_Data) ProtoReflect() protoreflect.Message { - mi := &file_conf_searcher_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 Searcher_Data.ProtoReflect.Descriptor instead. -func (*Searcher_Data) Descriptor() ([]byte, []int) { - return file_conf_searcher_proto_rawDescGZIP(), []int{0, 1} -} - -func (m *Searcher_Data) GetSearchEngine() isSearcher_Data_SearchEngine { - if m != nil { - return m.SearchEngine - } - return nil -} - -func (x *Searcher_Data) GetBleve() *Searcher_Data_Bleve { - if x, ok := x.GetSearchEngine().(*Searcher_Data_Bleve_); ok { - return x.Bleve - } - return nil -} - -func (x *Searcher_Data) GetMeilisearch() *Searcher_Data_MeiliSearch { - if x, ok := x.GetSearchEngine().(*Searcher_Data_Meilisearch); ok { - return x.Meilisearch - } - return nil -} - -type isSearcher_Data_SearchEngine interface { - isSearcher_Data_SearchEngine() -} - -type Searcher_Data_Bleve_ struct { - Bleve *Searcher_Data_Bleve `protobuf:"bytes,1,opt,name=bleve,proto3,oneof"` -} - -type Searcher_Data_Meilisearch struct { - Meilisearch *Searcher_Data_MeiliSearch `protobuf:"bytes,2,opt,name=meilisearch,proto3,oneof"` -} - -func (*Searcher_Data_Bleve_) isSearcher_Data_SearchEngine() {} - -func (*Searcher_Data_Meilisearch) isSearcher_Data_SearchEngine() {} - -type Searcher_Data_Bleve struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Searcher_Data_Bleve) Reset() { - *x = Searcher_Data_Bleve{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_searcher_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Searcher_Data_Bleve) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Searcher_Data_Bleve) ProtoMessage() {} - -func (x *Searcher_Data_Bleve) ProtoReflect() protoreflect.Message { - mi := &file_conf_searcher_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 Searcher_Data_Bleve.ProtoReflect.Descriptor instead. -func (*Searcher_Data_Bleve) Descriptor() ([]byte, []int) { - return file_conf_searcher_proto_rawDescGZIP(), []int{0, 1, 0} -} - -type Searcher_Data_MeiliSearch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` -} - -func (x *Searcher_Data_MeiliSearch) Reset() { - *x = Searcher_Data_MeiliSearch{} - if protoimpl.UnsafeEnabled { - mi := &file_conf_searcher_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Searcher_Data_MeiliSearch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Searcher_Data_MeiliSearch) ProtoMessage() {} - -func (x *Searcher_Data_MeiliSearch) ProtoReflect() protoreflect.Message { - mi := &file_conf_searcher_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 Searcher_Data_MeiliSearch.ProtoReflect.Descriptor instead. -func (*Searcher_Data_MeiliSearch) Descriptor() ([]byte, []int) { - return file_conf_searcher_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *Searcher_Data_MeiliSearch) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -func (x *Searcher_Data_MeiliSearch) GetApiKey() string { - if x != nil { - return x.ApiKey - } - return "" -} - -var File_conf_searcher_proto protoreflect.FileDescriptor - -var file_conf_searcher_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x1a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xac, 0x03, 0x0a, 0x08, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x33, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x1a, - 0x2e, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x04, 0x67, 0x72, 0x70, - 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, - 0xdf, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x05, 0x62, 0x6c, 0x65, 0x76, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x42, 0x6c, 0x65, 0x76, 0x65, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x65, 0x76, - 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x69, 0x6c, 0x69, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x4d, 0x65, 0x69, 0x6c, 0x69, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x00, 0x52, - 0x0b, 0x6d, 0x65, 0x69, 0x6c, 0x69, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x1a, 0x07, 0x0a, 0x05, - 0x42, 0x6c, 0x65, 0x76, 0x65, 0x1a, 0x3a, 0x0a, 0x0b, 0x4d, 0x65, 0x69, 0x6c, 0x69, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x42, 0x1e, 0x5a, 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, - 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_conf_searcher_proto_rawDescOnce sync.Once - file_conf_searcher_proto_rawDescData = file_conf_searcher_proto_rawDesc -) - -func file_conf_searcher_proto_rawDescGZIP() []byte { - file_conf_searcher_proto_rawDescOnce.Do(func() { - file_conf_searcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_conf_searcher_proto_rawDescData) - }) - return file_conf_searcher_proto_rawDescData -} - -var file_conf_searcher_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_conf_searcher_proto_goTypes = []interface{}{ - (*Searcher)(nil), // 0: kratos.api.Searcher - (*Searcher_Server)(nil), // 1: kratos.api.Searcher.Server - (*Searcher_Data)(nil), // 2: kratos.api.Searcher.Data - (*Searcher_Data_Bleve)(nil), // 3: kratos.api.Searcher.Data.Bleve - (*Searcher_Data_MeiliSearch)(nil), // 4: kratos.api.Searcher.Data.MeiliSearch - (*Consul)(nil), // 5: kratos.api.Consul - (*GRPC)(nil), // 6: kratos.api.GRPC -} -var file_conf_searcher_proto_depIdxs = []int32{ - 1, // 0: kratos.api.Searcher.server:type_name -> kratos.api.Searcher.Server - 2, // 1: kratos.api.Searcher.data:type_name -> kratos.api.Searcher.Data - 5, // 2: kratos.api.Searcher.consul:type_name -> kratos.api.Consul - 6, // 3: kratos.api.Searcher.Server.grpc:type_name -> kratos.api.GRPC - 3, // 4: kratos.api.Searcher.Data.bleve:type_name -> kratos.api.Searcher.Data.Bleve - 4, // 5: kratos.api.Searcher.Data.meilisearch:type_name -> kratos.api.Searcher.Data.MeiliSearch - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_conf_searcher_proto_init() } -func file_conf_searcher_proto_init() { - if File_conf_searcher_proto != nil { - return - } - file_conf_base_proto_init() - if !protoimpl.UnsafeEnabled { - file_conf_searcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Searcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_searcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Searcher_Server); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_searcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Searcher_Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_searcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Searcher_Data_Bleve); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conf_searcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Searcher_Data_MeiliSearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_conf_searcher_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Searcher_Data_Bleve_)(nil), - (*Searcher_Data_Meilisearch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_conf_searcher_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_conf_searcher_proto_goTypes, - DependencyIndexes: file_conf_searcher_proto_depIdxs, - MessageInfos: file_conf_searcher_proto_msgTypes, - }.Build() - File_conf_searcher_proto = out.File - file_conf_searcher_proto_rawDesc = nil - file_conf_searcher_proto_goTypes = nil - file_conf_searcher_proto_depIdxs = nil -} diff --git a/internal/conf/searcher.proto b/internal/conf/searcher.proto deleted file mode 100644 index ac081005..00000000 --- a/internal/conf/searcher.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package kratos.api; - -option go_package = "Librarian/internal/conf;conf"; - -import "conf/base.proto"; - -message Searcher { - message Server { - GRPC grpc = 1; - } - - message Data { - message Bleve {} - message MeiliSearch { - string addr = 1; - string api_key = 2; - } - oneof SearchEngine { - Bleve bleve = 1; - MeiliSearch meilisearch = 2; - } - } - - Server server = 1; - Data data = 2; - Consul consul = 3; -} \ No newline at end of file diff --git a/internal/conf/sephirah.pb.go b/internal/conf/sephirah.pb.go index b849dc18..85f7ed54 100644 --- a/internal/conf/sephirah.pb.go +++ b/internal/conf/sephirah.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 -// protoc v4.25.1 +// protoc-gen-go v1.34.2 +// protoc v5.28.0 // source: conf/sephirah.proto package conf @@ -152,6 +152,7 @@ type Sephirah struct { Porter *Porter `protobuf:"bytes,7,opt,name=porter,proto3" json:"porter,omitempty"` Consul *Consul `protobuf:"bytes,8,opt,name=consul,proto3" json:"consul,omitempty"` Sentry *Sentry `protobuf:"bytes,9,opt,name=sentry,proto3" json:"sentry,omitempty"` + Search *Search `protobuf:"bytes,10,opt,name=search,proto3" json:"search,omitempty"` } func (x *Sephirah) Reset() { @@ -249,6 +250,13 @@ func (x *Sephirah) GetSentry() *Sentry { return nil } +func (x *Sephirah) GetSearch() *Search { + if x != nil { + return x.Search + } + return nil +} + type SephirahServer_Info struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -357,7 +365,7 @@ var file_conf_sephirah_proto_rawDesc = []byte{ 0x3c, 0x0a, 0x06, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x22, 0x83, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x22, 0xaf, 0x03, 0x0a, 0x08, 0x53, 0x65, 0x70, 0x68, 0x69, 0x72, 0x61, 0x68, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x70, 0x68, 0x69, 0x72, 0x61, 0x68, @@ -382,9 +390,12 @@ var file_conf_sephirah_proto_rawDesc = []byte{ 0x06, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x42, 0x1e, 0x5a, 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, - 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, + 0x1e, 0x5a, 0x1c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -400,7 +411,7 @@ func file_conf_sephirah_proto_rawDescGZIP() []byte { } var file_conf_sephirah_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_conf_sephirah_proto_goTypes = []interface{}{ +var file_conf_sephirah_proto_goTypes = []any{ (*SephirahServer)(nil), // 0: kratos.api.SephirahServer (*Porter)(nil), // 1: kratos.api.Porter (*Sephirah)(nil), // 2: kratos.api.Sephirah @@ -413,6 +424,7 @@ var file_conf_sephirah_proto_goTypes = []interface{}{ (*Cache)(nil), // 9: kratos.api.Cache (*Consul)(nil), // 10: kratos.api.Consul (*Sentry)(nil), // 11: kratos.api.Sentry + (*Search)(nil), // 12: kratos.api.Search } var file_conf_sephirah_proto_depIdxs = []int32{ 4, // 0: kratos.api.SephirahServer.grpc:type_name -> kratos.api.GRPC @@ -427,11 +439,12 @@ var file_conf_sephirah_proto_depIdxs = []int32{ 1, // 9: kratos.api.Sephirah.porter:type_name -> kratos.api.Porter 10, // 10: kratos.api.Sephirah.consul:type_name -> kratos.api.Consul 11, // 11: kratos.api.Sephirah.sentry:type_name -> kratos.api.Sentry - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] 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 + 12, // 12: kratos.api.Sephirah.search:type_name -> kratos.api.Search + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_conf_sephirah_proto_init() } @@ -441,7 +454,7 @@ func file_conf_sephirah_proto_init() { } file_conf_base_proto_init() if !protoimpl.UnsafeEnabled { - file_conf_sephirah_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conf_sephirah_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SephirahServer); i { case 0: return &v.state @@ -453,7 +466,7 @@ func file_conf_sephirah_proto_init() { return nil } } - file_conf_sephirah_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conf_sephirah_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Porter); i { case 0: return &v.state @@ -465,7 +478,7 @@ func file_conf_sephirah_proto_init() { return nil } } - file_conf_sephirah_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conf_sephirah_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Sephirah); i { case 0: return &v.state @@ -477,7 +490,7 @@ func file_conf_sephirah_proto_init() { return nil } } - file_conf_sephirah_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conf_sephirah_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SephirahServer_Info); i { case 0: return &v.state diff --git a/internal/conf/sephirah.proto b/internal/conf/sephirah.proto index 5b18bc65..0bcfd26d 100644 --- a/internal/conf/sephirah.proto +++ b/internal/conf/sephirah.proto @@ -33,4 +33,5 @@ message Sephirah { Porter porter = 7; Consul consul = 8; Sentry sentry = 9; + Search search = 10; } diff --git a/internal/inprocgrpc/inprocgrpc.go b/internal/inprocgrpc/inprocgrpc.go index 75f06cda..108451ab 100644 --- a/internal/inprocgrpc/inprocgrpc.go +++ b/internal/inprocgrpc/inprocgrpc.go @@ -2,7 +2,6 @@ package inprocgrpc import ( miner "github.com/tuihub/protos/pkg/librarian/miner/v1" - searcher "github.com/tuihub/protos/pkg/librarian/searcher/v1" "github.com/fullstorydev/grpchan/inprocgrpc" "github.com/google/wire" @@ -11,37 +10,17 @@ import ( var ProviderSet = wire.NewSet(NewInprocClients) type InprocClients struct { - // Mapper mapper.LibrarianMapperServiceClient - Searcher searcher.LibrarianSearcherServiceClient - Miner miner.LibrarianMinerServiceClient + Miner miner.LibrarianMinerServiceClient } func NewInprocClients( - // m mapper.LibrarianMapperServiceServer, - s searcher.LibrarianSearcherServiceServer, mi miner.LibrarianMinerServiceServer, ) *InprocClients { return &InprocClients{ - //Mapper: NewInprocMapperChannel(m), - Searcher: NewInprocSearcherChannel(s), - Miner: NewInprocMinerChannel(mi), + Miner: NewInprocMinerChannel(mi), } } -// func NewInprocMapperChannel(s mapper.LibrarianMapperServiceServer) mapper.LibrarianMapperServiceClient { -// channel := inprocgrpc.Channel{} -// mapper.RegisterLibrarianMapperServiceServer(&channel, s) -// cli := mapper.NewLibrarianMapperServiceClient(&channel) -// return cli -//} - -func NewInprocSearcherChannel(s searcher.LibrarianSearcherServiceServer) searcher.LibrarianSearcherServiceClient { - channel := inprocgrpc.Channel{} - searcher.RegisterLibrarianSearcherServiceServer(&channel, s) - cli := searcher.NewLibrarianSearcherServiceClient(&channel) - return cli -} - func NewInprocMinerChannel(s miner.LibrarianMinerServiceServer) miner.LibrarianMinerServiceClient { channel := inprocgrpc.Channel{} miner.RegisterLibrarianMinerServiceServer(&channel, s) diff --git a/internal/lib/libidgenerator/libidgenerator.go b/internal/lib/libidgenerator/libidgenerator.go new file mode 100644 index 00000000..83e0c2ae --- /dev/null +++ b/internal/lib/libidgenerator/libidgenerator.go @@ -0,0 +1,45 @@ +package libidgenerator + +import ( + "time" + + "github.com/tuihub/librarian/internal/model" + + "github.com/google/wire" + "github.com/sony/sonyflake" +) + +var ProviderSet = wire.NewSet(NewIDGenerator) + +type IDGenerator struct { + sf *sonyflake.Sonyflake +} + +func NewIDGenerator() *IDGenerator { + return &IDGenerator{ + sf: sonyflake.NewSonyflake(sonyflake.Settings{ + StartTime: time.Time{}, + MachineID: func() (uint16, error) { // TODO + return 0, nil + }, + CheckMachineID: nil, + }), + } +} + +func (i *IDGenerator) New() (model.InternalID, error) { + id, err := i.sf.NextID() + return model.InternalID(id), err //nolint:gosec // safe +} + +func (i *IDGenerator) BatchNew(n int) ([]model.InternalID, error) { + ids := make([]model.InternalID, n) + for idx := range n { + id, err := i.New() + if err != nil { + return nil, err + } + ids[idx] = id + } + return ids, nil +} diff --git a/app/searcher/internal/data/bleve.go b/internal/lib/libsearch/bleve.go similarity index 71% rename from app/searcher/internal/data/bleve.go rename to internal/lib/libsearch/bleve.go index 2411a34b..344afae6 100644 --- a/app/searcher/internal/data/bleve.go +++ b/internal/lib/libsearch/bleve.go @@ -1,4 +1,4 @@ -package data +package libsearch import ( "context" @@ -7,28 +7,25 @@ import ( "path" "strconv" - "github.com/tuihub/librarian/app/searcher/internal/biz" "github.com/tuihub/librarian/internal/conf" "github.com/tuihub/librarian/internal/lib/libapp" "github.com/tuihub/librarian/internal/lib/libcodec" "github.com/tuihub/librarian/internal/model" "github.com/blevesearch/bleve/v2" - "github.com/sony/sonyflake" ) type bleveSearcherRepo struct { - sf *sonyflake.Sonyflake - search map[biz.Index]bleve.Index + search map[SearchIndex]bleve.Index } -func NewBleve(conf *conf.Searcher_Data, app *libapp.Settings) (map[biz.Index]bleve.Index, error) { - if conf.GetBleve() == nil { +func newBleve(conf *conf.Search, app *libapp.Settings) (map[SearchIndex]bleve.Index, error) { + if conf.GetDriver() != "bleve" { return nil, nil //nolint:nilnil //TODO } - res := make(map[biz.Index]bleve.Index) - for i, n := range biz.IndexNameMap() { - if i == biz.IndexUnspecified { + res := make(map[SearchIndex]bleve.Index) + for i, n := range SearchIndexNameMap() { + if i == SearchIndexUnspecified { continue } mapping := bleve.NewIndexMapping() @@ -50,7 +47,7 @@ func NewBleve(conf *conf.Searcher_Data, app *libapp.Settings) (map[biz.Index]ble } func (r *bleveSearcherRepo) DescribeID( - ctx context.Context, id model.InternalID, index biz.Index, _ bool, description string, + ctx context.Context, id model.InternalID, index SearchIndex, _ bool, description string, ) error { var jsonDesc interface{} err := libcodec.Unmarshal(libcodec.JSON, []byte(description), &jsonDesc) @@ -68,8 +65,8 @@ func (r *bleveSearcherRepo) DescribeID( return nil } -func (r *bleveSearcherRepo) SearchID(ctx context.Context, index biz.Index, paging model.Paging, query string) ( - []*biz.SearchResult, error) { +func (r *bleveSearcherRepo) SearchID(ctx context.Context, index SearchIndex, paging model.Paging, query string) ( + []*SearchResult, error) { search := bleve.NewSearchRequest(bleve.NewFuzzyQuery(query)) search.From = paging.ToOffset() search.Size = paging.ToLimit() @@ -77,12 +74,12 @@ func (r *bleveSearcherRepo) SearchID(ctx context.Context, index biz.Index, pagin if err != nil { return nil, err } - res := make([]*biz.SearchResult, 0, 20) //nolint:mnd // TODO + res := make([]*SearchResult, 0, 20) //nolint:mnd // TODO for _, h := range result.Hits { var id int64 id, err = strconv.ParseInt(h.ID, 10, 64) if err == nil { - res = append(res, &biz.SearchResult{ + res = append(res, &SearchResult{ ID: model.InternalID(id), Rank: int64(h.Score), }) diff --git a/app/searcher/internal/data/bleve_test.go b/internal/lib/libsearch/bleve_test.go similarity index 80% rename from app/searcher/internal/data/bleve_test.go rename to internal/lib/libsearch/bleve_test.go index 0a68b5d3..7a0eec7a 100644 --- a/app/searcher/internal/data/bleve_test.go +++ b/internal/lib/libsearch/bleve_test.go @@ -1,13 +1,14 @@ -package data_test +package libsearch_test import ( "context" "errors" "testing" - "github.com/tuihub/librarian/app/searcher/internal/biz" - "github.com/tuihub/librarian/app/searcher/internal/data" + "github.com/tuihub/librarian/internal/conf" + "github.com/tuihub/librarian/internal/lib/libapp" "github.com/tuihub/librarian/internal/lib/libcodec" + "github.com/tuihub/librarian/internal/lib/libsearch" "github.com/tuihub/librarian/internal/model" "github.com/blevesearch/bleve/v2" @@ -58,11 +59,14 @@ func Test_bleveSearcherRepo_SearchID(t *testing.T) { if err != nil { t.Error(err) } - indexMap := make(map[biz.Index]bleve.Index) - indexMap[biz.IndexGeneral] = index - r, err := data.NewSearcherRepo( - indexMap, - nil, nil, + indexMap := make(map[libsearch.SearchIndex]bleve.Index) + indexMap[libsearch.SearchIndexGeneral] = index + r, err := libsearch.NewSearch( + &conf.Search{ + Driver: "bleve", + Meili: nil, + }, + &libapp.Settings{}, //nolint:exhaustruct // no need ) if err != nil { t.Error(err) @@ -73,12 +77,12 @@ func Test_bleveSearcherRepo_SearchID(t *testing.T) { if err != nil { return } - if err = r.DescribeID(context.Background(), model.InternalID(i), biz.IndexGeneral, false, string(str)); err != nil { + if err = r.DescribeID(context.Background(), model.InternalID(i), libsearch.SearchIndexGeneral, false, string(str)); err != nil { t.Errorf("DescribeID() error = %v", err) } } ids, err := r.SearchID(context.Background(), - biz.IndexGeneral, + libsearch.SearchIndexGeneral, model.Paging{ PageSize: 10, PageNum: 1, diff --git a/internal/lib/libsearch/libsearch.go b/internal/lib/libsearch/libsearch.go new file mode 100644 index 00000000..15d75fa1 --- /dev/null +++ b/internal/lib/libsearch/libsearch.go @@ -0,0 +1,79 @@ +package libsearch + +import ( + "context" + + "github.com/tuihub/librarian/internal/conf" + "github.com/tuihub/librarian/internal/lib/libapp" + "github.com/tuihub/librarian/internal/lib/logger" + "github.com/tuihub/librarian/internal/model" + + "github.com/google/wire" +) + +// ProviderSet is data providers. +var ProviderSet = wire.NewSet(NewSearch) + +type Search interface { + DescribeID(context.Context, model.InternalID, SearchIndex, bool, string) error + SearchID(context.Context, SearchIndex, model.Paging, string) ([]*SearchResult, error) +} + +type SearchResult struct { + ID model.InternalID + Rank int64 +} + +type SearchIndex int + +const ( + SearchIndexUnspecified SearchIndex = iota + SearchIndexGeneral + SearchIndexGeburaApp + SearchIndexChesedImage +) + +func SearchIndexNameMap() map[SearchIndex]string { + return map[SearchIndex]string{ + SearchIndexUnspecified: "", + SearchIndexGeneral: "general", + SearchIndexGeburaApp: "gebura", + SearchIndexChesedImage: "chesed", + } +} + +func NewSearch( + conf *conf.Search, app *libapp.Settings, +) (Search, error) { + switch conf.GetDriver() { + case "meili": + m := newMeili(conf) + return &meiliSearcherRepo{ + search: m, + }, nil + case "bleve": + b, err := newBleve(conf, app) + if err != nil { + return nil, err + } + return &bleveSearcherRepo{ + search: b, + }, nil + default: + logger.Warnf("no valid search backend, search function will not work") + return &defaultSearcherRepo{}, nil + } +} + +type defaultSearcherRepo struct { +} + +func (d defaultSearcherRepo) DescribeID( + context.Context, model.InternalID, SearchIndex, bool, string) error { + return nil // search disabled +} + +func (d defaultSearcherRepo) SearchID( + context.Context, SearchIndex, model.Paging, string) ([]*SearchResult, error) { + return nil, nil // search disabled +} diff --git a/app/searcher/internal/data/meili.go b/internal/lib/libsearch/meili.go similarity index 63% rename from app/searcher/internal/data/meili.go rename to internal/lib/libsearch/meili.go index 512d7b1e..f0136a26 100644 --- a/app/searcher/internal/data/meili.go +++ b/internal/lib/libsearch/meili.go @@ -1,32 +1,28 @@ -package data +package libsearch import ( "context" - "github.com/tuihub/librarian/app/searcher/internal/biz" "github.com/tuihub/librarian/internal/conf" - "github.com/tuihub/librarian/internal/lib/libapp" "github.com/tuihub/librarian/internal/lib/libcodec" "github.com/tuihub/librarian/internal/model" "github.com/meilisearch/meilisearch-go" - "github.com/sony/sonyflake" ) type meiliSearcherRepo struct { - sf *sonyflake.Sonyflake search meilisearch.ServiceManager } -func NewMeili(conf *conf.Searcher_Data, app *libapp.Settings) (meilisearch.ServiceManager, error) { - if conf.GetMeilisearch() == nil { - return nil, nil //nolint:nilnil //TODO +func newMeili(conf *conf.Search) meilisearch.ServiceManager { + if conf.GetDriver() != "meili" { + return nil } client := meilisearch.New( - conf.GetMeilisearch().GetAddr(), - meilisearch.WithAPIKey(conf.GetMeilisearch().GetApiKey()), + conf.GetMeili().GetAddr(), + meilisearch.WithAPIKey(conf.GetMeili().GetApiKey()), ) - return client, nil + return client } type document struct { @@ -35,7 +31,7 @@ type document struct { } func (m *meiliSearcherRepo) DescribeID( - ctx context.Context, id model.InternalID, index biz.Index, append_ bool, description string, + ctx context.Context, id model.InternalID, index SearchIndex, append_ bool, description string, ) error { var jsonDesc interface{} err := libcodec.Unmarshal(libcodec.JSON, []byte(description), &jsonDesc) @@ -52,12 +48,12 @@ func (m *meiliSearcherRepo) DescribeID( } } if append_ { - _, err = m.search.Index(biz.IndexNameMap()[index]).UpdateDocuments(documents) + _, err = m.search.Index(SearchIndexNameMap()[index]).UpdateDocuments(documents) if err != nil { return err } } else { - _, err = m.search.Index(biz.IndexNameMap()[index]).AddDocuments(documents) + _, err = m.search.Index(SearchIndexNameMap()[index]).AddDocuments(documents) if err != nil { return err } @@ -65,13 +61,13 @@ func (m *meiliSearcherRepo) DescribeID( return nil } -func (m *meiliSearcherRepo) SearchID(ctx context.Context, index biz.Index, paging model.Paging, query string) ( - []*biz.SearchResult, error) { +func (m *meiliSearcherRepo) SearchID(ctx context.Context, index SearchIndex, paging model.Paging, query string) ( + []*SearchResult, error) { request := new(meilisearch.SearchRequest) request.Limit = int64(paging.ToLimit()) request.Limit = int64(paging.ToOffset()) // https://github.com/meilisearch/meilisearch-go/issues/406 - resultRaw, err := m.search.Index(biz.IndexNameMap()[index]).SearchRaw(query, request) + resultRaw, err := m.search.Index(SearchIndexNameMap()[index]).SearchRaw(query, request) if err != nil { return nil, err } @@ -88,7 +84,7 @@ func (m *meiliSearcherRepo) SearchID(ctx context.Context, index biz.Index, pagin if err != nil { return nil, err } - res := make([]*biz.SearchResult, 0, 20) //nolint:mnd // TODO + res := make([]*SearchResult, 0, 20) //nolint:mnd // TODO for _, h := range result.Hits { var str []byte str, err = libcodec.Marshal(libcodec.JSON, h) @@ -100,7 +96,7 @@ func (m *meiliSearcherRepo) SearchID(ctx context.Context, index biz.Index, pagin if err != nil { continue } - res = append(res, &biz.SearchResult{ + res = append(res, &SearchResult{ ID: d.ID, Rank: 0, }) diff --git a/tests/client/gebura.go b/tests/client/gebura.go index d6d9a712..e9bb9b4b 100644 --- a/tests/client/gebura.go +++ b/tests/client/gebura.go @@ -143,6 +143,7 @@ func (c *Client) TestGebura(ctx context.Context) { //nolint:funlen,gocognit // n OwnerIdFilter: nil, IdFilter: nil, AssignedAppInfoIdFilter: nil, + DeviceIdFilter: nil, }); err != nil { log.Fatal(err) } else if resp.GetPaging().GetTotalSize() != 0 { @@ -155,6 +156,7 @@ func (c *Client) TestGebura(ctx context.Context) { //nolint:funlen,gocognit // n Name: "test app package", Description: "test", AssignedAppInfoId: nil, + DeviceId: nil, Public: false, }, }) @@ -170,6 +172,7 @@ func (c *Client) TestGebura(ctx context.Context) { //nolint:funlen,gocognit // n OwnerIdFilter: nil, IdFilter: nil, AssignedAppInfoIdFilter: nil, + DeviceIdFilter: nil, }); err2 != nil { log.Fatal(err2) } else if resp2.GetPaging().GetTotalSize() != 1 || resp2.GetApps()[0].GetDescription() != "test" { @@ -181,6 +184,7 @@ func (c *Client) TestGebura(ctx context.Context) { //nolint:funlen,gocognit // n Name: "test app package", Description: "test2", AssignedAppInfoId: nil, + DeviceId: nil, Public: false, }, }); err2 != nil { @@ -194,6 +198,7 @@ func (c *Client) TestGebura(ctx context.Context) { //nolint:funlen,gocognit // n OwnerIdFilter: nil, IdFilter: nil, AssignedAppInfoIdFilter: nil, + DeviceIdFilter: nil, }); err2 != nil { log.Fatal(err2) } else if resp2.GetPaging().GetTotalSize() != 1 || resp2.GetApps()[0].GetDescription() != "test2" {