Documentation ¶
Overview ¶
Package gateways provide gateway registry functions.
Index ¶
- type Cluster
- type GatewayRegistry
- type Registry
- func (Registry) AssertGatewayRights(ctx context.Context, ids *ttnpb.GatewayIdentifiers, required ...ttnpb.Right) error
- func (reg Registry) Create(ctx context.Context, req *ttnpb.CreateGatewayRequest) (*ttnpb.Gateway, error)
- func (reg Registry) Delete(ctx context.Context, req *ttnpb.GatewayIdentifiers) (*emptypb.Empty, error)
- func (reg Registry) Get(ctx context.Context, req *ttnpb.GetGatewayRequest) (*ttnpb.Gateway, error)
- func (reg Registry) GetIdentifiersForEUI(ctx context.Context, gatewayEUI types.EUI64) (*ttnpb.GatewayIdentifiers, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { GetPeerConn(ctx context.Context, role ttnpb.ClusterRole, ids cluster.EntityIdentifiers) (*grpc.ClientConn, error) AllowInsecureForCredentials() bool WithClusterAuth() grpc.CallOption }
Cluster provides cluster operations.
type GatewayRegistry ¶
type GatewayRegistry interface { // AssertGatewayRights checks whether the gateway authentication // (provided in the context) contains the required rights. AssertGatewayRights(ctx context.Context, ids *ttnpb.GatewayIdentifiers, required ...ttnpb.Right) error // GetIdentifiersForEUI returns the gateway identifiers for the EUI. GetIdentifiersForEUI(ctx context.Context, eui types.EUI64) (*ttnpb.GatewayIdentifiers, error) // Create creates a gateway. Create(ctx context.Context, in *ttnpb.CreateGatewayRequest) (*ttnpb.Gateway, error) // Delete the gateway. This may not release the gateway ID for reuse, but it does release the EUI. Delete(ctx context.Context, in *ttnpb.GatewayIdentifiers) (*emptypb.Empty, error) // Get the gateway. This may not release the gateway ID for reuse, but it does release the EUI. Get(ctx context.Context, req *ttnpb.GetGatewayRequest) (*ttnpb.Gateway, error) }
GatewayRegistry abstracts the entity registry's gateway functions.
type Registry ¶
type Registry struct {
Cluster
}
Registry implements GatewayRegistry.
func (Registry) AssertGatewayRights ¶
func (Registry) AssertGatewayRights( ctx context.Context, ids *ttnpb.GatewayIdentifiers, required ...ttnpb.Right, ) error
AssertGatewayRights implements GatewayRegistry.
func (Registry) Create ¶
func (reg Registry) Create(ctx context.Context, req *ttnpb.CreateGatewayRequest) (*ttnpb.Gateway, error)
Create implements GatewayRegistry.
func (Registry) Delete ¶
func (reg Registry) Delete(ctx context.Context, req *ttnpb.GatewayIdentifiers) (*emptypb.Empty, error)
Delete implements GatewayRegistry.
func (Registry) GetIdentifiersForEUI ¶
func (reg Registry) GetIdentifiersForEUI( ctx context.Context, gatewayEUI types.EUI64, ) (*ttnpb.GatewayIdentifiers, error)
GetIdentifiersForEUI implements GatewayRegistry.
Click to show internal directories.
Click to hide internal directories.