From 1d7df90f07b849ef0aafa219b501b9615a7bd47d Mon Sep 17 00:00:00 2001 From: andefined Date: Tue, 30 Aug 2022 18:28:25 +0300 Subject: [PATCH] add rtaa services --- Makefile | 2 +- buf.gen.yaml | 15 +- buf.lock | 14 +- buf.yaml | 3 +- go.mod | 8 +- go.sum | 56 +- proto/buf.yaml | 7 + proto/cvcio/buf.yaml | 3 +- proto/cvcio/classification/accounts.proto | 50 +- proto/cvcio/classification/comments.proto | 10 +- proto/cvcio/classification/meta.proto | 14 +- proto/cvcio/classification/predictions.proto | 3 +- proto/cvcio/mediawatch/articles/article.proto | 146 --- .../mediawatch/v3/articles/article.proto | 86 ++ .../{ => mediawatch/v3}/commons/common.proto | 18 +- .../mediawatch/{ => v3}/feeds/feed.proto | 99 +- proto/cvcio/ministry/account.proto | 2 +- proto/cvcio/ministry/auth.proto | 35 +- proto/cvcio/ministry/session.proto | 21 +- proto/proto | 1 - .../classification/accounts/v1/accounts.proto | 58 ++ .../classification/comments/v1/comments.proto | 43 + .../rtaa/classification/common/v1/meta.proto | 21 + .../common/v1/predictions.proto | 9 + .../streamer/twitter/v1/twitterwatch.proto | 211 ++++ proto/third_party/buf.yaml | 11 - proto/third_party/gorm/buf.yaml | 11 - proto/third_party/gorm/options/options.proto | 154 --- proto/third_party/gorm/types/types.proto | 24 - .../classification/accounts.swagger.json | 265 ------ .../classification/comments.swagger.json | 216 ----- swagger/proto/cvcio/common/meta.swagger.json | 43 - .../cvcio/common/predictions.swagger.json | 43 - .../annotations/annotation.swagger.json | 43 - .../mediawatch/articles/article.swagger.json | 43 - .../bookmarks/bookmark.swagger.json | 43 - .../mediawatch/commons/common.swagger.json | 43 - .../dashboards/dashboard.swagger.json | 43 - .../cvcio/mediawatch/feeds/feed.swagger.json | 648 ------------- .../mediawatch/reports/report.swagger.json | 43 - .../cvcio/mediawatch/tests/test.swagger.json | 43 - .../proto/cvcio/ministry/account.swagger.json | 901 ------------------ .../proto/cvcio/ministry/auth.swagger.json | 222 ----- .../proto/cvcio/ministry/common.swagger.json | 43 - .../third_party/tagger/tagger.swagger.json | 43 - .../transformer/annotations.swagger.json | 44 - tools.go.bak => tools.go | 0 47 files changed, 612 insertions(+), 3292 deletions(-) create mode 100644 proto/buf.yaml delete mode 100644 proto/cvcio/mediawatch/articles/article.proto create mode 100644 proto/cvcio/mediawatch/v3/articles/article.proto rename proto/cvcio/{ => mediawatch/v3}/commons/common.proto (62%) rename proto/cvcio/mediawatch/{ => v3}/feeds/feed.proto (62%) delete mode 120000 proto/proto create mode 100644 proto/rtaa/classification/accounts/v1/accounts.proto create mode 100644 proto/rtaa/classification/comments/v1/comments.proto create mode 100644 proto/rtaa/classification/common/v1/meta.proto create mode 100644 proto/rtaa/classification/common/v1/predictions.proto create mode 100644 proto/rtaa/streamer/twitter/v1/twitterwatch.proto delete mode 100644 proto/third_party/buf.yaml delete mode 100644 proto/third_party/gorm/buf.yaml delete mode 100644 proto/third_party/gorm/options/options.proto delete mode 100644 proto/third_party/gorm/types/types.proto delete mode 100644 swagger/proto/cvcio/classification/accounts.swagger.json delete mode 100644 swagger/proto/cvcio/classification/comments.swagger.json delete mode 100644 swagger/proto/cvcio/common/meta.swagger.json delete mode 100644 swagger/proto/cvcio/common/predictions.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/annotations/annotation.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/articles/article.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/bookmarks/bookmark.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/commons/common.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/dashboards/dashboard.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/feeds/feed.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/reports/report.swagger.json delete mode 100644 swagger/proto/cvcio/mediawatch/tests/test.swagger.json delete mode 100644 swagger/proto/cvcio/ministry/account.swagger.json delete mode 100644 swagger/proto/cvcio/ministry/auth.swagger.json delete mode 100644 swagger/proto/cvcio/ministry/common.swagger.json delete mode 100644 swagger/proto/third_party/tagger/tagger.swagger.json delete mode 100644 swagger/proto/third_party/transformer/annotations.swagger.json rename tools.go.bak => tools.go (100%) diff --git a/Makefile b/Makefile index 4c45d59..d9cf2e0 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ REGISTRY=reg.cvcio.org REPO=github.com/cvcio/proto -BUF_VERSION:=1.0.0-rc6 +BUF_VERSION:=1.7.0 generate: buf generate diff --git a/buf.gen.yaml b/buf.gen.yaml index 7863ab1..ac0b5fb 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -6,19 +6,8 @@ managed: default: github.com/cvcio/mediawatch/internal except: - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway + - buf.build/srikrsna/protoc-gen-gotag plugins: - - name: go - out: internal - opt: paths=source_relative - - name: go-grpc - out: internal - opt: - - paths=source_relative - - require_unimplemented_servers=false - - name: grpc-gateway - out: internal - opt: - - paths=source_relative - - generate_unbound_methods=true - name: openapiv2 out: swagger \ No newline at end of file diff --git a/buf.lock b/buf.lock index e0751a6..d492966 100644 --- a/buf.lock +++ b/buf.lock @@ -4,14 +4,12 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - branch: main - commit: c97f6fbd2f074e52b5c83baf8f740d42 - digest: b1-tU-gRzsfP9s9EQG07Kq9cHZ_jkUGVeF9ArLCqzN7Nks= - create_time: 2021-11-30T15:07:54.995967Z + commit: 80720a488c9a414bb8d4a9f811084989 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - branch: main - commit: ff83506eb9cc4cf8972f49ce87e6ed3e - digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= - create_time: 2021-10-23T16:26:52.283938Z + commit: 00116f302b12478b85deb33b734e026c + - remote: buf.build + owner: srikrsna + repository: protoc-gen-gotag + commit: 04b38c6f540d4d2fa9cfd49ae01ae73b diff --git a/buf.yaml b/buf.yaml index e6b953f..0706110 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,8 +1,9 @@ version: v1 -name: buf.build/andefined/protos +name: buf.build/cvcio/protos deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway + - buf.build/srikrsna/protoc-gen-gotag lint: use: - DEFAULT diff --git a/go.mod b/go.mod index 9f85ba2..c8b1f0d 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,11 @@ go 1.16 require ( github.com/amsokol/protoc-gen-gotag v0.2.1 + github.com/bold-commerce/protoc-gen-struct-transformer v1.0.7 + github.com/fatih/structtag v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 - go.buf.build/library/go/grpc-ecosystem/grpc-gateway v1.2.39 // indirect - google.golang.org/genproto v0.0.0-20210701191553-46259e63a0a9 - google.golang.org/grpc v1.38.0 + github.com/lyft/protoc-gen-star v0.6.1 // indirect + google.golang.org/genproto v0.0.0-20210701191553-46259e63a0a9 // indirect + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 google.golang.org/protobuf v1.27.1 ) diff --git a/go.sum b/go.sum index 48376c2..20a0748 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/amsokol/protoc-gen-gotag v0.2.1 h1:N3ovy0PyxxUBXz+jkuJJUA1iNlQ+7a/QVSW361XF0kc= github.com/amsokol/protoc-gen-gotag v0.2.1/go.mod h1:VGStdb9DuXf/2T+bgrIqBouu8Hl81egNzVxD/DyEPAg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/bold-commerce/protoc-gen-struct-transformer v1.0.7 h1:Qjc6aKkiGyLeyvgho3AaIV5QvJLSxIw817yzuckG2wA= +github.com/bold-commerce/protoc-gen-struct-transformer v1.0.7/go.mod h1:AImauQRl6b1gF2KIpHz2x8gXpgw5rf2phADiY+IaNgM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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= @@ -43,16 +45,23 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn 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-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20210429001901-424d2337a529 h1:2voWjNECnrZRbfwXxHB1/j8wa6xdKn85B5NzgVL/pTU= github.com/golang/glog v0.0.0-20210429001901-424d2337a529/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -111,26 +120,48 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 h1:ajue7SzQMywqRjg2fK7dcpc0QhFG github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0/go.mod h1:r1hZAcvfFXuYmcKyCJI9wlyOPIZUJl6FCB8Cpca/NLE= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hpcloud/tail v1.0.1-0.20180514194441-a1dbeea552b7 h1:Ysi1UhrSyBltF8f+3RAt4UaqHc+53JJ0jyl0pY0sfck= +github.com/hpcloud/tail v1.0.1-0.20180514194441-a1dbeea552b7/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 h1:VHgatEHNcBFEB7inlalqfNqw65aNkM1lGX2yt3NmbS8= +github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 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/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lyft/protoc-gen-star v0.6.1 h1:erE0rdztuaDq3bpGifD95wfoPrSZc95nGA6tbiNYh6M= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spf13/afero v1.3.3 h1:p5gZEKLYoL7wh8VrJesMaYeNxdEd1v3cb4irOk9zB54= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.buf.build/library/go/grpc-ecosystem/grpc-gateway v1.2.39 h1:vBYvp+L2coOooYgf/JiflULKJHhty9c7zNBz1ACgUbY= -go.buf.build/library/go/grpc-ecosystem/grpc-gateway v1.2.39/go.mod h1:AQfJ7TcFt9jNlH4ZH72qHk294XEMYrCEYxOMsR3pzWU= 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= @@ -139,6 +170,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 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-20190820162420-60c769a6c586/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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -172,9 +204,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB 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.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -185,6 +219,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR 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-20190827160401-ba9fcec4b297/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= @@ -217,6 +252,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -225,6 +261,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/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-20190907184412-d223b2b6db03/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -257,6 +294,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb 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-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= @@ -279,6 +317,7 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn 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-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122042241-dc16b66866f1/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= @@ -297,6 +336,7 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc 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.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4 h1:cVngSRcfgyZCzys3KYOpCFa+4dqX/Oub9tAq00ttGVs= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -371,6 +411,8 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -386,9 +428,19 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 0000000..9a6d727 --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,7 @@ +version: v1 +lint: + use: + - DEFAULT +breaking: + use: + - FILE \ No newline at end of file diff --git a/proto/cvcio/buf.yaml b/proto/cvcio/buf.yaml index eb6d9bd..ede59a2 100644 --- a/proto/cvcio/buf.yaml +++ b/proto/cvcio/buf.yaml @@ -8,4 +8,5 @@ breaking: deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - - buf.build/gogo/protobuf \ No newline at end of file + - buf.build/gogo/protobuf + - buf.build/srikrsna/protoc-gen-gotag \ No newline at end of file diff --git a/proto/cvcio/classification/accounts.proto b/proto/cvcio/classification/accounts.proto index cd29e82..0bafae6 100644 --- a/proto/cvcio/classification/accounts.proto +++ b/proto/cvcio/classification/accounts.proto @@ -3,61 +3,45 @@ syntax = "proto3"; package classification; // golang options -option go_package = "github.com/cvcio/proto/internal/classification"; +// option go_package = "github.com/cvcio/proto/internal/classification"; import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; import "proto/cvcio/classification/meta.proto"; import "proto/cvcio/classification/predictions.proto"; /** TwitterAccount message holds information of the requested account - Required Fields - - followers (int64) as provided by Twitter API - friends (int64) as provided by Twitter API - statuses (int64) as provided by Twitter API - lists (int64) as provided by Twitter API - -Optional Fields - -If optional fields missing we will try to calculate the values if available -In case of missing favorites (count) we will use the v2 account classifier - - favorites (int64) as provided by Twitter API - - ffr (double) calculated as: followers / firends - - stfv (double) calculated as: statuses / favorites - - stf (double) calculated as: statuses / favorites - - fvfr (double) calculated as: favorites / firends - - fl (double) calculated as: followers / lists - - dates (double) calculated as: followers / firends - - actions (double) calculated as: (statuses + favorites) / dates - -Meta: Meta message (see proto/cvcio/common/meta) + - dates_since (float64) created date (as provided by Twitter API) - observed date (now) **/ message TwitterAccount { int64 followers = 1; - int64 friends = 2; - int64 statuses = 3; + int64 following = 2; + int64 tweets = 3; int64 favorites = 4; - int64 lists = 5; - double ffr = 6; - double stfv = 7; - double stf = 8; - double fvfr = 9; - double fl = 10; - double dates = 11; - double actions = 12; - common.Meta meta = 13; + int64 listed = 5; + + bool default_profile = 6; + bool verified = 7; + + google.protobuf.Timestamp created_at = 8; + + classification.Meta meta = 9; } // TwitterAccountList, a list of TwitterAccount messages {accounts: [...]} message TwitterAccountList { repeated TwitterAccount accounts = 1; } -// ResponseAccount +// ResponseAccount message ResponseAccount { - repeated common.Prediction predictions = 1; + repeated classification.Prediction predictions = 1; } // ResponseAccountList, a list of ResponseAccount messages {accounts: [...]} message ResponseAccountList { @@ -66,7 +50,7 @@ message ResponseAccountList { // AccountService Microservice service AccountService { - // ClassifyTwitterAccount classifies a single TwitterAccount + // ClassifyTwitterAccount classifies a single TwitterAccount // returns a ResponseAccount message rpc ClassifyTwitterAccount (TwitterAccount) returns (ResponseAccount) { option (google.api.http) = { @@ -82,4 +66,4 @@ service AccountService { body : "*" }; }; -}; \ No newline at end of file +}; diff --git a/proto/cvcio/classification/comments.proto b/proto/cvcio/classification/comments.proto index f074051..af687e5 100644 --- a/proto/cvcio/classification/comments.proto +++ b/proto/cvcio/classification/comments.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package classification; -option go_package = "github.com/cvcio/proto/internal/classification"; +// option go_package = "github.com/cvcio/proto/internal/classification"; import "google/api/annotations.proto"; @@ -10,7 +10,7 @@ import "proto/cvcio/classification/predictions.proto"; message Comment { string text = 1; - common.Meta meta = 2; + classification.Meta meta = 2; } message CommentList { @@ -18,8 +18,8 @@ message CommentList { } message ResponseToxic { - repeated common.Prediction predictions = 1; - common.Meta meta = 2; + repeated classification.Prediction predictions = 1; + classification.Meta meta = 2; } message ResponseToxicList { @@ -39,4 +39,4 @@ service CommentService { body : "*" }; }; -}; \ No newline at end of file +}; diff --git a/proto/cvcio/classification/meta.proto b/proto/cvcio/classification/meta.proto index a917d58..b142beb 100644 --- a/proto/cvcio/classification/meta.proto +++ b/proto/cvcio/classification/meta.proto @@ -1,12 +1,8 @@ syntax = "proto3"; -package common; - -// golang options -option go_package = "github.com/cvcio/proto/internal/common"; +package classification; import "google/protobuf/timestamp.proto"; -import "proto/third_party/tagger/tagger.proto"; // Meta message holds metadata for any user request (comments or accounts classification) // Use @ threshold to adjust the probability boundary (default 0.5) @@ -15,11 +11,11 @@ message Meta { string id = 1; string source = 2; string screen_name = 3; - google.protobuf.Timestamp comment_created_at = 4 [(tagger.tags) = "json:\"comment_created_at,omitempty\"" ]; - google.protobuf.Timestamp user_created_at = 5 [(tagger.tags) = "json:\"user_created_at,omitempty\"" ]; - google.protobuf.Timestamp classified_at = 6 [(tagger.tags) = "json:\"classified_at,omitempty\"" ]; + google.protobuf.Timestamp comment_created_at = 4; + google.protobuf.Timestamp user_created_at = 5; + google.protobuf.Timestamp classified_at = 6; string link = 7; string lang = 8; double threshold = 9; string version = 10; -} \ No newline at end of file +} diff --git a/proto/cvcio/classification/predictions.proto b/proto/cvcio/classification/predictions.proto index c00420f..984ba39 100644 --- a/proto/cvcio/classification/predictions.proto +++ b/proto/cvcio/classification/predictions.proto @@ -1,7 +1,6 @@ syntax = "proto3"; -package common; -option go_package = "github.com/cvcio/proto/internal/common"; +package classification; message Prediction { string label = 1; diff --git a/proto/cvcio/mediawatch/articles/article.proto b/proto/cvcio/mediawatch/articles/article.proto deleted file mode 100644 index 92e5ae3..0000000 --- a/proto/cvcio/mediawatch/articles/article.proto +++ /dev/null @@ -1,146 +0,0 @@ -syntax = "proto3"; - -package proto.cvcio.mediawatch.articles; -// option go_package = "github.com/cvcio/mediawatch/internal"; - -// third party imports -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; -// import "google/protobuf/struct.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// mediawatch specific imports -import "proto/cvcio/commons/common.proto"; -import "proto/third_party/gorm/options/options.proto"; - -// Articles ... -// -// ... - -// Article Model -message Article { - option (gorm.opts) = { - ormable: false - }; - string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "UUID string representation."}]; - string lang = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Language code in ISO 639-1 format."}]; - google.protobuf.Timestamp crawled_at = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Article crawled datetime in RFC3339 format."}]; - string source = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Source of the article."}]; - string url = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "URL of the article."}]; - string tweet_id = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Tweet id of the article."}]; - -} -// ArticleStopWords Model -message ArticleStopWords { - string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "UUID string representation."}]; - string doc_uuid = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Related document uuid."}]; - repeated string tokens = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "StopWords of the document."}]; -} - -// ArticleStopWords Model -message ArticleContent { - string title = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Title of the article."}]; - string excerpt = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Excerpt of the article."}]; - string body = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Body of the article."}]; - repeated string authors = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Authors of the article."}]; - repeated string sources = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Sources of the article."}]; - repeated string tags = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Tags of the article."}]; - repeated string categories = 7 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Categories of the article."}]; - google.protobuf.Timestamp published_at = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Article published datetime in RFC3339 format."}]; - google.protobuf.Timestamp edited_at = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Article edited datetime in RFC3339 format."}]; -} - -message ArticleRequest { - Article payload = 1; -} - -message ArticleResponseSingle { - Article result = 1; -} - -message ArticleResponseList { - repeated Article results = 1; - commons.Pagination pagination = 2; -} - - -// ArticleService Definition -// -// ... -service ArticleService { - // Retrieve article by uuid - rpc Retrieve (ArticleRequest) returns (ArticleResponseSingle) { - option (google.api.http) = { - get : "/v3/articles/get/{payload.uuid}" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Retrieve a single article by uuid." - }; - }; - - // List articles by query - rpc List (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/list" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Retrive a list of articles by a generic query." - }; - }; - - // Stream articles by query - rpc Stream(ArticleRequest) returns (stream ArticleResponseSingle) { - option (google.api.http) = { - get: "/v3/articles/stream" - }; - }; - - // Aggregate articles by query - rpc Aggregate (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/aggregate/articles" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Aggregate articles by query." - }; - }; - - // Topics - rpc GetTopics (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/aggregate/topics" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Aggregate topics by query." - }; - }; - - // Categories - rpc GetCategories (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/aggregate/categories" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Aggregate categories by query." - }; - }; - - // Authors - rpc GetAuthors (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/aggregate/authors" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Aggregate authors by query." - }; - }; - - // Sources - rpc GetSources (ArticleRequest) returns (ArticleResponseList) { - option (google.api.http) = { - post : "/v3/articles/aggregate/sources" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Aggregate sources by query." - }; - }; -} \ No newline at end of file diff --git a/proto/cvcio/mediawatch/v3/articles/article.proto b/proto/cvcio/mediawatch/v3/articles/article.proto new file mode 100644 index 0000000..1e63ecf --- /dev/null +++ b/proto/cvcio/mediawatch/v3/articles/article.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; + +package proto.cvcio.mediawatch.v3.articles; +// option go_package = "github.com/cvcio/mediawatch/internal/proto/v3/articles;articles"; + +// third party imports +import "google/protobuf/timestamp.proto"; +// mediawatch specific imports +// import "proto/cvcio/mediawatch/v3/commons/common.proto"; + +// Articles ... +// +// ... + +// Article Model +message Article { + string uuid = 1; + string lang = 2; + google.protobuf.Timestamp crawled_at = 3; + string source = 4; + string url = 5; + string tweet_id = 6; + +} +// ArticleStopWords Model +message ArticleStopWords { + string uuid = 1; + string doc_uuid = 2; + repeated string tokens = 3; +} + +// ArticleStopWords Model +message ArticleContent { + string title = 1; + string excerpt = 2; + string body = 3; + repeated string authors = 4; + repeated string sources = 5; + repeated string tags = 6; + repeated string categories = 7; + google.protobuf.Timestamp published_at = 8; + google.protobuf.Timestamp edited_at = 9; +} + +message ArticleRequest { + Article payload = 1; +} + +message ArticleResponseSingle { + Article result = 1; +} + +message ArticleResponseList { + repeated Article results = 1; + // commons.Pagination pagination = 2; +} + + +// ArticleService Definition +// +// ... +service ArticleService { + // Retrieve article by uuid + rpc Retrieve (ArticleRequest) returns (ArticleResponseSingle) {}; + + // List articles by query + rpc List (ArticleRequest) returns (ArticleResponseList) {}; + + // Stream articles by query + rpc Stream(ArticleRequest) returns (stream ArticleResponseSingle) {}; + + // Aggregate articles by query + rpc Aggregate (ArticleRequest) returns (ArticleResponseList) {}; + + // Topics + rpc GetTopics (ArticleRequest) returns (ArticleResponseList) {}; + + // Categories + rpc GetCategories (ArticleRequest) returns (ArticleResponseList) {}; + + // Authors + rpc GetAuthors (ArticleRequest) returns (ArticleResponseList) { }; + + // Sources + rpc GetSources (ArticleRequest) returns (ArticleResponseList) {}; +} \ No newline at end of file diff --git a/proto/cvcio/commons/common.proto b/proto/cvcio/mediawatch/v3/commons/common.proto similarity index 62% rename from proto/cvcio/commons/common.proto rename to proto/cvcio/mediawatch/v3/commons/common.proto index faf55cb..5b24c66 100644 --- a/proto/cvcio/commons/common.proto +++ b/proto/cvcio/mediawatch/v3/commons/common.proto @@ -1,10 +1,7 @@ syntax = "proto3"; -package commons; -// option go_package = "github.com/cvcio/mediawatch/internal"; - -import "tagger/tagger.proto"; -// import "protoc-gen-openapiv2/options/annotations.proto"; +package cvcio.mediawatch.v3.commons.common; +// option go_package = "github.com/cvcio/mediawatch/internal/proto/commons;commons"; enum Status { STATUS_UNSPECIFIED = 0; @@ -29,6 +26,8 @@ message GenericQuery { message GenericId { string id = 1; } + + message GenericUUID { string uuid = 1; } @@ -36,6 +35,11 @@ message GenericUUID { message ResponseWithMessage { bool ok = 1; string method = 2; - string action = 3 [(tagger.tags) = "json:\"action,omitempty\"" ]; - string url = 4 [(tagger.tags) = "json:\"url,omitempty\"" ]; + string action = 3; + string url = 4; } + +message ResponseSuccess { + bool ok = 1; + string message = 2; +} \ No newline at end of file diff --git a/proto/cvcio/mediawatch/feeds/feed.proto b/proto/cvcio/mediawatch/v3/feeds/feed.proto similarity index 62% rename from proto/cvcio/mediawatch/feeds/feed.proto rename to proto/cvcio/mediawatch/v3/feeds/feed.proto index 48070ad..7cd43a0 100644 --- a/proto/cvcio/mediawatch/feeds/feed.proto +++ b/proto/cvcio/mediawatch/v3/feeds/feed.proto @@ -1,18 +1,14 @@ syntax = "proto3"; -package proto.cvcio.mediawatch.feeds; -// option go_package = "github.com/cvcio/mediawatch/internal"; +package cvcio.mediawatch.v3.feeds; +// option go_package = "github.com/cvcio/mediawatch/internal/proto/v3/feeds;feeds"; // third party imports -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; -// import "google/protobuf/struct.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// import "proto/third_party/tagger/tagger.proto"; -import "proto/third_party/gorm/options/options.proto"; +import "tagger/tagger.proto"; // mediawatch specific imports -import "proto/cvcio/commons/common.proto"; +// import "proto/cvcio/commons/common.proto"; // Feeds are the sources of articles that mediawatch collects. // @@ -23,11 +19,8 @@ import "proto/cvcio/commons/common.proto"; // Feed Model message Feed { - option (gorm.opts) = { - ormable: true - }; // Unique auto-increment id - uint64 id = 1; + string id = 1 [(tagger.tags) = "bson:\"_id,omitempty\""]; // UUID string representation string uuid = 2; // Feed creation datetime in RFC3339 format @@ -37,31 +30,28 @@ message Feed { // Name of the feed string name = 5; // Twitter user_name of the feed (if appliccable) - string user_name = 6 [(gorm.field).tag = {type: "string", index: "idx_feeds", unique: true}]; + string user_name = 6; // A small description of the feed string description = 7; // Twitter id_str of the feed (if appliccable) - string twitter_id = 8 [(gorm.field).tag = {type: "string", index: "idx_feeds", unique: true}]; + string twitter_id = 8; // Twitter profile_image_url of the feed (if appliccable), or favicon url string icon = 9; // Base url of the feed, including trailing slash `/` string url = 10; // strem fields - FeedStream stream = 11 [(gorm.field).belongs_to = {}]; + FeedStream stream = 11; // localization fields - FeedLocalization localization = 12 [(gorm.field).belongs_to = {}]; + FeedLocalization localization = 12; // meta fields - FeedMeta meta = 13 [(gorm.field).belongs_to = {}]; + FeedMeta meta = 13; // dom fiedlds - FeedDOM dom = 14 [(gorm.field).belongs_to = {}]; + FeedDOM dom = 14; } // FeedStream Model message FeedStream { - option (gorm.opts) = { - ormable: true - }; // StreamType Enumeration enum StreamType { STREAM_TYPE_UNSPECIFIED = 0; @@ -69,7 +59,6 @@ message FeedStream { STREAM_TYPE_TWITTER = 2; STREAM_TYPE_RSS = 3; } - uint64 id = 5; // stream key to select // Can be the twitterId of the feed in case streamType is STREAM_TYPE_TWITTER, // otherwise an ATOM url or feeds url @@ -81,14 +70,11 @@ message FeedStream { // currently only twitter is supported StreamType stream_type = 3; // common status (see common.proto) - commons.Status stream_status = 4; + // commons.Status stream_status = 4; } // FeedDOM Model message FeedDOM { - option (gorm.opts) = { - ormable: true - }; uint64 id = 14; string dom_type = 1; string api = 2; @@ -107,9 +93,6 @@ message FeedDOM { // FeedLocalization Model message FeedLocalization { - option (gorm.opts) = { - ormable: true - }; // Locality Enumeration enum Locality { LOCALITY_UNSPECIFIED = 0; @@ -120,7 +103,6 @@ message FeedLocalization { LOCALITY_MIXED = 5; } - uint64 id = 4; string country = 1; Locality locality = 2; // Feed predefined language code in ISO 639-1 format @@ -129,9 +111,6 @@ message FeedLocalization { // FeedMeta Model message FeedMeta { - option (gorm.opts) = { - ormable: true - }; // BusinessType Enumeration enum BusinessType { BUSINESS_TYPE_UNSPECIFIED = 0; @@ -179,7 +158,6 @@ message FeedMeta { TIER_MIXED = 6; } - uint64 id = 8; // email (if provvided) string email = 1; @@ -207,64 +185,23 @@ message FeedResponseSingle { message FeedResponseList { repeated Feed results = 1; - commons.Pagination pagination = 2; + // commons.Pagination pagination = 2; } // FeedService Definition -// -// Feed service will perform commonly used CRUD operations via gRPC -// exposed as a REST API with grpc-gateway. service FeedService { - // option (gorm.server).autogen = true; // Create new feed - rpc Create (FeedRequest) returns (FeedResponseSingle) { - option (google.api.http) = { - post : "/v3/feeds/create" - body : "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Create a new feed." - }; - }; + rpc Create (FeedRequest) returns (FeedResponseSingle) {}; // Retrieve feed by uuid - rpc Retrieve (FeedRequest) returns (FeedResponseSingle) { - option (google.api.http) = { - get : "/v3/feeds/get/{payload.id}" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Retrieve a single feed by uuid." - }; - }; + rpc Retrieve (FeedRequest) returns (FeedResponseSingle) {}; // Update feed by uuid - rpc Update (FeedRequest) returns (FeedResponseSingle) { - option (google.api.http) = { - put : "/v3/feeds/update/{payload.id}" - body : "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Update an existing feed by uuid." - }; - }; + rpc Update (FeedRequest) returns (FeedResponseSingle) {}; // Delete feed by uuid - rpc Delete (FeedRequest) returns (FeedResponseSingle) { - option (google.api.http) = { - delete : "/v3/feeds/delete/{payload.id}" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Delete an existing feed by uuid." - }; - }; + rpc Delete (FeedRequest) returns (FeedResponseSingle) {}; // List feeds by query - rpc List (FeedRequest) returns (FeedResponseList) { - option (google.api.http) = { - post : "/v3/feeds/list" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Retrive a list of feeds by a generic query." - }; - }; + rpc List (FeedRequest) returns (FeedResponseList) {}; } \ No newline at end of file diff --git a/proto/cvcio/ministry/account.proto b/proto/cvcio/ministry/account.proto index 13ce1ca..b3904eb 100644 --- a/proto/cvcio/ministry/account.proto +++ b/proto/cvcio/ministry/account.proto @@ -14,7 +14,7 @@ import "tagger/tagger.proto"; // import "proto/cvcio/ministry/auth.proto"; import "proto/cvcio/ministry/resource.proto"; import "proto/cvcio/ministry/session.proto"; -import "proto/cvcio/commons/common.proto"; +// import "proto/cvcio/commons/common.proto"; enum Role { // users with unassigned role diff --git a/proto/cvcio/ministry/auth.proto b/proto/cvcio/ministry/auth.proto index e916894..7dee442 100644 --- a/proto/cvcio/ministry/auth.proto +++ b/proto/cvcio/ministry/auth.proto @@ -7,6 +7,9 @@ import "google/api/annotations.proto"; // import "google/protobuf/wrappers.proto"; import "tagger/tagger.proto"; +import "proto/cvcio/ministry/session.proto"; +// import "proto/cvcio/commons/common.proto"; + message Credentials { string email = 1; } @@ -14,39 +17,61 @@ message Credentials { message Verification { string id = 1 [(tagger.tags) = "bson:\"_id,omitempty\""]; string pin = 2; - string nonce = 3; } message Token { string id = 1 [(tagger.tags) = "bson:\"_id,omitempty\"" ]; string access_token = 2; string refesh_token = 3; - string nonce = 4; } service AuthService { - rpc Login (Credentials) returns (Token) { + // authenticate user with magick link + rpc Authenticate (Credentials) returns (Session) { option (google.api.http) = { - post : "/v3/auth" + post : "/v3/auth/authenticate" body : "*" }; }; + // invite user with magick link + rpc InviteWithMagic (Credentials) returns (commons.ResponseSuccess) { + option (google.api.http) = { + post : "/v3/auth/invite-with-magick" + body : "*" + }; + }; + // get the otpauth link and qr-code + rpc GetVerificationLink (Verification) returns (Session) { + option (google.api.http) = { + get : "/v3/auth/verify/{id}" + }; + }; + // verify user with a predefined 2fa method rpc Verify (Verification) returns (Token) { option (google.api.http) = { post : "/v3/auth/verify/{id}" body : "*" }; }; + // authorize user with an external service such as google rpc Authorize (Credentials) returns (Token) { option (google.api.http) = { post : "/v3/auth/authorize" body : "*" }; }; - rpc RefreshToken (Token) returns (Token) { + // generate token + rpc GenerateToken (Token) returns (Token) { option (google.api.http) = { post : "/v3/auth/token" body : "*" }; }; + // refresh token + rpc RefreshToken (Token) returns (Token) { + option (google.api.http) = { + post : "/v3/auth/token/refresh" + body : "*" + }; + }; } \ No newline at end of file diff --git a/proto/cvcio/ministry/session.proto b/proto/cvcio/ministry/session.proto index ccf941f..07279b0 100644 --- a/proto/cvcio/ministry/session.proto +++ b/proto/cvcio/ministry/session.proto @@ -2,12 +2,25 @@ syntax = "proto3"; package ministry; // option go_package = "github.com/cvcio/proto/internal/ministry;ministry"; - +import "google/protobuf/timestamp.proto"; import "tagger/tagger.proto"; message Session { string id = 1 [(tagger.tags) = "bson:\"_id,omitempty\""]; - string account_id = 2; - string agent = 3; - string ip = 4; + // creation datetime in RFC3339 format + google.protobuf.Timestamp created_at = 2 [(tagger.tags) = "bson:\"created_at,omitempty\""]; + // update datetime in RFC3339 format + google.protobuf.Timestamp expires_at = 3 [(tagger.tags) = "bson:\"expires_at,omitempty\""]; + // key to check against + string key = 4; + // assign value + string value = 5; + // assign message + string message = 6; + // client's agent + string agent = 7 [(tagger.tags) = "json:\"-\""]; + // client's ip + string ip = 8 [(tagger.tags) = "json:\"-\""]; + // one time password + string otp = 9 [(tagger.tags) = "bson:\"otp,omitempty\""]; } \ No newline at end of file diff --git a/proto/proto b/proto/proto deleted file mode 120000 index b2326fc..0000000 --- a/proto/proto +++ /dev/null @@ -1 +0,0 @@ -/projects/go/src/github.com/cvcio/proto/proto/ \ No newline at end of file diff --git a/proto/rtaa/classification/accounts/v1/accounts.proto b/proto/rtaa/classification/accounts/v1/accounts.proto new file mode 100644 index 0000000..3d4f2ec --- /dev/null +++ b/proto/rtaa/classification/accounts/v1/accounts.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package proto.rtaa.classification.accounts.v1; + +// third-party imports +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +// rtaa-72 imports +import "proto/rtaa/classification/common/v1/meta.proto"; +import "proto/rtaa/classification/common/v1/predictions.proto"; + +message TwitterAccount { + int64 followers = 1; + int64 following = 2; + int64 tweets = 3; + int64 favorites = 4; + int64 listed = 5; + + bool default_profile = 6; + bool verified = 7; + + google.protobuf.Timestamp created_at = 8; + + proto.rtaa.classification.common.v1.Meta meta = 9; +} +// TwitterAccountList, a list of TwitterAccount messages {accounts: [...]} +message TwitterAccountList { + repeated TwitterAccount accounts = 1; +} +// ResponseAccount +message ResponseAccount { + repeated proto.rtaa.classification.common.v1.Prediction predictions = 1; +} +// ResponseAccountList, a list of ResponseAccount messages {accounts: [...]} +message ResponseAccountList { + repeated ResponseAccount accounts = 1; +} + +// AccountService Microservice +service AccountService { + // ClassifyTwitterAccount classifies a single TwitterAccount + // returns a ResponseAccount message + rpc ClassifyTwitterAccount (TwitterAccount) returns (ResponseAccount) { + option (google.api.http) = { + post : "/v1/classify/account/twitter" + body : "*" + }; + }; + // ClassifyTwitterAccount classifies a list of TwitterAccount messages (TwitterAccountList) + // returns a list of ResponseAccount messages (ResponseAccountList) + rpc ClassifyTwitterAccounts (TwitterAccountList) returns (ResponseAccountList) { + option (google.api.http) = { + post : "/v1/classify/accounts/twitter" + body : "*" + }; + }; +}; diff --git a/proto/rtaa/classification/comments/v1/comments.proto b/proto/rtaa/classification/comments/v1/comments.proto new file mode 100644 index 0000000..02e652b --- /dev/null +++ b/proto/rtaa/classification/comments/v1/comments.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package proto.rtaa.classification.comments.v1; + +// third-party imports +import "google/api/annotations.proto"; + +// rtaa-72 imports +import "proto/rtaa/classification/common/v1/meta.proto"; +import "proto/rtaa/classification/common/v1/predictions.proto"; + +message Comment { + string text = 1; + proto.rtaa.classification.common.v1.Meta meta = 2; +} + +message CommentList { + repeated Comment comments = 1; +} + +message ResponseToxic { + repeated proto.rtaa.classification.common.v1.Prediction predictions = 1; + proto.rtaa.classification.common.v1.Meta meta = 2; +} + +message ResponseToxicList { + repeated ResponseToxic comments = 1; +} + +service CommentService { + rpc ClassifyToxic (Comment) returns (ResponseToxic) { + option (google.api.http) = { + post : "/v3/classify/comment/toxicity" + body : "*" + }; + }; + rpc ClassifyToxicList (CommentList) returns (ResponseToxicList) { + option (google.api.http) = { + post : "/v3/classify/comments/toxicity" + body : "*" + }; + }; +}; diff --git a/proto/rtaa/classification/common/v1/meta.proto b/proto/rtaa/classification/common/v1/meta.proto new file mode 100644 index 0000000..47c0cab --- /dev/null +++ b/proto/rtaa/classification/common/v1/meta.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package proto.rtaa.classification.common.v1; + +import "google/protobuf/timestamp.proto"; + +// Meta message holds metadata for any user request (comments or accounts classification) +// Use @ threshold to adjust the probability boundary (default 0.5) +// Use @ version to choose the version of the classifier (accepts v1, v2, default v1) +message Meta { + string id = 1; + string source = 2; + string screen_name = 3; + google.protobuf.Timestamp comment_created_at = 4; + google.protobuf.Timestamp user_created_at = 5; + google.protobuf.Timestamp classified_at = 6; + string link = 7; + string lang = 8; + double threshold = 9; + string version = 10; +} diff --git a/proto/rtaa/classification/common/v1/predictions.proto b/proto/rtaa/classification/common/v1/predictions.proto new file mode 100644 index 0000000..da091f5 --- /dev/null +++ b/proto/rtaa/classification/common/v1/predictions.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package proto.rtaa.classification.common.v1; + +message Prediction { + string label = 1; + float score = 2; + int32 prediction = 3; +} \ No newline at end of file diff --git a/proto/rtaa/streamer/twitter/v1/twitterwatch.proto b/proto/rtaa/streamer/twitter/v1/twitterwatch.proto new file mode 100644 index 0000000..02ba026 --- /dev/null +++ b/proto/rtaa/streamer/twitter/v1/twitterwatch.proto @@ -0,0 +1,211 @@ +syntax = "proto3"; + +package proto.rtaa.streamer.twitter.v1; + +// third-party imports +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +// rtaa-72 imports +import "proto/rtaa/classification/common/v1/predictions.proto"; + +// Tweet +message Tweet { + string id = 1; + string text = 2; + string type_of = 3; + int64 retweets = 4; + int64 favorites = 5; + string source = 6; + repeated string hashtags = 7; + google.protobuf.Timestamp created_at = 8; + string user_name = 9; + string author = 10; +}; + +// Account +message Account { + int64 followers = 1; + int64 following = 2; + int64 tweets = 3; + int64 favorites = 4; + int64 listed = 5; + + bool default_profile = 6; + bool verified = 7; + + google.protobuf.Timestamp created_at = 8; + + string id = 10; + + string user_name = 11; + string name = 12; + + string profile_image_url = 13; + string profile_banner_url = 14; + + string srource = 15; + + proto.rtaa.classification.common.v1.Prediction prediction = 16; +}; + +message Media { + string id = 1; + string media_url_https = 2; + string display_url = 3; + string type = 4; +}; +message Article {}; + +// Relationship +message Relationship { + string source = 1; + string target = 2; + string label = 3; +}; + +// StreamRequest +message StreamRequest { + string id = 1; +}; + +// StreamResponse +message StreamResponse { + repeated Tweet tweets = 1; + repeated Account accounts = 2; + repeated Media media = 3; + repeated Article articles = 4; + repeated Relationship relationships = 5; +}; + +message Empty {}; + +// Autorization Related +message AuthorizeRequest {}; +message ObbResponse { + string request_token = 1; + string url = 2; +}; +message VerifyRequest { + string request_token = 1; + string oauth_verifier = 2; +}; +message AuthResponse { + string id = 1; + string oauth_token = 2; + string oauth_token_secret = 3; + string email = 4; + string user_name = 5; + bool verified = 6; + string profile_image_url_https = 7; + google.protobuf.Timestamp created_at = 8; +}; + +// Stream Related +message ConnectRequest { + string id = 1; + string version = 2; + + bool classification_service_active = 3; + bool classify_accounts = 4; + bool classify_tweets = 5; + bool classify_media = 6; + bool classify_news = 7; + + string track = 8; + repeated string follow = 9; + + string oauth_token = 10; + string oauth_token_secret = 11; +}; +message ConnectResponse { + string status = 1; +}; +message RulesRequest { + string id = 1; +}; +message RulesResponse {}; + +// TwitterWatchService Microservice +service TwitterWatchService { + // Autorize implements twitter's oauth2 authorization + // read more: https://developer.twitter.com/en/docs/authentication/oauth-2-0 + rpc Authorize(AuthorizeRequest) returns (AuthResponse) {} + + // Obb implements twitter's pin-based oath 1.0a authorization + // read more: https://developer.twitter.com/en/docs/authentication/oauth-1-0a/pin-based-oauth + rpc Obb(Empty) returns (ObbResponse) { + option (google.api.http) = { + post : "/v3/twitterwatch/twitter/obb" + body : "*" + }; + } + + // Verify twitter's authorization + rpc Verify(VerifyRequest) returns (AuthResponse) { + option (google.api.http) = { + post : "/v3/twitterwatch/twitter/verify" + body : "*" + }; + } + + // Addrules adds a new rule to twitter streaming api + rpc AddRules(RulesRequest) returns (RulesResponse) { + option (google.api.http) = { + post : "/v3/twitterwatch/twitter/rules" + body : "*" + }; + } + + // GetRules returns all rules stored on twitter streaming api + rpc GetRules(RulesRequest) returns (RulesResponse) { + option (google.api.http) = { + get : "/v3/twitterwatch/twitter/rules" + }; + } + + // GetRule by id, specific to user id + rpc GetRule(RulesRequest) returns (RulesResponse) { + option (google.api.http) = { + get : "/v3/twitterwatch/twitter/rules/{id}" + }; + } + + // DeleteRules deletes all rules + rpc DeleteRules(RulesRequest) returns (RulesResponse) { + option (google.api.http) = { + delete : "/v3/twitterwatch/twitter/rules" + body : "*" + }; + } + + // DeleteRule deletes a specific rule + rpc DeleteRule(RulesRequest) returns (RulesResponse) { + option (google.api.http) = { + delete : "/v3/twitterwatch/twitter/rules/delete/{id}" + }; + } + + // Connect establish a connection with the service + rpc Connect(ConnectRequest) returns (ConnectResponse) { + option (google.api.http) = { + post : "/v3/twitterwatch/connect" + body : "*" + }; + } + + // Disconnect establish a connection with the service + rpc Disconnect(ConnectRequest) returns (ConnectResponse) { + option (google.api.http) = { + post : "/v3/twitterwatch/disconnect" + body : "*" + }; + } + + // Stream data from twitter api + rpc Stream(StreamRequest) returns (stream StreamResponse) { + option (google.api.http) = { + get : "/v3/twitterwatch/twitter/stream/{id}" + }; + } +}; diff --git a/proto/third_party/buf.yaml b/proto/third_party/buf.yaml deleted file mode 100644 index eb6d9bd..0000000 --- a/proto/third_party/buf.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -breaking: - use: - - FILE -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway - - buf.build/gogo/protobuf \ No newline at end of file diff --git a/proto/third_party/gorm/buf.yaml b/proto/third_party/gorm/buf.yaml deleted file mode 100644 index eb6d9bd..0000000 --- a/proto/third_party/gorm/buf.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -breaking: - use: - - FILE -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway - - buf.build/gogo/protobuf \ No newline at end of file diff --git a/proto/third_party/gorm/options/options.proto b/proto/third_party/gorm/options/options.proto deleted file mode 100644 index 90474f9..0000000 --- a/proto/third_party/gorm/options/options.proto +++ /dev/null @@ -1,154 +0,0 @@ -syntax = "proto3"; - -package gorm; - -option go_package = "github.com/infobloxopen/protoc-gen-gorm/options;gorm"; - -import "google/protobuf/descriptor.proto"; - -// TODO: The option number 52119 lies within the internally reserved extension -// range. I believe a publicly unique number should be requested. - -// Currently no file options -extend google.protobuf.FileOptions { - GormFileOptions file_opts = 52119; -} - -message GormFileOptions { -} - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // ormable will cause orm code to be generated for this message/object - GormMessageOptions opts = 52119; -} - -message GormMessageOptions { - bool ormable = 1; - repeated ExtraField include = 2; - string table = 3; - bool multi_account = 4; -} - -message ExtraField { - string type = 1; - string name = 2; - GormTag tag = 3; - string package = 4; -} - -// Field level specifications -extend google.protobuf.FieldOptions { - GormFieldOptions field = 52119; -} - -message GormFieldOptions { - GormTag tag = 1; - bool drop = 2; - oneof association { - HasOneOptions has_one = 3; - BelongsToOptions belongs_to = 4; - HasManyOptions has_many = 5; - ManyToManyOptions many_to_many = 6; - } - string reference_of = 7; -} - -message GormTag { - string column = 1; - string type = 2; - int32 size = 3; - int32 precision = 4; - bool primary_key = 5; - bool unique = 6; - string default = 7; - bool not_null = 8; - bool auto_increment = 9; - string index = 10; - string unique_index = 11; - bool embedded = 12; - string embedded_prefix = 13; - bool ignore = 14; - string foreignkey = 15; - string association_foreignkey = 16; - string many_to_many = 17; - string jointable_foreignkey = 18; - string association_jointable_foreignkey = 19; - bool association_autoupdate = 20; - bool association_autocreate = 21; - bool association_save_reference = 22; - bool preload = 23; -} - -message HasOneOptions { - string foreignkey = 1; - GormTag foreignkey_tag = 2; - string association_foreignkey = 3; - bool association_autoupdate = 4; - bool association_autocreate = 5; - bool association_save_reference = 6; - bool preload = 7; - bool replace = 8; - bool append = 9; - bool clear = 10; -} - -message BelongsToOptions { - string foreignkey = 1; - GormTag foreignkey_tag = 2; - string association_foreignkey = 3; - bool association_autoupdate = 4; - bool association_autocreate = 5; - bool association_save_reference = 6; - bool preload = 7; -} - -message HasManyOptions { - string foreignkey = 1; - GormTag foreignkey_tag = 2; - string association_foreignkey = 3; - string position_field = 4; - GormTag position_field_tag = 5; - bool association_autoupdate = 6; - bool association_autocreate = 7; - bool association_save_reference = 8; - bool preload = 9; - bool replace = 10; - bool append = 11; - bool clear = 12; -} - -message ManyToManyOptions { - string jointable = 1; - string foreignkey = 2; - string jointable_foreignkey = 3; - string association_foreignkey = 4; - string association_jointable_foreignkey = 5; - bool association_autoupdate = 6; - bool association_autocreate = 7; - bool association_save_reference = 8; - bool preload = 9; - bool replace = 10; - bool append = 11; - bool clear = 13; -} - - -// To be used in (leiu of) the interceptor -extend google.protobuf.ServiceOptions { - AutoServerOptions server = 52119; -} - -message AutoServerOptions { - bool autogen = 1; - bool txn_middleware = 2; - bool with_tracing = 3; -} - -extend google.protobuf.MethodOptions { - MethodOptions method = 52119; -} - -message MethodOptions { - string object_type = 1; -} \ No newline at end of file diff --git a/proto/third_party/gorm/types/types.proto b/proto/third_party/gorm/types/types.proto deleted file mode 100644 index 0f46917..0000000 --- a/proto/third_party/gorm/types/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package gorm.types; -option go_package = "github.com/infobloxopen/protoc-gen-gorm/types;types"; - -message UUIDValue { - string value = 1; -} - -message JSONValue { - string value = 1; -} - -message UUID { - string value = 1; -} - -message InetValue { - string value = 1; -} - -message TimeOnly { - uint32 value = 1; -} \ No newline at end of file diff --git a/swagger/proto/cvcio/classification/accounts.swagger.json b/swagger/proto/cvcio/classification/accounts.swagger.json deleted file mode 100644 index 55380ed..0000000 --- a/swagger/proto/cvcio/classification/accounts.swagger.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/classification/accounts.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "AccountService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v3/classify/account/twitter": { - "post": { - "summary": "ClassifyTwitterAccount classifies a single TwitterAccount \nreturns a ResponseAccount message", - "operationId": "AccountService_ClassifyTwitterAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/classificationResponseAccount" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/classificationTwitterAccount" - } - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/classify/accounts/twitter": { - "post": { - "summary": "ClassifyTwitterAccount classifies a list of TwitterAccount messages (TwitterAccountList)\nreturns a list of ResponseAccount messages (ResponseAccountList)", - "operationId": "AccountService_ClassifyTwitterAccounts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/classificationResponseAccountList" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/classificationTwitterAccountList" - } - } - ], - "tags": [ - "AccountService" - ] - } - } - }, - "definitions": { - "classificationResponseAccount": { - "type": "object", - "properties": { - "predictions": { - "type": "array", - "items": { - "$ref": "#/definitions/commonPrediction" - } - } - }, - "title": "ResponseAccount" - }, - "classificationResponseAccountList": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/definitions/classificationResponseAccount" - } - } - }, - "title": "ResponseAccountList, a list of ResponseAccount messages {accounts: [...]}" - }, - "classificationTwitterAccount": { - "type": "object", - "properties": { - "followers": { - "type": "string", - "format": "int64" - }, - "friends": { - "type": "string", - "format": "int64" - }, - "statuses": { - "type": "string", - "format": "int64" - }, - "favorites": { - "type": "string", - "format": "int64" - }, - "lists": { - "type": "string", - "format": "int64" - }, - "ffr": { - "type": "number", - "format": "double" - }, - "stfv": { - "type": "number", - "format": "double" - }, - "stf": { - "type": "number", - "format": "double" - }, - "fvfr": { - "type": "number", - "format": "double" - }, - "fl": { - "type": "number", - "format": "double" - }, - "dates": { - "type": "number", - "format": "double" - }, - "actions": { - "type": "number", - "format": "double" - }, - "meta": { - "$ref": "#/definitions/commonMeta" - } - }, - "description": "Required Fields\n\n- followers (int64) as provided by Twitter API\n- friends (int64) as provided by Twitter API\n- statuses (int64) as provided by Twitter API\n- lists (int64) as provided by Twitter API\n\nOptional Fields\n\nIf optional fields missing we will try to calculate the values if available\nIn case of missing favorites (count) we will use the v2 account classifier\n\n- favorites (int64) as provided by Twitter API\n- ffr (double) calculated as: followers / firends\n- stfv (double) calculated as: statuses / favorites\n- stf (double) calculated as: statuses / favorites\n- fvfr (double) calculated as: favorites / firends\n- fl (double) calculated as: followers / lists\n- dates (double) calculated as: followers / firends\n- actions (double) calculated as: (statuses + favorites) / dates\n\nMeta: Meta message (see proto/cvcio/common/meta)", - "title": "TwitterAccount message holds information of the requested account" - }, - "classificationTwitterAccountList": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/definitions/classificationTwitterAccount" - } - } - }, - "title": "TwitterAccountList, a list of TwitterAccount messages {accounts: [...]}" - }, - "commonMeta": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "type": "string" - }, - "screenName": { - "type": "string" - }, - "commentCreatedAt": { - "type": "string", - "format": "date-time" - }, - "userCreatedAt": { - "type": "string", - "format": "date-time" - }, - "classifiedAt": { - "type": "string", - "format": "date-time" - }, - "link": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "version": { - "type": "string" - } - }, - "title": "Meta message holds metadata for any user request (comments or accounts classification)\nUse @ threshold to adjust the probability boundary (default 0.5)\nUse @ version to choose the version of the classifier (accepts v1, v2, default v1)" - }, - "commonPrediction": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "score": { - "type": "number", - "format": "float" - }, - "prediction": { - "type": "integer", - "format": "int32" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/classification/comments.swagger.json b/swagger/proto/cvcio/classification/comments.swagger.json deleted file mode 100644 index e33d6ac..0000000 --- a/swagger/proto/cvcio/classification/comments.swagger.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/classification/comments.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "CommentService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v3/classify/comment/toxicity": { - "post": { - "operationId": "CommentService_ClassifyToxic", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/classificationResponseToxic" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/classificationComment" - } - } - ], - "tags": [ - "CommentService" - ] - } - }, - "/v3/classify/comments/toxicity": { - "post": { - "operationId": "CommentService_ClassifyToxicList", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/classificationResponseToxicList" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/classificationCommentList" - } - } - ], - "tags": [ - "CommentService" - ] - } - } - }, - "definitions": { - "classificationComment": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "meta": { - "$ref": "#/definitions/commonMeta" - } - } - }, - "classificationCommentList": { - "type": "object", - "properties": { - "comments": { - "type": "array", - "items": { - "$ref": "#/definitions/classificationComment" - } - } - } - }, - "classificationResponseToxic": { - "type": "object", - "properties": { - "predictions": { - "type": "array", - "items": { - "$ref": "#/definitions/commonPrediction" - } - }, - "meta": { - "$ref": "#/definitions/commonMeta" - } - } - }, - "classificationResponseToxicList": { - "type": "object", - "properties": { - "comments": { - "type": "array", - "items": { - "$ref": "#/definitions/classificationResponseToxic" - } - } - } - }, - "commonMeta": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "type": "string" - }, - "screenName": { - "type": "string" - }, - "commentCreatedAt": { - "type": "string", - "format": "date-time" - }, - "userCreatedAt": { - "type": "string", - "format": "date-time" - }, - "classifiedAt": { - "type": "string", - "format": "date-time" - }, - "link": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "threshold": { - "type": "number", - "format": "double" - }, - "version": { - "type": "string" - } - }, - "title": "Meta message holds metadata for any user request (comments or accounts classification)\nUse @ threshold to adjust the probability boundary (default 0.5)\nUse @ version to choose the version of the classifier (accepts v1, v2, default v1)" - }, - "commonPrediction": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "score": { - "type": "number", - "format": "float" - }, - "prediction": { - "type": "integer", - "format": "int32" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/common/meta.swagger.json b/swagger/proto/cvcio/common/meta.swagger.json deleted file mode 100644 index 6d6ae4b..0000000 --- a/swagger/proto/cvcio/common/meta.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/common/meta.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/common/predictions.swagger.json b/swagger/proto/cvcio/common/predictions.swagger.json deleted file mode 100644 index 7f5fbb2..0000000 --- a/swagger/proto/cvcio/common/predictions.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/common/predictions.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/annotations/annotation.swagger.json b/swagger/proto/cvcio/mediawatch/annotations/annotation.swagger.json deleted file mode 100644 index d4ae9c1..0000000 --- a/swagger/proto/cvcio/mediawatch/annotations/annotation.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/annotations/annotation.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/articles/article.swagger.json b/swagger/proto/cvcio/mediawatch/articles/article.swagger.json deleted file mode 100644 index 41a1810..0000000 --- a/swagger/proto/cvcio/mediawatch/articles/article.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/articles/article.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/bookmarks/bookmark.swagger.json b/swagger/proto/cvcio/mediawatch/bookmarks/bookmark.swagger.json deleted file mode 100644 index 23a620c..0000000 --- a/swagger/proto/cvcio/mediawatch/bookmarks/bookmark.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/bookmarks/bookmark.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/commons/common.swagger.json b/swagger/proto/cvcio/mediawatch/commons/common.swagger.json deleted file mode 100644 index d8ea7da..0000000 --- a/swagger/proto/cvcio/mediawatch/commons/common.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/commons/common.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/dashboards/dashboard.swagger.json b/swagger/proto/cvcio/mediawatch/dashboards/dashboard.swagger.json deleted file mode 100644 index 73b7f1d..0000000 --- a/swagger/proto/cvcio/mediawatch/dashboards/dashboard.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/dashboards/dashboard.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/feeds/feed.swagger.json b/swagger/proto/cvcio/mediawatch/feeds/feed.swagger.json deleted file mode 100644 index ca80b52..0000000 --- a/swagger/proto/cvcio/mediawatch/feeds/feed.swagger.json +++ /dev/null @@ -1,648 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/feeds/feed.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "FeedService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v3/feeds/create": { - "post": { - "summary": "Create new feed", - "operationId": "FeedService_Create", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchFeed" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/mediawatchFeed" - } - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/delete/{id}": { - "delete": { - "summary": "Delete feed by id", - "operationId": "FeedService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/get/{id}": { - "get": { - "summary": "Get feed by id", - "operationId": "FeedService_Get", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchFeed" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/list": { - "get": { - "summary": "List feeds by query", - "operationId": "FeedService_List", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchFeedtList" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "limit", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "page", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/test/{id}": { - "put": { - "summary": "Test feed scraper by id", - "operationId": "FeedService_Test", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/update-with-fields/{id}": { - "put": { - "summary": "Update feed with fields", - "operationId": "FeedService_UpdateWithFields", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "meta": { - "type": "object" - } - }, - "title": "FeedWithFields Model" - } - } - ], - "tags": [ - "FeedService" - ] - } - }, - "/v3/feeds/update/{id}": { - "put": { - "summary": "Update feed", - "operationId": "FeedService_Update", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/mediawatchResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "unique increment id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "title": "unique uuid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "title": "feed created at" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "title": "feed updated at" - }, - "name": { - "type": "string", - "title": "name of the feed (formatted)" - }, - "userName": { - "type": "string", - "title": "twitter handle name" - }, - "description": { - "type": "string", - "title": "twitter description (auto pulled), or user defined" - }, - "twitterId": { - "type": "string", - "title": "twitter user id (str on v2, int64 -\u003e str on v1)" - }, - "icon": { - "type": "string", - "title": "twitter profile image" - }, - "url": { - "type": "string", - "title": "feed base url (including trailing slash [/])" - }, - "stream": { - "$ref": "#/definitions/mediawatchStream", - "title": "stream specific fields" - }, - "meta": { - "$ref": "#/definitions/mediawatchFeedMeta", - "title": "meta fields" - } - }, - "title": "Feed Model" - } - } - ], - "tags": [ - "FeedService" - ] - } - } - }, - "definitions": { - "FeedMetaBusinessType": { - "type": "string", - "enum": [ - "BUSINESS_TYPE_UNKNOWN", - "BUSINESS_TYPE_OTHER", - "BUSINESS_TYPE_AGENCY", - "BUSINESS_TYPE_ORGANIZATION", - "BUSINESS_TYPE_BLOG", - "BUSINESS_TYPE_PORTAL" - ], - "default": "BUSINESS_TYPE_UNKNOWN", - "title": "BusinessType Enumeration" - }, - "FeedMetaContentType": { - "type": "string", - "enum": [ - "CONTENT_TYPE_UNKNOWN", - "CONTENT_TYPE_OTHER", - "CONTENT_TYPE_NEWS", - "CONTENT_TYPE_MARKET_BUSINESS", - "CONTENT_TYPE_DEFENCE_ARMY_POLICE", - "CONTENT_TYPE_ENTERTAINMENT", - "CONTENT_TYPE_HEALTH_BEAUTY", - "CONTENT_TYPE_SPORTS", - "CONTENT_TYPE_RELIGION", - "CONTENT_TYPE_MIXED" - ], - "default": "CONTENT_TYPE_UNKNOWN", - "title": "ContentType Enumeration" - }, - "FeedMetaLocality": { - "type": "string", - "enum": [ - "LOCALITY_UNKNOWN", - "LOCALITY_OTHER", - "LOCALITY_LOCAL", - "LOCALITY_NATIONAL", - "LOCALITY_INTERNATIONAL", - "LOCALITY_MIXED" - ], - "default": "LOCALITY_UNKNOWN", - "title": "Locality Enumeration" - }, - "FeedMetaPoliticalOrientation": { - "type": "string", - "enum": [ - "POLITICAL_ORIENTATION_UNKNOWN", - "POLITICAL_ORIENTATION_OTHER", - "POLITICAL_ORIENTATION_LEFT", - "POLITICAL_ORIENTATION_CENTER_LEFT", - "POLITICAL_ORIENTATION_CENTER", - "POLITICAL_ORIENTATION_CENTER_RIGHT", - "POLITICAL_ORIENTATION_RIGHT", - "POLITICAL_ORIENTATION_FAR_RIGHT" - ], - "default": "POLITICAL_ORIENTATION_UNKNOWN", - "title": "PoliticalOrientation Enumeration" - }, - "FeedMetaPoliticalStance": { - "type": "string", - "enum": [ - "POLITICAL_STANCE_UNKNOWN", - "POLITICAL_STANCE_OTHER", - "POLITICAL_STANCE_PRO_ESTABLISHMENT", - "POLITICAL_STANCE_NEUTERAL", - "POLITICAL_STANCE_AGAINST_ESTABLISHMENT" - ], - "default": "POLITICAL_STANCE_UNKNOWN", - "title": "PoliticalStance Enumeration" - }, - "FeedMetaTier": { - "type": "string", - "enum": [ - "TIER_UNKNOWN", - "TIER_OTHER", - "TIER_TRADITIONAL", - "TIER_DIGITAL", - "TIER_BROADCASTING_TV", - "TIER_BROADCASTING_RADIO", - "TIER_MIXED" - ], - "default": "TIER_UNKNOWN", - "title": "Tier Enumeration" - }, - "StreamStreamType": { - "type": "string", - "enum": [ - "STREAM_TYPE_UNKNOWN", - "STREAM_TYPE_OTHER", - "STREAM_TYPE_TWITTER", - "STREAM_TYPE_RSS" - ], - "default": "STREAM_TYPE_UNKNOWN", - "title": "StreamType Enumeration" - }, - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "mediawatchFeed": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "int64", - "title": "unique increment id" - }, - "uuid": { - "type": "string", - "title": "unique uuid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "title": "feed created at" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "title": "feed updated at" - }, - "name": { - "type": "string", - "title": "name of the feed (formatted)" - }, - "userName": { - "type": "string", - "title": "twitter handle name" - }, - "description": { - "type": "string", - "title": "twitter description (auto pulled), or user defined" - }, - "twitterId": { - "type": "string", - "title": "twitter user id (str on v2, int64 -\u003e str on v1)" - }, - "icon": { - "type": "string", - "title": "twitter profile image" - }, - "url": { - "type": "string", - "title": "feed base url (including trailing slash [/])" - }, - "stream": { - "$ref": "#/definitions/mediawatchStream", - "title": "stream specific fields" - }, - "meta": { - "$ref": "#/definitions/mediawatchFeedMeta", - "title": "meta fields" - } - }, - "title": "Feed Model" - }, - "mediawatchFeedMeta": { - "type": "object", - "properties": { - "email": { - "type": "string", - "title": "email (if provvided)" - }, - "businessType": { - "$ref": "#/definitions/FeedMetaBusinessType", - "title": "as suggested by ioanna archontaki (phd@uoa)\nthe purpose of these meta is to correlate feeds\nby their political context" - }, - "businessOwner": { - "type": "string" - }, - "businessRegistered": { - "type": "boolean", - "description": "if the business is registered or not in a \npublic business registry, association, etc." - }, - "contentType": { - "$ref": "#/definitions/FeedMetaContentType" - }, - "politicalStance": { - "$ref": "#/definitions/FeedMetaPoliticalStance" - }, - "politicalOrientation": { - "$ref": "#/definitions/FeedMetaPoliticalOrientation" - }, - "country": { - "type": "string" - }, - "locality": { - "$ref": "#/definitions/FeedMetaLocality" - }, - "lang": { - "type": "string" - }, - "tier": { - "$ref": "#/definitions/FeedMetaTier" - } - }, - "title": "FeedMeta Model" - }, - "mediawatchFeedtList": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/mediawatchFeed" - } - }, - "pagination": { - "$ref": "#/definitions/mediawatchPagination" - } - }, - "title": "FeedList Model" - }, - "mediawatchPagination": { - "type": "object", - "properties": { - "total": { - "type": "string", - "format": "int64" - }, - "pages": { - "type": "string", - "format": "int64" - } - } - }, - "mediawatchResponseWithMessage": { - "type": "object", - "properties": { - "ok": { - "type": "boolean" - }, - "method": { - "type": "string" - }, - "action": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "mediawatchStatus": { - "type": "string", - "enum": [ - "STATUS_UNKNOWN", - "STATUS_PENDING", - "STATUS_ACTIVE", - "STATUS_SUSPENDED", - "STATUS_CLOSED", - "STATUS_DELETED" - ], - "default": "STATUS_UNKNOWN" - }, - "mediawatchStream": { - "type": "object", - "properties": { - "streamTarget": { - "type": "string", - "title": "stream key to select" - }, - "executeEvery": { - "type": "string" - }, - "streamType": { - "$ref": "#/definitions/StreamStreamType", - "title": "stream type, can be other, twitter or rss\ncurrently only twitter is supported" - }, - "streamStatus": { - "$ref": "#/definitions/mediawatchStatus", - "title": "common status (see common.proto)" - } - }, - "title": "Stream Model" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/reports/report.swagger.json b/swagger/proto/cvcio/mediawatch/reports/report.swagger.json deleted file mode 100644 index 13e3991..0000000 --- a/swagger/proto/cvcio/mediawatch/reports/report.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/reports/report.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/mediawatch/tests/test.swagger.json b/swagger/proto/cvcio/mediawatch/tests/test.swagger.json deleted file mode 100644 index bee6084..0000000 --- a/swagger/proto/cvcio/mediawatch/tests/test.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/mediawatch/tests/test.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/cvcio/ministry/account.swagger.json b/swagger/proto/cvcio/ministry/account.swagger.json deleted file mode 100644 index e07d739..0000000 --- a/swagger/proto/cvcio/ministry/account.swagger.json +++ /dev/null @@ -1,901 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/ministry/account.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "AccountService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v3/accounts/create": { - "post": { - "operationId": "AccountService_Create", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryAccount" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ministryCredentials" - } - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/delete/{id}": { - "delete": { - "operationId": "AccountService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "uuid", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "createdAt", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "updatedAt", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "lastLoginAt", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "expriresAt", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "email", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "deleted", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "status", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "STATUS_UNKNOWN", - "STATUS_PENDING", - "STATUS_ACTIVE", - "STATUS_SUSPENDED", - "STATUS_CLOSED" - ], - "default": "STATUS_UNKNOWN" - }, - { - "name": "role", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ROLE_UNKNOWN", - "ROLE_USER", - "ROLE_POWERUSER", - "ROLE_ORGADMIN", - "ROLE_MANAGER", - "ROLE_ADMIN", - "ROLE_MASTER" - ], - "default": "ROLE_UNKNOWN" - }, - { - "name": "hash", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "isAcceptTerms", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "is2fa", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "isNewsletter", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "source", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "authorizer", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.firstName", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.lastName", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.screenName", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.country", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.language", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.mobile", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.industry", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.occupation", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "profile.avatar", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "organization", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/get/{id}": { - "get": { - "operationId": "AccountService_Get", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryAccount" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "limit", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "page", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/list": { - "get": { - "operationId": "AccountService_List", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryAccountList" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "limit", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "page", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/reset/{id}": { - "put": { - "operationId": "AccountService_Reset", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "lastLoginAt": { - "type": "string", - "format": "date-time" - }, - "expriresAt": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/ministryStatus" - }, - "role": { - "$ref": "#/definitions/ministryRole" - }, - "hash": { - "type": "string", - "format": "byte" - }, - "isAcceptTerms": { - "type": "boolean" - }, - "is2fa": { - "type": "boolean" - }, - "isNewsletter": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "authorizer": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/ministryProfile", - "title": "Account Relationships" - }, - "organization": { - "type": "string" - } - } - } - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/update-with-fields/{id}": { - "put": { - "operationId": "AccountService_UpdateWithFields", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "meta": { - "type": "object" - } - } - } - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/update/{id}": { - "put": { - "operationId": "AccountService_Update", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "lastLoginAt": { - "type": "string", - "format": "date-time" - }, - "expriresAt": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/ministryStatus" - }, - "role": { - "$ref": "#/definitions/ministryRole" - }, - "hash": { - "type": "string", - "format": "byte" - }, - "isAcceptTerms": { - "type": "boolean" - }, - "is2fa": { - "type": "boolean" - }, - "isNewsletter": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "authorizer": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/ministryProfile", - "title": "Account Relationships" - }, - "organization": { - "type": "string" - } - } - } - } - ], - "tags": [ - "AccountService" - ] - } - }, - "/v3/accounts/verify/{id}": { - "put": { - "operationId": "AccountService_Verify", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryResponseWithMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "lastLoginAt": { - "type": "string", - "format": "date-time" - }, - "expriresAt": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/ministryStatus" - }, - "role": { - "$ref": "#/definitions/ministryRole" - }, - "hash": { - "type": "string", - "format": "byte" - }, - "isAcceptTerms": { - "type": "boolean" - }, - "is2fa": { - "type": "boolean" - }, - "isNewsletter": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "authorizer": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/ministryProfile", - "title": "Account Relationships" - }, - "organization": { - "type": "string" - } - } - } - } - ], - "tags": [ - "AccountService" - ] - } - } - }, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "ministryAccount": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "int64" - }, - "uuid": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "lastLoginAt": { - "type": "string", - "format": "date-time" - }, - "expriresAt": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/ministryStatus" - }, - "role": { - "$ref": "#/definitions/ministryRole" - }, - "hash": { - "type": "string", - "format": "byte" - }, - "isAcceptTerms": { - "type": "boolean" - }, - "is2fa": { - "type": "boolean" - }, - "isNewsletter": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "authorizer": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/ministryProfile", - "title": "Account Relationships" - }, - "organization": { - "type": "string" - } - } - }, - "ministryAccountList": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/ministryAccount" - } - }, - "pagination": { - "$ref": "#/definitions/ministryPagination" - } - } - }, - "ministryCredentials": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - }, - "passwordConfirm": { - "type": "string" - } - } - }, - "ministryPagination": { - "type": "object", - "properties": { - "total": { - "type": "string", - "format": "int64" - }, - "pages": { - "type": "string", - "format": "int64" - } - } - }, - "ministryProfile": { - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "screenName": { - "type": "string" - }, - "country": { - "type": "string" - }, - "language": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "industry": { - "type": "string" - }, - "occupation": { - "type": "string" - }, - "avatar": { - "type": "string" - } - } - }, - "ministryResponseWithMessage": { - "type": "object", - "properties": { - "ok": { - "type": "boolean" - }, - "method": { - "type": "string" - }, - "action": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "ministryRole": { - "type": "string", - "enum": [ - "ROLE_UNKNOWN", - "ROLE_USER", - "ROLE_POWERUSER", - "ROLE_ORGADMIN", - "ROLE_MANAGER", - "ROLE_ADMIN", - "ROLE_MASTER" - ], - "default": "ROLE_UNKNOWN" - }, - "ministryStatus": { - "type": "string", - "enum": [ - "STATUS_UNKNOWN", - "STATUS_PENDING", - "STATUS_ACTIVE", - "STATUS_SUSPENDED", - "STATUS_CLOSED" - ], - "default": "STATUS_UNKNOWN" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - } - } -} diff --git a/swagger/proto/cvcio/ministry/auth.swagger.json b/swagger/proto/cvcio/ministry/auth.swagger.json deleted file mode 100644 index 6416545..0000000 --- a/swagger/proto/cvcio/ministry/auth.swagger.json +++ /dev/null @@ -1,222 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/ministry/auth.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "AuthService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v3/auth": { - "post": { - "operationId": "AuthService_Login", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryToken" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ministryCredentials" - } - } - ], - "tags": [ - "AuthService" - ] - } - }, - "/v3/auth/authorize": { - "post": { - "operationId": "AuthService_Authorize", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryToken" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ministryCredentials" - } - } - ], - "tags": [ - "AuthService" - ] - } - }, - "/v3/auth/token": { - "post": { - "operationId": "AuthService_RefreshToken", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryToken" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ministryToken" - } - } - ], - "tags": [ - "AuthService" - ] - } - }, - "/v3/auth/verify/{id}": { - "post": { - "operationId": "AuthService_Verify", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ministryToken" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "pin": { - "type": "string" - }, - "nonce": { - "type": "string" - } - } - } - } - ], - "tags": [ - "AuthService" - ] - } - } - }, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "ministryCredentials": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - }, - "passwordConfirm": { - "type": "string" - } - } - }, - "ministryToken": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "accessToken": { - "type": "string" - }, - "refeshToken": { - "type": "string" - }, - "nonce": { - "type": "string" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - } - } -} diff --git a/swagger/proto/cvcio/ministry/common.swagger.json b/swagger/proto/cvcio/ministry/common.swagger.json deleted file mode 100644 index 7b5208a..0000000 --- a/swagger/proto/cvcio/ministry/common.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/cvcio/ministry/common.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - } - } -} diff --git a/swagger/proto/third_party/tagger/tagger.swagger.json b/swagger/proto/third_party/tagger/tagger.swagger.json deleted file mode 100644 index 03f707e..0000000 --- a/swagger/proto/third_party/tagger/tagger.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/third_party/tagger/tagger.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/swagger/proto/third_party/transformer/annotations.swagger.json b/swagger/proto/third_party/transformer/annotations.swagger.json deleted file mode 100644 index 5d6b370..0000000 --- a/swagger/proto/third_party/transformer/annotations.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/third_party/transformer/annotations.proto", - "description": "Package transformer contains extend options for protobuf files, messages and\nfields.\nOptions are used for customizing transformation process.", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/tools.go.bak b/tools.go similarity index 100% rename from tools.go.bak rename to tools.go