external

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(conf config.Config) error

Setup configures the API package.

Types

type ApplicationAPI

type ApplicationAPI struct {
	// contains filtered or unexported fields
}

ApplicationAPI exports the Application related functions.

func NewApplicationAPI

func NewApplicationAPI(validator auth.Validator) *ApplicationAPI

NewApplicationAPI creates a new ApplicationAPI.

func (*ApplicationAPI) Create

Create creates the given application.

func (*ApplicationAPI) CreateAWSSNSIntegration

func (a *ApplicationAPI) CreateAWSSNSIntegration(ctx context.Context, in *pb.CreateAWSSNSIntegrationRequest) (*empty.Empty, error)

CreateAWSSNSIntegration creates a AWS SNS application-integration.

func (*ApplicationAPI) CreateAzureServiceBusIntegration

func (a *ApplicationAPI) CreateAzureServiceBusIntegration(ctx context.Context, in *pb.CreateAzureServiceBusIntegrationRequest) (*empty.Empty, error)

CreateAzureServiceBusIntegration creates an Azure Service-Bus application-integration.

func (*ApplicationAPI) CreateGCPPubSubIntegration

func (a *ApplicationAPI) CreateGCPPubSubIntegration(ctx context.Context, in *pb.CreateGCPPubSubIntegrationRequest) (*empty.Empty, error)

CreateGCPPubSubIntegration creates a GCP PubSub application-integration.

func (*ApplicationAPI) CreateHTTPIntegration

func (a *ApplicationAPI) CreateHTTPIntegration(ctx context.Context, in *pb.CreateHTTPIntegrationRequest) (*empty.Empty, error)

CreateHTTPIntegration creates an HTTP application-integration.

func (*ApplicationAPI) CreateInfluxDBIntegration

func (a *ApplicationAPI) CreateInfluxDBIntegration(ctx context.Context, in *pb.CreateInfluxDBIntegrationRequest) (*empty.Empty, error)

CreateInfluxDBIntegration create an InfluxDB application-integration.

func (*ApplicationAPI) CreateLoRaCloudIntegration

func (a *ApplicationAPI) CreateLoRaCloudIntegration(ctx context.Context, in *pb.CreateLoRaCloudIntegrationRequest) (*empty.Empty, error)

CreateLoRaCloudIntegration creates a LoRaCloud application-integration.

func (*ApplicationAPI) CreateMyDevicesIntegration

func (a *ApplicationAPI) CreateMyDevicesIntegration(ctx context.Context, in *pb.CreateMyDevicesIntegrationRequest) (*empty.Empty, error)

CreateMyDevicesIntegration creates a MyDevices application-integration.

func (*ApplicationAPI) CreatePilotThingsIntegration

func (a *ApplicationAPI) CreatePilotThingsIntegration(ctx context.Context, in *pb.CreatePilotThingsIntegrationRequest) (*empty.Empty, error)

CreatePilotThingsIntegration creates an Pilot Things application-integration.

func (*ApplicationAPI) CreateThingsBoardIntegration

func (a *ApplicationAPI) CreateThingsBoardIntegration(ctx context.Context, in *pb.CreateThingsBoardIntegrationRequest) (*empty.Empty, error)

CreateThingsBoardIntegration creates a ThingsBoard application-integration.

func (*ApplicationAPI) Delete

Delete deletes the given application.

func (*ApplicationAPI) DeleteAWSSNSIntegration

func (a *ApplicationAPI) DeleteAWSSNSIntegration(ctx context.Context, in *pb.DeleteAWSSNSIntegrationRequest) (*empty.Empty, error)

DeleteAWSSNSIntegration deletes the AWS SNS application-integration.

func (*ApplicationAPI) DeleteAzureServiceBusIntegration

func (a *ApplicationAPI) DeleteAzureServiceBusIntegration(ctx context.Context, in *pb.DeleteAzureServiceBusIntegrationRequest) (*empty.Empty, error)

DeleteAzureServiceBusIntegration deletes the Azure Service-Bus application-integration.

func (*ApplicationAPI) DeleteGCPPubSubIntegration

