Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 3de7f79

Browse files
committed
TTN code dependencies removed
1 parent 86f21dd commit 3de7f79

File tree

21 files changed

+1730
-74
lines changed

21 files changed

+1730
-74
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
/data/target/
2222
/samples/mqtt/target/
2323
/.license
24-
/management/src/main/proto/
2524
/samples/account/target/
2625
/samples/samples-account/target/
2726
/data/data-common/target/
2827
/samples/ttnmgmt/target/
2928
/samples/samples-management/target/
30-
/samples/samples-amqp/target/
29+
/samples/samples-amqp/target/

management/pom.xml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,12 @@
3737
<dependency>
3838
<groupId>io.netty</groupId>
3939
<artifactId>netty-tcnative-boringssl-static</artifactId>
40-
<version>2.0.0.Final</version>
40+
<version>1.1.33.Fork26</version>
4141
</dependency>
4242
</dependencies>
4343

4444
<build>
4545
<plugins>
46-
<plugin>
47-
<groupId>org.apache.maven.plugins</groupId>
48-
<artifactId>maven-antrun-plugin</artifactId>
49-
<version>1.8</version>
50-
<executions>
51-
<execution>
52-
<id>generateSources</id>
53-
<phase>generate-sources</phase>
54-
<configuration>
55-
<target>
56-
<exec executable="./run.sh"/>
57-
</target>
58-
</configuration>
59-
<goals>
60-
<goal>run</goal>
61-
</goals>
62-
</execution>
63-
</executions>
64-
</plugin>
6546
<plugin>
6647
<groupId>org.xolstice.maven.plugins</groupId>
6748
<artifactId>protobuf-maven-plugin</artifactId>
@@ -82,4 +63,5 @@
8263
</plugin>
8364
</plugins>
8465
</build>
66+
8567
</project>

management/run.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.

