Documentation ¶
Index ¶
- type Frontend
- type IdentityServer
- func (is *IdentityServer) Add(ctx context.Context, ids ttnpb.GatewayIdentifiers, key string)
- func (is *IdentityServer) Get(ctx context.Context, req *ttnpb.GetGatewayRequest) (*ttnpb.Gateway, error)
- func (is *IdentityServer) ListRights(ctx context.Context, ids *ttnpb.GatewayIdentifiers) (res *ttnpb.Rights, err error)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frontend ¶
type Frontend struct { Up chan *ttnpb.UplinkMessage Status chan *ttnpb.GatewayStatus TxAck chan *ttnpb.TxAcknowledgment Down chan *ttnpb.DownlinkMessage }
Frontend is a mock front-end.
func ConnectFrontend ¶
func ConnectFrontend(ctx context.Context, ids ttnpb.GatewayIdentifiers, server io.Server) (*Frontend, error)
ConnectFrontend connects a new mock front-end to the given server. The gateway time starts at Unix epoch.
func (*Frontend) SupportsDownlinkClaim ¶
type IdentityServer ¶
type IdentityServer struct { ttnpb.GatewayRegistryServer ttnpb.GatewayAccessServer // contains filtered or unexported fields }
IdentityServer is the mock IS for GS tests.
func NewIS ¶
func NewIS(ctx context.Context) (*IdentityServer, string)
NewIS creates and starts an instance of the IS.
func (*IdentityServer) Add ¶
func (is *IdentityServer) Add(ctx context.Context, ids ttnpb.GatewayIdentifiers, key string)
Add adds a new gateway.
func (*IdentityServer) Get ¶
func (is *IdentityServer) Get(ctx context.Context, req *ttnpb.GetGatewayRequest) (*ttnpb.Gateway, error)
Get retrives the Gateway.
func (*IdentityServer) ListRights ¶
func (is *IdentityServer) ListRights(ctx context.Context, ids *ttnpb.GatewayIdentifiers) (res *ttnpb.Rights, err error)
ListRights lists the rights from context for a particular gateway.
type Server ¶
type Server interface { io.Server HasDownlinkClaim(context.Context, ttnpb.GatewayIdentifiers) bool RegisterGateway(ctx context.Context, ids ttnpb.GatewayIdentifiers, gateway *ttnpb.Gateway) GetConnection(ctx context.Context, ids ttnpb.GatewayIdentifiers) *io.Connection Connections() <-chan *io.Connection }
Server represents a testing io.Server.
Click to show internal directories.
Click to hide internal directories.