func (a *ApplicationAPI) DeleteGCPPubSubIntegration(ctx context.Context, in *pb.DeleteGCPPubSubIntegrationRequest) (*empty.Empty, error)

DeleteGCPPubSubIntegration deletes the GCP PubSub application-integration.

func (*ApplicationAPI) DeleteHTTPIntegration

func (a *ApplicationAPI) DeleteHTTPIntegration(ctx context.Context, in *pb.DeleteHTTPIntegrationRequest) (*empty.Empty, error)

DeleteHTTPIntegration deletes the application-integration of the given type.

func (*ApplicationAPI) DeleteInfluxDBIntegration

func (a *ApplicationAPI) DeleteInfluxDBIntegration(ctx context.Context, in *pb.DeleteInfluxDBIntegrationRequest) (*empty.Empty, error)

DeleteInfluxDBIntegration deletes the InfluxDB application-integration.

func (*ApplicationAPI) DeleteLoRaCloudIntegration

func (a *ApplicationAPI) DeleteLoRaCloudIntegration(ctx context.Context, in *pb.DeleteLoRaCloudIntegrationRequest) (*empty.Empty, error)

DeleteLoRaCloudIntegration deletes the LoRaCloud application-integration.

func (*ApplicationAPI) DeleteMyDevicesIntegration

func (a *ApplicationAPI) DeleteMyDevicesIntegration(ctx context.Context, in *pb.DeleteMyDevicesIntegrationRequest) (*empty.Empty, error)

DeleteMyDevicesIntegration deletes the MyDevices application-integration.

func (*ApplicationAPI) DeletePilotThingsIntegration

func (a *ApplicationAPI) DeletePilotThingsIntegration(ctx context.Context, in *pb.DeletePilotThingsIntegrationRequest) (*empty.Empty, error)

DeletePilotThingsIntegration deletes an Pilot Things application-integration.

func (*ApplicationAPI) DeleteThingsBoardIntegration

func (a *ApplicationAPI) DeleteThingsBoardIntegration(ctx context.Context, in *pb.DeleteThingsBoardIntegrationRequest) (*empty.Empty, error)

DeleteThingsBoardIntegration deletes the ThingsBoard application-integration.

func (*ApplicationAPI) GenerateMQTTIntegrationClientCertificate

GenerateMQTTIntegrationClientCertificate generates an application ID specific TLS certificate to connect to the MQTT broker.

func (*ApplicationAPI) Get

Get returns the requested application.

func (*ApplicationAPI) GetAWSSNSIntegration

GetAWSSNSIntegration returns the AWS SNS application-integration.

func (*ApplicationAPI) GetAzureServiceBusIntegration

GetAzureServiceBusIntegration returns the Azure Service-Bus application-integration.

func (*ApplicationAPI) GetGCPPubSubIntegration

GetGCPPubSubIntegration returns the GCP PubSub application-integration.

func (*ApplicationAPI) GetHTTPIntegration

GetHTTPIntegration returns the HTTP application-itegration.

func (*ApplicationAPI) GetInfluxDBIntegration

GetInfluxDBIntegration returns the InfluxDB application-integration.

func (*ApplicationAPI) GetLoRaCloudIntegration

GetLoRaCloudIntegration returns the LoRaCloud application-integration.

func (*ApplicationAPI) GetMyDevicesIntegration

GetMyDevicesIntegration returns the MyDevices application-integration.

func (*ApplicationAPI) GetPilotThingsIntegration

GetPilotThingsIntegration returns the Pilot Things application-integration.

func (*ApplicationAPI) GetThingsBoardIntegration

GetThingsBoardIntegration returns the ThingsBoard application-integration.

func (*ApplicationAPI) List

List lists the available applications.

func (*ApplicationAPI) ListIntegrations

ListIntegrations lists all configured integrations.

func (*ApplicationAPI) Update

Update updates the given application.

func (*ApplicationAPI) UpdateAWSSNSIntegration

func (a *ApplicationAPI) UpdateAWSSNSIntegration(ctx context.Context, in *pb.UpdateAWSSNSIntegrationRequest) (*empty.Empty, error)

UpdateAWSSNSIntegration updates the AWS SNS application-integration.

