Skip to content

Commit 5edbd3b

Browse files
committed
Migrate to ChirpStack v4 API.
1 parent 74fc2a8 commit 5edbd3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1470
-2302
lines changed

.goreleaser.yml

-6
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@ builds:
77
- main: cmd/chirpstack-gateway-bridge/main.go
88
binary: chirpstack-gateway-bridge
99
goos:
10-
- windows
11-
- darwin
1210
- linux
1311
goarch:
1412
- amd64
15-
- 386
1613
- arm
1714
- arm64
1815
- mips
1916
goarm:
2017
- 5
2118
- 6
2219
- 7
23-
ignore:
24-
- goos: darwin
25-
goarch: 386
2620
hooks:
2721
post: ./packaging/scripts/compress-mips.sh
2822

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Orne Brocaar
3+
Copyright (c) 2022 Orne Brocaar
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+7-21
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,29 @@
33
![Tests](https://github.com/brocaar/chirpstack-gateway-bridge/actions/workflows/main.yml/badge.svg?branch=master)
44

55
ChirpStack Gateway Bridge is a service which converts LoRa<sup>&reg;</sup> Packet Forwarder protocols
6-
into a ChirpStack Network Server [common data-format](https://github.com/brocaar/chirpstack-api/blob/master/protobuf/gw/gw.proto) (JSON and Protobuf).
7-
This component is part of the ChirpStack open-source LoRaWAN<sup>&reg;</sup> Network Server stack.
6+
into a ChirpStack [common data-format](https://github.com/chirpstack/chirpstack/blob/master/api/proto/gw/gw.proto) (JSON and Protobuf).
7+
This component is part of the ChirpStack open-source LoRaWAN<sup>&reg;</sup> Network Server project.
88

99
## Backends
1010

1111
The following packet-forwarder backends are provided:
1212

1313
* [Semtech UDP packet-forwarder](https://github.com/Lora-net/packet_forwarder)
1414
* [Basic Station packet-forwarder](https://github.com/lorabasics/basicstation)
15+
* [ChirpStack Concentratord](https://github.com/brocaar/chirpstack-concentratord/)
1516

1617
## Integrations
1718

1819
The following integrations are provided:
1920

2021
* Generic MQTT broker
2122
* [GCP Cloud IoT Core MQTT Bridge](https://cloud.google.com/iot-core/)
23+
* [Azure IoT Hub](https://azure.microsoft.com/en-us/services/iot-hub/)
2224

23-
## Architecture
25+
## Documentation
2426

25-
![architecture](https://www.chirpstack.io/static/img/graphs/architecture.dot.png)
26-
27-
### Component links
28-
29-
* [ChirpStack Gateway Bridge](https://www.chirpstack.io/gateway-bridge/)
30-
* [ChirpStack Network Server](https://www.chirpstack.io/network-server/)
31-
* [ChirpStack Application Server](https://www.chirpstack.io/application-server/)
32-
33-
## Links
34-
35-
* [Downloads](https://www.chirpstack.io/gateway-bridge/overview/downloads/)
36-
* [Docker image](https://hub.docker.com/r/chirpstack/chirpstack-gateway-bridge/)
37-
* [Documentation](https://www.chirpstack.io/gateway-bridge/)
38-
* [Building from source](https://www.chirpstack.io/gateway-bridge/community/source/)
39-
* [Contributing](https://www.chirpstack.io/gateway-bridge/community/contribute/)
40-
* Support
41-
* [Community forum](https://forum.chirpstack.io)
42-
* [Bug or feature requests](https://github.com/brocaar/chirpstack-gateway-bridge/issues)
27+
Please refer to the [ChirpStack documentation](https://www.chirpstack.io/) for
28+
more information.
4329

4430
## License
4531

cmd/chirpstack-gateway-bridge/cmd/configfile.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ type="{{ .Backend.Type }}"
7979
# packet-forwarder matches this port.
8080
udp_bind = "{{ .Backend.SemtechUDP.UDPBind }}"
8181
82-
# Skip the CRC status-check of received packets
83-
#
84-
# This is only has effect when the packet-forwarder is configured to forward
85-
# LoRa frames with CRC errors.
86-
skip_crc_check = {{ .Backend.SemtechUDP.SkipCRCCheck }}
87-
8882
# Fake RX timestamp.
8983
#
9084
# Fake the RX time when the gateway does not have GPS, in which case
@@ -95,9 +89,6 @@ type="{{ .Backend.Type }}"
9589
# ChirpStack Concentratord backend.
9690
[backend.concentratord]
9791
98-
# Check for CRC OK.
99-
crc_check={{ .Backend.Concentratord.CRCCheck }}
100-
10192
# Event API URL.
10293
event_url="{{ .Backend.Concentratord.EventURL }}"
10394
@@ -220,7 +211,7 @@ type="{{ .Backend.Type }}"
220211
#
221212
# This defines how the MQTT payloads are encoded. Valid options are:
222213
# * protobuf: Protobuf encoding
223-
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
214+
# * json: JSON encoding (for debugging)
224215
marshaler="{{ .Integration.Marshaler }}"
225216
226217
# MQTT integration configuration.

cmd/chirpstack-gateway-bridge/cmd/root.go

-6
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ func initConfig() {
131131
log.WithError(err).Fatal("unmarshal config error")
132132
}
133133

134-
// backwards compatibility when BasicStation filters have been configured.
135-
if config.C.Backend.Type == "basic_station" && (len(config.C.Backend.BasicStation.Filters.NetIDs) != 0 || len(config.C.Backend.BasicStation.Filters.JoinEUIs) != 0) {
136-
config.C.Filters.NetIDs = config.C.Backend.BasicStation.Filters.NetIDs
137-
config.C.Filters.JoinEUIs = config.C.Backend.BasicStation.Filters.JoinEUIs
138-
}
139-
140134
// migrate server to servers
141135
if config.C.Integration.MQTT.Auth.Generic.Server != "" {
142136
config.C.Integration.MQTT.Auth.Generic.Servers = []string{config.C.Integration.MQTT.Auth.Generic.Server}

go.mod

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ module github.com/brocaar/chirpstack-gateway-bridge
33
go 1.17
44

55
require (
6-
github.com/brocaar/chirpstack-api/go/v3 v3.12.5
76
github.com/brocaar/lorawan v0.0.0-20220207095711-d675789e16ab
7+
github.com/chirpstack/chirpstack/api/go/v4 v4.0.0-test.13
88
github.com/eclipse/paho.mqtt.golang v1.4.1
99
github.com/go-zeromq/zmq4 v0.7.0
10-
github.com/gofrs/uuid v4.2.0+incompatible
1110
github.com/golang-jwt/jwt/v4 v4.4.2
12-
github.com/golang/protobuf v1.5.2
1311
github.com/goreleaser/goreleaser v0.106.0
1412
github.com/goreleaser/nfpm v0.11.0
1513
github.com/gorilla/websocket v1.5.0
@@ -21,6 +19,7 @@ require (
2119
github.com/spf13/viper v1.12.0
2220
github.com/stretchr/testify v1.7.1
2321
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
22+
google.golang.org/protobuf v1.28.0
2423
)
2524

2625
require (
@@ -38,6 +37,7 @@ require (
3837
github.com/fatih/color v1.13.0 // indirect
3938
github.com/fsnotify/fsnotify v1.5.4 // indirect
4039
github.com/go-zeromq/goczmq/v4 v4.2.2 // indirect
40+
github.com/golang/protobuf v1.5.2 // indirect
4141
github.com/google/go-github v17.0.0+incompatible // indirect
4242
github.com/google/go-querystring v1.0.0 // indirect
4343
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
@@ -74,7 +74,6 @@ require (
7474
golang.org/x/tools v0.1.11 // indirect
7575
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
7676
google.golang.org/appengine v1.6.7 // indirect
77-
google.golang.org/protobuf v1.28.0 // indirect
7877
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
7978
gopkg.in/ini.v1 v1.66.4 // indirect
8079
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

+3-13
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
8787
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
8888
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI=
8989
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
90-
github.com/brocaar/chirpstack-api/go/v3 v3.12.5 h1:sLV+zSZLUPnNCo2mf+gsw0ektbSiSHDvDn+RGs3ucgA=
91-
github.com/brocaar/chirpstack-api/go/v3 v3.12.5/go.mod h1:v8AWP19nOJK4rwJsr1+weDfpUc4UNLbRh8Eygn4Oh00=
9290
github.com/brocaar/lorawan v0.0.0-20220207095711-d675789e16ab h1:sv8KWYMhLnZj7EPtZgWFl4/ZSx1f++j0Im5gYhbLuEI=
9391
github.com/brocaar/lorawan v0.0.0-20220207095711-d675789e16ab/go.mod h1:Vlf3gOwizqX4y3snWe/i2EqRT83HvYuwBjRu39PevW0=
9492
github.com/caarlos0/ctrlc v1.0.0 h1:2DtF8GSIcajgffDFJzyG15vO+1PuBWOMUdFut7NnXhw=
@@ -101,6 +99,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
10199
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
102100
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
103101
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
102+
github.com/chirpstack/chirpstack/api/go/v4 v4.0.0-test.13 h1:u3KJS4qsiFOnD26ZjbCAofLOsxBPbcP3u17qjxDqXTM=
103+
github.com/chirpstack/chirpstack/api/go/v4 v4.0.0-test.13/go.mod h1:KBW7imf70O9ifrMmoFH8+dn0+MUFS1PdC5shXH7W3dI=
104104
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
105105
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
106106
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -164,8 +164,6 @@ github.com/go-zeromq/goczmq/v4 v4.2.2/go.mod h1:Sm/lxrfxP/Oxqs0tnHD6WAhwkWrx+S+1
164164
github.com/go-zeromq/zmq4 v0.7.0 h1:tmmTVfWB0HYo+8Ra0DK2MJIDl1lsvuU/J9559hpLU7s=
165165
github.com/go-zeromq/zmq4 v0.7.0/go.mod h1:fo1rWyfV/bsg7tq/F9LF1H0e2Cf3ovQFoge1G21AnWU=
166166
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
167-
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
168-
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
169167
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
170168
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
171169
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
@@ -266,7 +264,6 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
266264
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
267265
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
268266
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
269-
github.com/grpc-ecosystem/grpc-gateway v1.11.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
270267
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
271268
github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
272269
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
@@ -436,7 +433,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
436433
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
437434
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
438435
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
439-
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
440436
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
441437
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
442438
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
@@ -562,7 +558,6 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r
562558
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
563559
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
564560
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
565-
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
566561
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
567562
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
568563
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@@ -575,7 +570,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
575570
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
576571
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
577572
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
578-
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
579573
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
580574
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
581575
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -655,12 +649,10 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
655649
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
656650
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
657651
golang.org/x/sys v0.0.0-20181030150119-7e31e0c00fa0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
658-
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
659652
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
660653
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
661654
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
662655
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
663-
golang.org/x/sys v0.0.0-20190402054613-e4093980e83e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
664656
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
665657
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
666658
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -876,7 +868,6 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn
876868
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
877869
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
878870
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
879-
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
880871
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
881872
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
882873
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
@@ -978,6 +969,7 @@ google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11
978969
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
979970
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
980971
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
972+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY=
981973
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
982974
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
983975
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1003,9 +995,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
1003995
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
1004996
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
1005997
gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
1006-
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
1007998
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
1008-
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
1009999
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
10101000
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
10111001
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

internal/backend/backend.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55

66
"github.com/pkg/errors"
77

8-
"github.com/brocaar/chirpstack-api/go/v3/gw"
98
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/basicstation"
109
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/concentratord"
1110
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/events"
1211
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/semtechudp"
1312
"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
13+
"github.com/chirpstack/chirpstack/api/go/v4/gw"
1414
)
1515

1616
var backend Backend
@@ -51,26 +51,26 @@ type Backend interface {
5151
Start() error
5252

5353
// SetDownlinkTxAckFunc sets the DownlinkTXAck handler func.
54-
SetDownlinkTxAckFunc(func(gw.DownlinkTXAck))
54+
SetDownlinkTxAckFunc(func(*gw.DownlinkTxAck))
5555

5656
// SetGatewayStatsFunc sets the GatewayStats handler func.
57-
SetGatewayStatsFunc(func(gw.GatewayStats))
57+
SetGatewayStatsFunc(func(*gw.GatewayStats))
5858

5959
// SetUplinkFrameFunc sets the UplinkFrame handler func.
60-
SetUplinkFrameFunc(func(gw.UplinkFrame))
60+
SetUplinkFrameFunc(func(*gw.UplinkFrame))
6161

6262
// SetRawPacketForwarderEventFunc sets the RawPacketForwarderEvent handler func.
63-
SetRawPacketForwarderEventFunc(func(gw.RawPacketForwarderEvent))
63+
SetRawPacketForwarderEventFunc(func(*gw.RawPacketForwarderEvent))
6464

6565
// SetSubscribeEventFunc sets the Subscribe handler func.
6666
SetSubscribeEventFunc(func(events.Subscribe))
6767

6868
// SendDownlinkFrame sends the given downlink frame.
69-
SendDownlinkFrame(gw.DownlinkFrame) error
69+
SendDownlinkFrame(*gw.DownlinkFrame) error
7070

7171
// ApplyConfiguration applies the given configuration to the gateway.
72-
ApplyConfiguration(gw.GatewayConfiguration) error
72+
ApplyConfiguration(*gw.GatewayConfiguration) error
7373

7474
// RawPacketForwarderCommand sends the given raw command to the packet-forwarder.
75-
RawPacketForwarderCommand(gw.RawPacketForwarderCommand) error
75+
RawPacketForwarderCommand(*gw.RawPacketForwarderCommand) error
7676
}

0 commit comments

Comments
 (0)