func (is IS) Get(ctx context.Context, req *ttnpb.GetGatewayRequest) (*ttnpb.Gateway, error) {
	callOpt, err := rpcmetadata.WithForwardedAuth(ctx, is.AllowInsecureForCredentials())
	if errors.IsUnauthenticated(err) {
		callOpt = is.WithClusterAuth()
	} else if err != nil {
		return nil, err
	}
	registry, err := is.newRegistryClient(ctx, req.GetGatewayIds())
	if err != nil {
		return nil, err
	}
	return registry.Get(ctx, req, callOpt)
}
Get implements EntityRegistry.
package gatewayserver
import (
	"context"
	pbtypes "github.com/gogo/protobuf/types"
	"go.thethings.network/lorawan-stack/v3/pkg/auth/rights"
	"go.thethings.network/lorawan-stack/v3/pkg/cluster"
	"go.thethings.network/lorawan-stack/v3/pkg/errors"
	"go.thethings.network/lorawan-stack/v3/pkg/rpcmetadata"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"google.golang.org/grpc"
)
type Cluster interface {
	GetPeerConn(ctx context.Context, role ttnpb.ClusterRole, ids cluster.EntityIdentifiers) (*grpc.ClientConn, error)
	AllowInsecureForCredentials() bool
	WithClusterAuth() grpc.CallOption
}
type IS struct {
	Cluster
}
func NewIS(c Cluster) *IS {
	return &IS{
		Cluster: c,
	}
}
func (is IS) AssertGatewayRights(ctx context.Context, ids ttnpb.GatewayIdentifiers, required ...ttnpb.Right) error {
	return rights.RequireGateway(ctx, ids, required...)
}
func (is IS) GetIdentifiersForEUI(ctx context.Context, req *ttnpb.GetGatewayIdentifiersForEUIRequest) (*ttnpb.GatewayIdentifiers, error) {
	registry, err := is.newRegistryClient(ctx, &ttnpb.GatewayIdentifiers{Eui: req.Eui})
	if err != nil {
		return nil, err
	}
	return registry.GetIdentifiersForEUI(ctx, req, is.WithClusterAuth())
}