func (*ApplicationAPI) UpdateAzureServiceBusIntegration

func (a *ApplicationAPI) UpdateAzureServiceBusIntegration(ctx context.Context, in *pb.UpdateAzureServiceBusIntegrationRequest) (*empty.Empty, error)

UpdateAzureServiceBusIntegration updates the Azure Service-Bus application-integration.

func (*ApplicationAPI) UpdateGCPPubSubIntegration

func (a *ApplicationAPI) UpdateGCPPubSubIntegration(ctx context.Context, in *pb.UpdateGCPPubSubIntegrationRequest) (*empty.Empty, error)

UpdateGCPPubSubIntegration updates the GCP PubSub application-integration.

func (*ApplicationAPI) UpdateHTTPIntegration

func (a *ApplicationAPI) UpdateHTTPIntegration(ctx context.Context, in *pb.UpdateHTTPIntegrationRequest) (*empty.Empty, error)

UpdateHTTPIntegration updates the HTTP application-integration.

func (*ApplicationAPI) UpdateInfluxDBIntegration

func (a *ApplicationAPI) UpdateInfluxDBIntegration(ctx context.Context, in *pb.UpdateInfluxDBIntegrationRequest) (*empty.Empty, error)

UpdateInfluxDBIntegration updates the InfluxDB application-integration.

func (*ApplicationAPI) UpdateLoRaCloudIntegration

func (a *ApplicationAPI) UpdateLoRaCloudIntegration(ctx context.Context, in *pb.UpdateLoRaCloudIntegrationRequest) (*empty.Empty, error)

UpdateLoRaCloudIntegration updates the LoRaCloud application-integration.

func (*ApplicationAPI) UpdateMyDevicesIntegration

func (a *ApplicationAPI) UpdateMyDevicesIntegration(ctx context.Context, in *pb.UpdateMyDevicesIntegrationRequest) (*empty.Empty, error)

UpdateMyDevicesIntegration updates the MyDevices application-integration.

func (*ApplicationAPI) UpdatePilotThingsIntegration

func (a *ApplicationAPI) UpdatePilotThingsIntegration(ctx context.Context, in *pb.UpdatePilotThingsIntegrationRequest) (*empty.Empty, error)

UpdatePilotThingsIntegration updates the Pilot Things application-integration.

func (*ApplicationAPI) UpdateThingsBoardIntegration

func (a *ApplicationAPI) UpdateThingsBoardIntegration(ctx context.Context, in *pb.UpdateThingsBoardIntegrationRequest) (*empty.Empty, error)

UpdateThingsBoardIntegration updates the ThingsBoard application-integration.

type DeviceAPI

type DeviceAPI struct {
	// contains filtered or unexported fields
}

DeviceAPI exports the Node related functions.

func NewDeviceAPI

func NewDeviceAPI(validator auth.Validator) *DeviceAPI

NewDeviceAPI creates a new NodeAPI.

func (*DeviceAPI) Activate

func (a *DeviceAPI) Activate(ctx context.Context, req *pb.ActivateDeviceRequest) (*empty.Empty, error)

Activate activates the node (ABP only).

func (*DeviceAPI) ClearDeviceNonces

func (a *DeviceAPI) ClearDeviceNonces(ctx context.Context, req *pb.ClearDeviceNoncesRequest) (*empty.Empty, error)

ClearDeviceNonces deletes the device older activation records for the given DevEUI. TODO: These are clear older DevNonce records from device activation records in Network Server TODO: These clears all DevNonce records but keeps latest 20 records for maintain device activation status

func (*DeviceAPI) Create

func (a *DeviceAPI) Create(ctx context.Context, req *pb.CreateDeviceRequest) (*empty.Empty, error)

Create creates the given device.

func (*DeviceAPI) CreateKeys

func (a *DeviceAPI) CreateKeys(ctx context.Context, req *pb.CreateDeviceKeysRequest) (*empty.Empty, error)

CreateKeys creates the given device-keys.

func (*DeviceAPI) Deactivate

func (a *DeviceAPI) Deactivate(ctx context.Context, req *pb.DeactivateDeviceRequest) (*empty.Empty, error)

