Skip to content

Commit c3490e9

Browse files
author
Vlad Vitan
committed
qrg: Change gatewayEUI type in interface
1 parent 4e3cde4 commit c3490e9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pkg/qrcodegenerator/grpc_gateways.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (s *gatewayQRCodeGeneratorServer) Parse(ctx context.Context, req *ttnpb.Par
5757
ClaimGatewayRequest: &ttnpb.ClaimGatewayRequest{
5858
SourceGateway: &ttnpb.ClaimGatewayRequest_AuthenticatedIdentifiers_{
5959
AuthenticatedIdentifiers: &ttnpb.ClaimGatewayRequest_AuthenticatedIdentifiers{
60-
GatewayEui: []byte(data.GatewayEUI()),
60+
GatewayEui: data.GatewayEUI().Bytes(),
6161
AuthenticationCode: []byte(data.OwnerToken()),
6262
},
6363
},

pkg/qrcodegenerator/qrcode/gateways/gateways.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020

2121
"go.thethings.network/lorawan-stack/v3/pkg/errors"
2222
"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
23+
"go.thethings.network/lorawan-stack/v3/pkg/types"
2324
)
2425

2526
var (
@@ -38,7 +39,7 @@ type Format interface {
3839
type Data interface {
3940
// FormatID returns the ID of the format used to parse the QR Code data.
4041
FormatID() string
41-
GatewayEUI() string
42+
GatewayEUI() types.EUI64
4243
OwnerToken() string
4344
encoding.TextUnmarshaler
4445
}

pkg/qrcodegenerator/qrcode/gateways/ttigpro1.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func (m *ttigpro1) FormatID() string {
6464
return formatIDttigpro1
6565
}
6666

67-
func (m *ttigpro1) GatewayEUI() string {
68-
return m.gatewayEUI.String()
67+
func (m *ttigpro1) GatewayEUI() types.EUI64 {
68+
return m.gatewayEUI
6969
}
7070

7171
func (m *ttigpro1) OwnerToken() string {

0 commit comments

Comments
 (0)