souls 0.8.1 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +0,0 @@
1
- module HelloMethod
2
- def say_hello(hello_req, _unused_call)
3
- logger = Logger.new(STDOUT)
4
- logger.info hello_req
5
- Souls::HelloReply.new(message: "Hello #{hello_req.name}")
6
- end
7
-
8
- def say_hello_again(hello_req, _unused_call)
9
- logger = Logger.new(STDOUT)
10
- logger.info hello_req
11
- Souls::HelloReply.new(message: "Works Perfect, #{hello_req.name}")
12
- end
13
- end
@@ -1,69 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: blog.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/protobuf/timestamp_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("blog.proto", :syntax => :proto3) do
9
- add_message "Souls.HelloRequest" do
10
- optional :name, :string, 1
11
- end
12
- add_message "Souls.HelloReply" do
13
- optional :message, :string, 1
14
- end
15
- add_message "Souls.Article" do
16
- optional :id, :string, 1
17
- optional :user_id, :string, 2
18
- optional :title, :string, 3
19
- optional :body, :string, 4
20
- optional :thumnail_url, :string, 5
21
- optional :public_date, :uint32, 6
22
- optional :article_category_id, :uint32, 7
23
- optional :is_public, :bool, 8
24
- repeated :tag, :string, 9
25
- optional :has_series, :bool, 10
26
- optional :series_id, :uint32, 11
27
- optional :episode_num, :uint32, 12
28
- optional :created_at, :message, 13, "google.protobuf.Timestamp"
29
- optional :updated_at, :message, 14, "google.protobuf.Timestamp"
30
- end
31
- add_message "Souls.GetArticlRequest" do
32
- optional :id, :uint32, 1
33
- end
34
- add_message "Souls.GetArticleReply" do
35
- optional :article, :message, 1, "Souls.Article"
36
- end
37
- add_message "Souls.GetArticlesRequest" do
38
- optional :search, :string, 1
39
- optional :limit, :uint32, 2
40
- end
41
- add_message "Souls.UpdateArticlesReply" do
42
- repeated :articles, :message, 1, "Souls.Article"
43
- end
44
- add_message "Souls.DeleteArticlRequest" do
45
- optional :id, :uint32, 1
46
- end
47
- add_message "Souls.DeleteArticleReply" do
48
- optional :article, :message, 1, "Souls.Article"
49
- end
50
- add_message "Souls.CreateArticleReply" do
51
- optional :article, :message, 1, "Souls.Article"
52
- end
53
- end
54
- end
55
-
56
- module Souls
57
- HelloRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.HelloRequest").msgclass
58
- HelloReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.HelloReply").msgclass
59
- Article = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.Article").msgclass
60
- GetArticlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.GetArticlRequest").msgclass
61
- GetArticleReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.GetArticleReply").msgclass
62
- GetArticlesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.GetArticlesRequest").msgclass
63
- UpdateArticlesReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.UpdateArticlesReply").msgclass
64
- DeleteArticlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.DeleteArticlRequest").msgclass
65
- DeleteArticleReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.DeleteArticleReply").msgclass
66
- CreateArticleReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Souls.CreateArticleReply").msgclass
67
- end
68
- module BlogPb
69
- end
@@ -1,30 +0,0 @@
1
- # Generated by the SOULs protocol buffer compiler. DO NOT EDIT!
2
- # Source: blog.proto for package 'Souls'
3
-
4
- require_relative "blog_pb"
5
- module Souls
6
- module Blog
7
- class Service
8
-
9
- include GRPC::GenericService
10
-
11
- self.marshal_class_method = :encode
12
- self.unmarshal_class_method = :decode
13
- self.service_name = 'Souls.Blog'
14
-
15
- # Sends a greeting
16
- rpc :SayHello, ::Souls::HelloRequest, ::Souls::HelloReply
17
- # Sends another greeting
18
- rpc :SayHelloAgain, ::Souls::HelloRequest, ::Souls::HelloReply
19
- # Blog Service Sample
20
- rpc :GetArticle, ::Souls::GetArticlRequest, ::Souls::GetArticleReply
21
- rpc :GetArticles, ::Souls::GetArticlesRequest, stream(::Souls::Article)
22
- rpc :CreateArticle, ::Souls::Article, ::Souls::CreateArticleReply
23
- rpc :UpdateArticles, stream(::Souls::Article), ::Souls::UpdateArticlesReply
24
- rpc :DeleteArticle, ::Souls::DeleteArticlRequest, ::Souls::DeleteArticleReply
25
- rpc :CreateArticlesInStream, stream(::Souls::Article), stream(::Souls::Article)
26
- end
27
-
28
- Stub = Service.rpc_stub_class
29
- end
30
- end
@@ -1,11 +0,0 @@
1
- Souls.configure do |config|
2
- config.project_id = "elsoul2"
3
- config.app = "blog"
4
- config.network = "elsoul"
5
- config.machine_type = "custom-1-6656"
6
- config.zone = "asia-northeast1-b"
7
- config.domain = "blog.el-soul.com"
8
- config.google_application_credentials = "./config/credentials.json"
9
- config.strain = "service"
10
- config.proto_package_name = "souls"
11
- end
@@ -1,39 +0,0 @@
1
- apiVersion: v1
2
- kind: Service
3
- metadata:
4
- name: souls_service
5
- annotations:
6
- cloud.google.com/neg: '{"exposed_ports":{"8080":{}}}'
7
- spec:
8
- ports:
9
- - port: 8080
10
- name: souls_service
11
- protocol: TCP
12
- targetPort: 50051
13
- selector:
14
- run: souls_service
15
- type: ClusterIP
16
-
17
- ---
18
- apiVersion: apps/v1
19
- kind: Deployment
20
- metadata:
21
- labels:
22
- run: souls_service
23
- name: souls_service
24
- spec:
25
- selector:
26
- matchLabels:
27
- run: souls_service
28
- replicas: 2
29
- template:
30
- metadata:
31
- labels:
32
- run: souls_service
33
- spec:
34
- containers:
35
- - image: asia.gcr.io/elsoul2/souls_service:0.0.1
36
- name: souls_service
37
- ports:
38
- - protocol: TCP
39
- containerPort: 50051
@@ -1,12 +0,0 @@
1
- require "./app"
2
-
3
- def main
4
- s = GRPC::RpcServer.new
5
- s.add_http2_port("0.0.0.0:50051", :this_port_is_insecure)
6
- s.handle(ApplicationController)
7
- logger = Logger.new(STDOUT)
8
- logger.info "Running Server! SOULs Ready on localhost:50051"
9
- s.run_till_terminated_or_interrupted([1, "int", "SIGQUIT"])
10
- end
11
-
12
- main
@@ -1,79 +0,0 @@
1
- syntax = "proto3";
2
-
3
- package Souls;
4
-
5
- import "google/protobuf/timestamp.proto";
6
-
7
- service Blog {
8
- // Sends a greeting
9
- rpc SayHello (HelloRequest) returns (HelloReply) {}
10
- // Sends another greeting
11
- rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
12
-
13
- // Blog Service Sample
14
- rpc GetArticle(GetArticlRequest) returns (GetArticleReply) {}
15
- rpc GetArticles(GetArticlesRequest) returns (stream Article) {}
16
- rpc CreateArticle(Article) returns (CreateArticleReply) {}
17
- rpc UpdateArticles(stream Article) returns (UpdateArticlesReply) {}
18
- rpc DeleteArticle(DeleteArticlRequest) returns (DeleteArticleReply) {}
19
- rpc CreateArticlesInStream(stream Article) returns (stream Article) {}
20
- }
21
-
22
- // The request message containing the user's name.
23
- message HelloRequest {
24
- string name = 1;
25
- }
26
-
27
- // The response message containing the greetings
28
- message HelloReply {
29
- string message = 1;
30
- }
31
-
32
-
33
- // Blog Protos
34
- message Article {
35
- string id = 1;
36
- string user_id = 2;
37
- string title = 3;
38
- string body = 4;
39
- string thumnail_url = 5;
40
- uint32 public_date = 6;
41
- uint32 article_category_id = 7;
42
- bool is_public = 8;
43
- repeated string tag = 9;
44
- bool has_series = 10;
45
- uint32 series_id = 11;
46
- uint32 episode_num = 12;
47
- google.protobuf.Timestamp created_at = 13;
48
- google.protobuf.Timestamp updated_at = 14;
49
- }
50
-
51
-
52
- message GetArticlRequest {
53
- uint32 id = 1;
54
- }
55
-
56
- message GetArticleReply {
57
- Article article = 1;
58
- }
59
-
60
- message GetArticlesRequest {
61
- string search = 1;
62
- uint32 limit = 2;
63
- }
64
-
65
- message UpdateArticlesReply {
66
- repeated Article articles = 1;
67
- }
68
-
69
- message DeleteArticlRequest {
70
- uint32 id = 1;
71
- }
72
-
73
- message DeleteArticleReply {
74
- Article article = 1;
75
- }
76
-
77
- message CreateArticleReply {
78
- Article article = 1;
79
- }