Deactivate de-activates the device.

func (*DeviceAPI) Delete

func (a *DeviceAPI) Delete(ctx context.Context, req *pb.DeleteDeviceRequest) (*empty.Empty, error)

Delete deletes the node matching the given name.

func (*DeviceAPI) DeleteKeys

func (a *DeviceAPI) DeleteKeys(ctx context.Context, req *pb.DeleteDeviceKeysRequest) (*empty.Empty, error)

DeleteKeys deletes the device-keys for the given DevEUI.

func (*DeviceAPI) Get

Get returns the device matching the given DevEUI.

func (*DeviceAPI) GetActivation

GetActivation returns the device activation for the given DevEUI.

func (*DeviceAPI) GetKeys

GetKeys returns the device-keys for the given DevEUI.

func (*DeviceAPI) GetRandomDevAddr

GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.

func (*DeviceAPI) GetStats

GetStats returns the device statistics.

func (*DeviceAPI) List

List lists the available applications.

func (*DeviceAPI) StreamEventLogs

StreamEventLogs stream the device events (uplink payloads, ACKs, joins, errors). Note: this endpoint is intended for debugging and should not be used for building integrations.

func (*DeviceAPI) StreamFrameLogs

StreamFrameLogs streams the uplink and downlink frame-logs for the given DevEUI. Note: these are the raw LoRaWAN frames and this endpoint is intended for debugging.

func (*DeviceAPI) Update

func (a *DeviceAPI) Update(ctx context.Context, req *pb.UpdateDeviceRequest) (*empty.Empty, error)

Update updates the device matching the given DevEUI.

func (*DeviceAPI) UpdateKeys

func (a *DeviceAPI) UpdateKeys(ctx context.Context, req *pb.UpdateDeviceKeysRequest) (*empty.Empty, error)

UpdateKeys updates the device-keys.

type DeviceProfileServiceAPI

type DeviceProfileServiceAPI struct {
	// contains filtered or unexported fields
}

DeviceProfileServiceAPI exports the ServiceProfile related functions.

func NewDeviceProfileServiceAPI

func NewDeviceProfileServiceAPI(validator auth.Validator) *DeviceProfileServiceAPI

NewDeviceProfileServiceAPI creates a new DeviceProfileServiceAPI.

func (*DeviceProfileServiceAPI) Create

Create creates the given device-profile.

func (*DeviceProfileServiceAPI) Delete

Delete deletes the device-profile matching the given id.

func (*DeviceProfileServiceAPI) Get

Get returns the device-profile matching the given id.

func (*DeviceProfileServiceAPI) List

List lists the available device-profiles.

func (*DeviceProfileServiceAPI) Update

Update updates the given device-profile.

type DeviceQueueAPI

type DeviceQueueAPI struct {
	// contains filtered or unexported fields
}

DeviceQueueAPI exposes the downlink queue methods.

func NewDeviceQueueAPI

func NewDeviceQueueAPI(validator auth.Validator) *DeviceQueueAPI

NewDeviceQueueAPI creates a new DeviceQueueAPI.

func (*DeviceQueueAPI) Enqueue

Enqueue adds the given item to the device-queue.

func (*DeviceQueueAPI) Flush

Flush flushes the downlink device-queue.

func (*DeviceQueueAPI) List

List lists the items in the device-queue.

type GatewayAPI

type GatewayAPI struct {
	// contains filtered or unexported fields
}

GatewayAPI exports the Gateway related functions.

func NewGatewayAPI

func NewGatewayAPI(validator auth.Validator) *GatewayAPI

NewGatewayAPI creates a new GatewayAPI.

func (*GatewayAPI) Create

func (a *GatewayAPI) Create(ctx context.Context, req *pb.CreateGatewayRequest) (*empty.Empty, error)

Create creates the given gateway.

func (*GatewayAPI) Delete

func (a *GatewayAPI) Delete(ctx context.Context, req *pb.DeleteGatewayRequest) (*empty.Empty, error)

Delete deletes the gateway matching the given ID.

func (*GatewayAPI) GenerateGatewayClientCertificate

GenerateGatewayClientCertificate returns a TLS certificate for gateway authentication / authorization.

