mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-19 15:53:49 +00:00
Update code examples.
This commit is contained in:
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/chirpstack/chirpstack/api/go/v4/meta"
|
||||
"github.com/chirpstack/chirpstack/api/go/v4/stream"
|
||||
"github.com/go-redis/redis/v8"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -49,7 +49,7 @@ func main() {
|
||||
lastID = msg.ID
|
||||
|
||||
if b, ok := msg.Values["up"].(string); ok {
|
||||
var pl meta.UplinkMeta
|
||||
var pl stream.UplinkMeta
|
||||
if err := proto.Unmarshal([]byte(b), &pl); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -60,7 +60,7 @@ func main() {
|
||||
}
|
||||
|
||||
if b, ok := msg.Values["down"].(string); ok {
|
||||
var pl meta.DownlinkMeta
|
||||
var pl stream.DownlinkMeta
|
||||
if err := proto.Unmarshal([]byte(b), &pl); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user