Documentation ¶
Index ¶
- func GetConfig() config.Config
- func MustFlushRedis(p *redis.Pool)
- func MustPrefillRedisPool(p *redis.Pool, count int)
- func MustResetDB(db *sqlx.DB)
- func NewApplicationServerPool(client *ApplicationClient) asclient.Pool
- type ApplicationClient
- func (t *ApplicationClient) HandleDownlinkACK(ctx context.Context, in *as.HandleDownlinkACKRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleError(ctx context.Context, in *as.HandleErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleGatewayStats(ctx context.Context, in *as.HandleGatewayStatsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleProprietaryUplink(ctx context.Context, in *as.HandleProprietaryUplinkRequest, ...) (*empty.Empty, error)
- func (t *ApplicationClient) HandleUplinkData(ctx context.Context, in *as.HandleUplinkDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) SetDeviceLocation(ctx context.Context, in *as.SetDeviceLocationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) SetDeviceStatus(ctx context.Context, in *as.SetDeviceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- type ApplicationServerPool
- type Config
- type GatewayBackend
- func (b *GatewayBackend) Close() error
- func (b *GatewayBackend) DownlinkTXAckChan() chan gw.DownlinkTXAck
- func (b *GatewayBackend) RXPacketChan() chan gw.UplinkFrame
- func (b *GatewayBackend) SendGatewayConfigPacket(config gw.GatewayConfiguration) error
- func (b *GatewayBackend) SendTXPacket(txPacket gw.DownlinkFrame) error
- func (b *GatewayBackend) StatsPacketChan() chan gw.GatewayStats
- type GeolocationClient
- func (g *GeolocationClient) ResolveMultiFrameTDOA(ctx context.Context, in *geo.ResolveMultiFrameTDOARequest, ...) (*geo.ResolveMultiFrameTDOAResponse, error)
- func (g *GeolocationClient) ResolveTDOA(ctx context.Context, in *geo.ResolveTDOARequest, opts ...grpc.CallOption) (*geo.ResolveTDOAResponse, error)
- type NetworkControllerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustPrefillRedisPool ¶
MustPrefillRedisPool pre-fills the pool with count connections.
func NewApplicationServerPool ¶
func NewApplicationServerPool(client *ApplicationClient) asclient.Pool
NewApplicationServerPool create an application-server client pool which always returns the given client on Get.
Types ¶
type ApplicationClient ¶
type ApplicationClient struct { HandleDataUpErr error HandleProprietaryUpErr error HandleDownlinkACKErr error SetDeviceStatusError error SetDeviceLocationErrror error HandleDataUpChan chan as.HandleUplinkDataRequest HandleProprietaryUpChan chan as.HandleProprietaryUplinkRequest HandleErrorChan chan as.HandleErrorRequest HandleDownlinkACKChan chan as.HandleDownlinkACKRequest HandleGatewayStatsChan chan as.HandleGatewayStatsRequest SetDeviceStatusChan chan as.SetDeviceStatusRequest SetDeviceLocationChan chan as.SetDeviceLocationRequest HandleDataUpResponse empty.Empty HandleProprietaryUpResponse empty.Empty HandleErrorResponse empty.Empty HandleDownlinkACKResponse empty.Empty HandleGatewayStatsResponse empty.Empty SetDeviceStatusResponse empty.Empty SetDeviceLocationResponse empty.Empty }
ApplicationClient is an application client for testing.
func NewApplicationClient ¶
func NewApplicationClient() *ApplicationClient
NewApplicationClient returns a new ApplicationClient.
func (*ApplicationClient) HandleDownlinkACK ¶
func (t *ApplicationClient) HandleDownlinkACK(ctx context.Context, in *as.HandleDownlinkACKRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleDownlinkACK method.
func (*ApplicationClient) HandleError ¶
func (t *ApplicationClient) HandleError(ctx context.Context, in *as.HandleErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleError method.
func (*ApplicationClient) HandleGatewayStats ¶
func (t *ApplicationClient) HandleGatewayStats(ctx context.Context, in *as.HandleGatewayStatsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleGatewayStats method.
func (*ApplicationClient) HandleProprietaryUplink ¶
func (t *ApplicationClient) HandleProprietaryUplink(ctx context.Context, in *as.HandleProprietaryUplinkRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleProprietaryUplink method.
func (*ApplicationClient) HandleUplinkData ¶
func (t *ApplicationClient) HandleUplinkData(ctx context.Context, in *as.HandleUplinkDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkData method.
func (*ApplicationClient) SetDeviceLocation ¶
func (t *ApplicationClient) SetDeviceLocation(ctx context.Context, in *as.SetDeviceLocationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SetDeviceLocation method.
func (*ApplicationClient) SetDeviceStatus ¶
func (t *ApplicationClient) SetDeviceStatus(ctx context.Context, in *as.SetDeviceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SetDeviceStatus method.
type ApplicationServerPool ¶
type ApplicationServerPool struct { Client as.ApplicationServerServiceClient GetHostname string }
ApplicationServerPool is an application-server pool for testing.
func (*ApplicationServerPool) Get ¶
func (p *ApplicationServerPool) Get(hostname string, caCert, tlsCert, tlsKey []byte) (as.ApplicationServerServiceClient, error)
Get returns the Client.
type Config ¶
type Config struct { RedisURL string PostgresDSN string MQTTServer string MQTTUsername string MQTTPassword string }
Config contains the test configuration.
type GatewayBackend ¶
type GatewayBackend struct { TXPacketChan chan gw.DownlinkFrame GatewayConfigPacketChan chan gw.GatewayConfiguration // contains filtered or unexported fields }
GatewayBackend is a test gateway backend.
func NewGatewayBackend ¶
func NewGatewayBackend() *GatewayBackend
NewGatewayBackend returns a new GatewayBackend.
func (*GatewayBackend) DownlinkTXAckChan ¶
func (b *GatewayBackend) DownlinkTXAckChan() chan gw.DownlinkTXAck
DownlinkTXAckChan method.
func (*GatewayBackend) RXPacketChan ¶
func (b *GatewayBackend) RXPacketChan() chan gw.UplinkFrame
RXPacketChan method.
func (*GatewayBackend) SendGatewayConfigPacket ¶
func (b *GatewayBackend) SendGatewayConfigPacket(config gw.GatewayConfiguration) error
SendGatewayConfigPacket method.
func (*GatewayBackend) SendTXPacket ¶
func (b *GatewayBackend) SendTXPacket(txPacket gw.DownlinkFrame) error
SendTXPacket method.
func (*GatewayBackend) StatsPacketChan ¶
func (b *GatewayBackend) StatsPacketChan() chan gw.GatewayStats
StatsPacketChan method.
type GeolocationClient ¶
type GeolocationClient struct { ResolveTDOAChan chan geo.ResolveTDOARequest ResolveMultiFrameTDOAChan chan geo.ResolveMultiFrameTDOARequest ResolveTDOAResponse geo.ResolveTDOAResponse ResolveMultiFrameTDOAResponse geo.ResolveMultiFrameTDOAResponse }
GeolocationClient is a geolocation client for testing.
func NewGeolocationClient ¶
func NewGeolocationClient() *GeolocationClient
NewGeolocationClient creates a new GeolocationClient.
func (*GeolocationClient) ResolveMultiFrameTDOA ¶
func (g *GeolocationClient) ResolveMultiFrameTDOA(ctx context.Context, in *geo.ResolveMultiFrameTDOARequest, opts ...grpc.CallOption) (*geo.ResolveMultiFrameTDOAResponse, error)
ResolveMultiFrameTDOA method.
func (*GeolocationClient) ResolveTDOA ¶
func (g *GeolocationClient) ResolveTDOA(ctx context.Context, in *geo.ResolveTDOARequest, opts ...grpc.CallOption) (*geo.ResolveTDOAResponse, error)
ResolveTDOA method.
type NetworkControllerClient ¶
type NetworkControllerClient struct { HandleRXInfoChan chan nc.HandleUplinkMetaDataRequest HandleDataUpMACCommandChan chan nc.HandleUplinkMACCommandRequest HandleRXInfoResponse empty.Empty HandleDataUpMACCommandResponse empty.Empty }
NetworkControllerClient is a network-controller client for testing.
func NewNetworkControllerClient ¶
func NewNetworkControllerClient() *NetworkControllerClient
NewNetworkControllerClient returns a new NetworkControllerClient.
func (*NetworkControllerClient) HandleUplinkMACCommand ¶
func (t *NetworkControllerClient) HandleUplinkMACCommand(ctx context.Context, in *nc.HandleUplinkMACCommandRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkMACCommand method.
func (*NetworkControllerClient) HandleUplinkMetaData ¶
func (t *NetworkControllerClient) HandleUplinkMetaData(ctx context.Context, in *nc.HandleUplinkMetaDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkMetaData method.