func (*GatewayAPI) Get

Get returns the gateway matching the given Mac.

func (*GatewayAPI) GetLastPing

GetLastPing returns the last emitted ping and gateways receiving this ping.

func (*GatewayAPI) GetStats

GetStats gets the gateway statistics for the gateway with the given Mac.

func (*GatewayAPI) List

List lists the gateways.

func (*GatewayAPI) StreamFrameLogs

StreamFrameLogs streams the uplink and downlink frame-logs for the given mac. Note: these are the raw LoRaWAN frames and this endpoint is intended for debugging.

func (*GatewayAPI) Update

func (a *GatewayAPI) Update(ctx context.Context, req *pb.UpdateGatewayRequest) (*empty.Empty, error)

Update updates the given gateway.

type GatewayProfileAPI

type GatewayProfileAPI struct {
	// contains filtered or unexported fields
}

GatewayProfileAPI exports the GatewayProfile related functions.

func NewGatewayProfileAPI

func NewGatewayProfileAPI(validator auth.Validator) *GatewayProfileAPI

NewGatewayProfileAPI creates a new GatewayProfileAPI.

func (*GatewayProfileAPI) Create

Create creates the given gateway-profile.

func (*GatewayProfileAPI) Delete

Delete deletes the gateway-profile matching the given id.

func (*GatewayProfileAPI) Get

Get returns the gateway-profile matching the given id.

func (*GatewayProfileAPI) List

List returns the existing gateway-profiles.

func (*GatewayProfileAPI) Update

Update updates the given gateway-profile.

type InternalAPI

type InternalAPI struct {
	// contains filtered or unexported fields
}

InternalAPI exports the internal User related functions.

func NewInternalAPI

func NewInternalAPI(validator auth.Validator) *InternalAPI

NewInternalAPI creates a new InternalAPI.

func (*InternalAPI) CreateAPIKey

CreateAPIKey creates the given API key.

func (*InternalAPI) DeleteAPIKey

func (a *InternalAPI) DeleteAPIKey(ctx context.Context, req *pb.DeleteAPIKeyRequest) (*empty.Empty, error)

DeleteAPIKey deletes the given API key.

func (*InternalAPI) GetDevicesSummary

GetDevicesSummary returns an aggregated devices summary.

func (*InternalAPI) GetGatewaysSummary

GetGatewaysSummary returns an aggregated gateways summary.

func (*InternalAPI) GlobalSearch

GlobalSearch performs a global search.

func (*InternalAPI) ListAPIKeys

ListAPIKeys lists the API keys.

func (*InternalAPI) Login

func (a *InternalAPI) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginResponse, error)

Login validates the login request and returns a JWT token.

func (*InternalAPI) OpenIDConnectLogin

OpenIDConnectLogin performs an OpenID Connect login.

func (*InternalAPI) Profile

func (a *InternalAPI) Profile(ctx context.Context, req *empty.Empty) (*pb.ProfileResponse, error)

Profile returns the user profile.

func (*InternalAPI) Settings

func (a *InternalAPI) Settings(ctx context.Context, _ *empty.Empty) (*pb.SettingsResponse, error)

Settings returns the global settings.

type MulticastGroupAPI

type MulticastGroupAPI struct {
	// contains filtered or unexported fields
}

MulticastGroupAPI implements the multicast-group api.

func NewMulticastGroupAPI

func NewMulticastGroupAPI(validator auth.Validator, routingProfileID uuid.UUID) *MulticastGroupAPI

NewMulticastGroupAPI creates a new multicast-group API.

func (*MulticastGroupAPI) AddDevice

AddDevice adds the given device to the multicast-group.

func (*MulticastGroupAPI) Create

Create creates the given multicast-group.

func (*MulticastGroupAPI) Delete

Delete deletes a multicast-group given an ID.

func (*MulticastGroupAPI) Enqueue

Enqueue adds the given item to the multicast-queue.

func (*MulticastGroupAPI) FlushQueue

FlushQueue flushes the multicast-group queue.

func (*MulticastGroupAPI) Get

Get returns a multicast-group given an ID.

func (*MulticastGroupAPI) List