management/src/main/java/org/thethingsnetwork/management/async/AsyncDiscovery.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ private AsyncDiscovery(DiscoveryGrpc.DiscoveryFutureStub _stub) {
6363
* @param _port The server port
6464
* @return An Observable stream containing the newly built AsyncDiscovery wrapper
6565
*/
66-
public static Observable<AsyncDiscovery> from(String _host, int _port) {
66+
public static Observable<AsyncDiscovery> from(String _host, int _port, Boolean useSecureConnection) {
6767
return Observable
6868
.create((Subscriber<? super AsyncDiscovery> t) -> {
6969
try {
7070
ManagedChannel ch = ManagedChannelBuilder
7171
.forAddress(_host, _port)
72+
.usePlaintext(!useSecureConnection)
7273
.build();
7374
DiscoveryGrpc.DiscoveryFutureStub stub1 = DiscoveryGrpc.newFutureStub(ch);
7475
t.onNext(new AsyncDiscovery(stub1));
@@ -85,7 +86,11 @@ public static Observable<AsyncDiscovery> from(String _host, int _port) {
8586
* @return An Observable stream containing the newly built AsyncDiscovery wrapper
8687
*/
8788
public static Observable<AsyncDiscovery> getDefault() {
88-
return from(HOST, PORT);
89+
return from(HOST, PORT, false);
90+
}
91+
92+
public static Observable<AsyncDiscovery> getDefault(Boolean useSecureConnection) {
93+
return from(HOST, PORT, useSecureConnection);
8994
}
9095

9196
/**

management/src/main/java/org/thethingsnetwork/management/sync/Discovery.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ protected Discovery(AsyncDiscovery _wrap) {
4747
* @param _port The server port
4848
* @return The newly built Discovery wrapper
4949
*/
50-
public static Discovery from(String _host, int _port) {
51-
return AsyncDiscovery.from(_host, _port)
50+
public static Discovery from(String _host, int _port, Boolean useSecureConnection) {
51+
return AsyncDiscovery.from(_host, _port, useSecureConnection)
5252
.map((AsyncDiscovery t) -> new Discovery(t))
5353
.toBlocking()
5454
.single();
@@ -57,10 +57,19 @@ public static Discovery from(String _host, int _port) {
5757
/**
5858
* Build a Discovery wrapper using default servers
5959
*
60-
* @return The newly built Discovery wrapper
60+
* @return The newly built Discovery wrapper without tls
6161
*/
6262
public static Discovery getDefault() {
63-
return from(AsyncDiscovery.HOST, AsyncDiscovery.PORT);
63+
return from(AsyncDiscovery.HOST, AsyncDiscovery.PORT, false);
64+
}
65+
66+
/**
67+
* Build a Discovery wrapper using default servers
68+
*
69+
* @return The newly built Discovery wrapper with option to enable tls
70+
*/
71+
public static Discovery getDefault(Boolean useSecureConnection) {
72+
return from(AsyncDiscovery.HOST, AsyncDiscovery.PORT, useSecureConnection);
6473
}
6574

6675
/**
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
// Protocol Buffers for Go with Gadgets
2+
//
3+
// Copyright (c) 2013, The GoGo Authors. All rights reserved.
4+
// http://github.com/gogo/protobuf
5+
//
6+
// Redistribution and use in source and binary forms, with or without
7+
// modification, are permitted provided that the following conditions are
8+
// met:
9+
//
10+
// * Redistributions of source code must retain the above copyright
11+
// notice, this list of conditions and the following disclaimer.
12+
// * Redistributions in binary form must reproduce the above
13+
// copyright notice, this list of conditions and the following disclaimer
14+
// in the documentation and/or other materials provided with the
15+
// distribution.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
syntax = "proto2";
30+
package gogoproto;
31+
32+
import "google/protobuf/descriptor.proto";
33+
34+
option java_package = "com.google.protobuf";
35+
option java_outer_classname = "GoGoProtos";
36+
option go_package = "github.com/gogo/protobuf/gogoproto";
37+
38+
extend google.protobuf.EnumOptions {
39+
optional bool goproto_enum_prefix = 62001;
40+
optional bool goproto_enum_stringer = 62021;
41+
optional bool enum_stringer = 62022;
42+
optional string enum_customname = 62023;
43+
optional bool enumdecl = 62024;
44+
}
45+
46+
extend google.protobuf.EnumValueOptions {
47+
optional string enumvalue_customname = 66001;
48+
}
49+
50+
extend google.protobuf.FileOptions {
51+
optional bool goproto_getters_all = 63001;
52+
optional bool goproto_enum_prefix_all = 63002;
53+
optional bool goproto_stringer_all = 63003;
54+
optional bool verbose_equal_all = 63004;
55+
optional bool face_all = 63005;
56+
optional bool gostring_all = 63006;
57+
optional bool populate_all = 63007;
58+
optional bool stringer_all = 63008;
59+
optional bool onlyone_all = 63009;
60+
61+
optional bool equal_all = 63013;
62+
optional bool description_all = 63014;
63+
optional bool testgen_all = 63015;
64+
optional bool benchgen_all = 63016;
65+
optional bool marshaler_all = 63017;
66+
optional bool unmarshaler_all = 63018;
67+
optional bool stable_marshaler_all = 63019;
68+
69+
optional bool sizer_all = 63020;
70+
71+
optional bool goproto_enum_stringer_all = 63021;
72+
optional bool enum_stringer_all = 63022;
73+
74+
optional bool unsafe_marshaler_all = 63023;
75+
optional bool unsafe_unmarshaler_all = 63024;
76+
77+
optional bool goproto_extensions_map_all = 63025;
78+
optional bool goproto_unrecognized_all = 63026;
79+
optional bool gogoproto_import = 63027;
80+
optional bool protosizer_all = 63028;
81+
optional bool compare_all = 63029;
82+
optional bool typedecl_all = 63030;
83+
optional bool enumdecl_all = 63031;
84+
85+
optional bool goproto_registration = 63032;
86+
optional bool messagename_all = 63033;
87+
88+
optional bool goproto_sizecache_all = 63034;
89+
optional bool goproto_unkeyed_all = 63035;
90+
}
91+
92+
extend google.protobuf.MessageOptions {
93+
optional bool goproto_getters = 64001;
94+
optional bool goproto_stringer = 64003;
95+
optional bool verbose_equal = 64004;
96+
optional bool face = 64005;
97+
optional bool gostring = 64006;
98+
optional bool populate = 64007;
99+
optional bool stringer = 67008;
100+
optional bool onlyone = 64009;
101+
102+
optional bool equal = 64013;
103+
optional bool description = 64014;
104+
optional bool testgen = 64015;
105+
optional bool benchgen = 64016;
106+
optional bool marshaler = 64017;
107+
optional bool unmarshaler = 64018;
108+
optional bool stable_marshaler = 64019;
109+
110+
optional bool sizer = 64020;
111+
112+
optional bool unsafe_marshaler = 64023;
113+
optional bool unsafe_unmarshaler = 64024;
114+
115+
optional bool goproto_extensions_map = 64025;
116+
optional bool goproto_unrecognized = 64026;
117+
118+
optional bool protosizer = 64028;
119+
optional bool compare = 64029;
120+
121+
optional bool typedecl = 64030;
122+
123+
optional bool messagename = 64033;
124+
125+
optional bool goproto_sizecache = 64034;
126+
optional bool goproto_unkeyed = 64035;
127+
}
128+
129+
extend google.protobuf.FieldOptions {
130+
optional bool nullable = 65001;
131+
optional bool embed = 65002;
132+
optional string customtype = 65003;
133+
optional string customname = 65004;
134+
optional string jsontag = 65005;
135+
optional string moretags = 65006;
136+
optional string casttype = 65007;
137+
optional string castkey = 65008;
138+
optional string castvalue = 65009;
139+
140+
optional bool stdtime = 65010;
141+
optional bool stdduration = 65011;
142+
optional bool wktpointer = 65012;
143+
144+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright (c) 2015, Google Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.api;
18+
19+
import "google/api/http.proto";
20+
import "google/protobuf/descriptor.proto";
21+
22+
option java_multiple_files = true;
23+
option java_outer_classname = "AnnotationsProto";
24+
option java_package = "com.google.api";
25+
26+
extend google.protobuf.MethodOptions {
27+
// See `HttpRule`.
28+
HttpRule http = 72295728;
29+
}

0 commit comments

Comments
 (0)