List lists the available multicast-groups.

func (*MulticastGroupAPI) ListQueue

ListQueue lists the items in the multicast-group queue.

func (*MulticastGroupAPI) RemoveDevice

RemoveDevice removes the given device from the multicast-group.

func (*MulticastGroupAPI) Update

Update updates the given multicast-group.

type NetworkServerAPI

type NetworkServerAPI struct {
	// contains filtered or unexported fields
}

NetworkServerAPI exports the NetworkServer related functions.

func NewNetworkServerAPI

func NewNetworkServerAPI(validator auth.Validator) *NetworkServerAPI

NewNetworkServerAPI creates a new NetworkServerAPI.

func (*NetworkServerAPI) Create

Create creates the given network-server.

func (*NetworkServerAPI) Delete

Delete deletes the network-server matching the given id.

func (*NetworkServerAPI) Get

Get returns the network-server matching the given id.

func (*NetworkServerAPI) GetADRAlgorithms

GetADRAlgorithms returns the available ADR algorithms.

func (*NetworkServerAPI) List

List lists the available network-servers.

func (*NetworkServerAPI) Update

Update updates the given network-server.

type OrganizationAPI

type OrganizationAPI struct {
	// contains filtered or unexported fields
}

OrganizationAPI exports the organization related functions.

func NewOrganizationAPI

func NewOrganizationAPI(validator auth.Validator) *OrganizationAPI

NewOrganizationAPI creates a new OrganizationAPI.

func (*OrganizationAPI) AddUser

AddUser creates the given organization-user link. The user is matched by email, not user id.

func (*OrganizationAPI) Create

Create creates the given organization.

func (*OrganizationAPI) Delete

Delete deletes the organization matching the given ID.

func (*OrganizationAPI) DeleteUser

DeleteUser deletes the given user from the organization.

func (*OrganizationAPI) Get

Get returns the organization matching the given ID.

func (*OrganizationAPI) GetUser

GetUser returns the user details for the given user ID.

func (*OrganizationAPI) List

List lists the organizations to which the user has access.

func (*OrganizationAPI) ListUsers

ListUsers lists the users assigned to the given organization.

func (*OrganizationAPI) Update

Update updates the given organization.

func (*OrganizationAPI) UpdateUser

UpdateUser updates the given user.

type ServiceProfileServiceAPI

type ServiceProfileServiceAPI struct {
	// contains filtered or unexported fields
}

ServiceProfileServiceAPI export the ServiceProfile related functions.

func NewServiceProfileServiceAPI

func NewServiceProfileServiceAPI(validator auth.Validator) *ServiceProfileServiceAPI

NewServiceProfileServiceAPI creates a new ServiceProfileServiceAPI.

func (*ServiceProfileServiceAPI) Create

Create creates the given service-profile.

func (*ServiceProfileServiceAPI) Delete

Delete deletes the service-profile matching the given id.

func (*ServiceProfileServiceAPI) Get

Get returns the service-profile matching the given id.

func (*ServiceProfileServiceAPI) List

List lists the available service-profiles.

func (*ServiceProfileServiceAPI) Update

Update updates the given serviceprofile.

type UserAPI

type UserAPI struct {
	// contains filtered or unexported fields
}

UserAPI exports the User related functions.

func NewUserAPI

func NewUserAPI(validator auth.Validator) *UserAPI

NewUserAPI creates a new UserAPI.

func (*UserAPI) Create

Create creates the given user.

func (*UserAPI) Delete

func (a *UserAPI) Delete(ctx context.Context, req *pb.DeleteUserRequest) (*empty.Empty, error)

Delete deletes the user matching the given ID.

func (*UserAPI) Get

Get returns the user matching the given ID.

func (*UserAPI) List

List lists the users.

func (*UserAPI) Update

func (a *UserAPI) Update(ctx context.Context, req *pb.UpdateUserRequest) (*empty.Empty, error)

Update updates the given user.

func (*UserAPI) UpdatePassword

func (a *UserAPI) UpdatePassword(ctx context.Context, req *pb.UpdateUserPasswordRequest) (*empty.Empty, error)

UpdatePassword updates the password for the user matching the given ID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL