Versions in this module Expand all Collapse all v0 v0.4.1 Dec 9, 2019 Changes in this version + const ModulationFSK + const ModulationLoRa + var DemoUser = "" + var ErrAlreadyExists = errors.New("object already exists") + var ErrApplicationInvalidName = errors.New("invalid application name") + var ErrBoardInvalidServer = errors.New("invalid hostname of the server") + var ErrCFListTooManyChannels = errors.New("too many channels in channel-list") + var ErrDeviceProfileInvalidName = errors.New("invalid device-profile name") + var ErrDoesNotExist = errors.New("object does not exist") + var ErrGatewayInvalidName = errors.New("invalid gateway name") + var ErrInvalidEmail = errors.New("invalid e-mail") + var ErrInvalidGatewayDiscoveryInterval = errors.New("invalid gateway-discovery interval, it must be greater than 0") + var ErrInvalidUsernameOrPassword = errors.New("invalid username or password") + var ErrNodeInvalidName = errors.New("invalid node name") + var ErrNodeMaxRXDelay = errors.New("max value of RXDelay is 15") + var ErrOrganizationInvalidName = errors.New("invalid organization name") + var ErrUsedByOtherObjects = errors.New("this object is used by other objects, remove them first") + var ErrUserInvalidUsername = errors.New(...) + var ErrUserPasswordLength = errors.New("passwords must be at least 6 characters long") + var HashIterations = 100000 + func AddDeviceToMulticastGroup(ctx context.Context, db sqlx.Ext, multicastGroupID uuid.UUID, ...) error + func CreateApplication(ctx context.Context, db sqlx.Queryer, item *Application) error + func CreateBoard(db sqlx.Execer, bd *Board) error + func CreateDevice(ctx context.Context, db sqlx.Ext, d *Device) error + func CreateDeviceActivation(ctx context.Context, db sqlx.Queryer, da *DeviceActivation) error + func CreateDeviceKeys(ctx context.Context, db sqlx.Execer, dc *DeviceKeys) error + func CreateDeviceProfile(ctx context.Context, db sqlx.Ext, dp *DeviceProfile) error + func CreateFUOTADeploymentForDevice(ctx context.Context, db sqlx.Ext, fd *FUOTADeployment, devEUI lorawan.EUI64) error + func CreateGateway(ctx context.Context, db sqlx.Execer, gw *Gateway) error + func CreateGatewayPing(ctx context.Context, db sqlx.Queryer, ping *GatewayPing) error + func CreateGatewayPingRX(ctx context.Context, db sqlx.Queryer, rx *GatewayPingRX) error + func CreateGatewayProfile(ctx context.Context, db sqlx.Ext, gp *GatewayProfile) error + func CreateIntegration(ctx context.Context, db sqlx.Queryer, i *Integration) error + func CreateMulticastGroup(ctx context.Context, db sqlx.Ext, mg *MulticastGroup) error + func CreateNetworkServer(ctx context.Context, db sqlx.Queryer, n *NetworkServer) error + func CreateOrganization(ctx context.Context, db sqlx.Queryer, org *Organization) error + func CreateOrganizationUser(ctx context.Context, db sqlx.Execer, organizationID, userID int64, ...) error + func CreateRemoteFragmentationSession(ctx context.Context, db sqlx.Ext, sess *RemoteFragmentationSession) error + func CreateRemoteMulticastClassCSession(ctx context.Context, db sqlx.Ext, sess *RemoteMulticastClassCSession) error + func CreateRemoteMulticastSetup(ctx context.Context, db sqlx.Ext, dms *RemoteMulticastSetup) error + func CreateServiceProfile(ctx context.Context, db sqlx.Ext, sp *ServiceProfile) error + func CreateUser(ctx context.Context, db sqlx.Queryer, user *User, password string) (int64, error) + func DeleteAllApplicationsForOrganizationID(ctx context.Context, db sqlx.Ext, organizationID int64) error + func DeleteAllDeviceProfilesForOrganizationID(ctx context.Context, db sqlx.Ext, organizationID int64) error + func DeleteAllDevicesForApplicationID(ctx context.Context, db sqlx.Ext, applicationID int64) error + func DeleteAllGatewaysForOrganizationID(ctx context.Context, db sqlx.Ext, organizationID int64) error + func DeleteAllServiceProfilesForOrganizationID(ctx context.Context, db sqlx.Ext, organizationID int64) error + func DeleteApplication(ctx context.Context, db sqlx.Ext, id int64) error + func DeleteDevice(ctx context.Context, db sqlx.Ext, devEUI lorawan.EUI64) error + func DeleteDeviceKeys(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64) error + func DeleteDeviceProfile(ctx context.Context, db sqlx.Ext, id uuid.UUID) error + func DeleteGateway(ctx context.Context, db sqlx.Ext, mac lorawan.EUI64) error + func DeleteGatewayProfile(ctx context.Context, db sqlx.Ext, id uuid.UUID) error + func DeleteIntegration(ctx context.Context, db sqlx.Execer, id int64) error + func DeleteMulticastGroup(ctx context.Context, db sqlx.Ext, id uuid.UUID) error + func DeleteNetworkServer(ctx context.Context, db sqlx.Ext, id int64) error + func DeleteOrganization(ctx context.Context, db sqlx.Ext, id int64) error + func DeleteOrganizationUser(ctx context.Context, db sqlx.Execer, organizationID, userID int64) error + func DeleteRemoteFragmentationSession(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64, fragIndex int) error + func DeleteRemoteMulticastClassCSession(ctx context.Context, db sqlx.Ext, devEUI lorawan.EUI64, ...) error + func DeleteRemoteMulticastSetup(ctx context.Context, db sqlx.Ext, devEUI lorawan.EUI64, ...) error + func DeleteServiceProfile(ctx context.Context, db sqlx.Ext, id uuid.UUID) error + func DeleteUser(ctx context.Context, db sqlx.Execer, id int64) error + func FinishRegistration(db sqlx.Execer, userID int64, newPwd string) error + func GetAllDeviceEuis(ctx context.Context, db sqlx.Queryer) ([]string, error) + func GetApplicationCount(ctx context.Context, db sqlx.Queryer, search string) (int, error) + func GetApplicationCountForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, search string) (int, error) + func GetApplicationCountForUser(ctx context.Context, db sqlx.Queryer, username string, organizationID int64, ...) (int, error) + func GetDeviceCount(ctx context.Context, db sqlx.Queryer, filters DeviceFilters) (int, error) + func GetDeviceCountForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroup uuid.UUID) (int, error) + func GetDeviceProfileCount(ctx context.Context, db sqlx.Queryer) (int, error) + func GetDeviceProfileCountForApplicationID(ctx context.Context, db sqlx.Queryer, applicationID int64) (int, error) + func GetDeviceProfileCountForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64) (int, error) + func GetDeviceProfileCountForUser(ctx context.Context, db sqlx.Queryer, username string) (int, error) + func GetFUOTADeploymentCount(ctx context.Context, db sqlx.Queryer, filters FUOTADeploymentFilters) (int, error) + func GetFUOTADeploymentDeviceCount(ctx context.Context, db sqlx.Queryer, fuotaDeploymentID uuid.UUID) (int, error) + func GetGatewayCount(ctx context.Context, db sqlx.Queryer, search string) (int, error) + func GetGatewayCountForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, search string) (int, error) + func GetGatewayCountForUser(ctx context.Context, db sqlx.Queryer, username string, search string) (int, error) + func GetGatewayProfileCount(ctx context.Context, db sqlx.Queryer) (int, error) + func GetGatewayProfileCountForNetworkServerID(ctx context.Context, db sqlx.Queryer, networkServerID int64) (int, error) + func GetGatewaysForMACs(ctx context.Context, db sqlx.Queryer, macs []lorawan.EUI64) (map[lorawan.EUI64]Gateway, error) + func GetLastGatewayPingAndRX(ctx context.Context, db sqlx.Queryer, mac lorawan.EUI64) (GatewayPing, []GatewayPingRX, error) + func GetMulticastGroupCount(ctx context.Context, db sqlx.Queryer, filters MulticastGroupFilters) (int, error) + func GetNetworkServerCount(ctx context.Context, db sqlx.Queryer) (int, error) + func GetNetworkServerCountForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64) (int, error) + func GetOrganizationCount(ctx context.Context, db sqlx.Queryer, search string) (int, error) + func GetOrganizationCountForUser(ctx context.Context, db sqlx.Queryer, username string, search string) (int, error) + func GetOrganizationUserCount(ctx context.Context, db sqlx.Queryer, organizationID int64) (int, error) + func GetServiceProfileCount(ctx context.Context, db sqlx.Queryer) (int, error) + func GetServiceProfileCountForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64) (int, error) + func GetServiceProfileCountForUser(ctx context.Context, db sqlx.Queryer, username string) (int, error) + func GetServiceProfileIDForFUOTADeployment(ctx context.Context, db sqlx.Ext, fuotaDeploymentID uuid.UUID) (uuid.UUID, error) + func GetUserCount(ctx context.Context, db sqlx.Queryer, search string) (int32, error) + func LoginUser(ctx context.Context, db sqlx.Queryer, username string, password string) (string, error) + func MakeJWT(username string, sessionTTL int32) (string, error) + func RedisPool() *redis.Pool + func RegisterBoardAtomic(db sqlx.Execer, bd *Board) error + func RegisterUser(db sqlx.Queryer, user *User, token string) error + func RemoveDeviceFromMulticastGroup(ctx context.Context, db sqlx.Ext, multicastGroupID uuid.UUID, ...) error + func SaveMetrics(ctx context.Context, p *redis.Pool, name string, metrics MetricsRecord) error + func SaveMetricsForInterval(ctx context.Context, p *redis.Pool, agg AggregationInterval, name string, ...) error + func SetAggregationIntervals(intervals []AggregationInterval) error + func SetMetricsTTL(minute, hour, day, month time.Duration) + func SetTimeLocation(name string) error + func Setup(c config.Config) error + func Transaction(f func(tx sqlx.Ext) error) error + func UnregisterBoardAtomic(db sqlx.Execer, bd *Board) error + func UpdateApplication(ctx context.Context, db sqlx.Execer, item Application) error + func UpdateBoard(db sqlx.Execer, bd *Board) error + func UpdateDevice(ctx context.Context, db sqlx.Ext, d *Device, localOnly bool) error + func UpdateDeviceKeys(ctx context.Context, db sqlx.Execer, dc *DeviceKeys) error + func UpdateDeviceProfile(ctx context.Context, db sqlx.Ext, dp *DeviceProfile) error + func UpdateFUOTADeployment(ctx context.Context, db sqlx.Ext, fd *FUOTADeployment) error + func UpdateFUOTADeploymentDevice(ctx context.Context, db sqlx.Ext, fdd *FUOTADeploymentDevice) error + func UpdateGateway(ctx context.Context, db sqlx.Execer, gw *Gateway) error + func UpdateGatewayProfile(ctx context.Context, db sqlx.Ext, gp *GatewayProfile) error + func UpdateIntegration(ctx context.Context, db sqlx.Execer, i *Integration) error + func UpdateMulticastGroup(ctx context.Context, db sqlx.Ext, mg *MulticastGroup) error + func UpdateNetworkServer(ctx context.Context, db sqlx.Execer, n *NetworkServer) error + func UpdateOrganization(ctx context.Context, db sqlx.Execer, org *Organization) error + func UpdateOrganizationUser(ctx context.Context, db sqlx.Execer, organizationID, userID int64, ...) error + func UpdatePassword(ctx context.Context, db sqlx.Execer, id int64, newpassword string) error + func UpdateRemoteFragmentationSession(ctx context.Context, db sqlx.Ext, sess *RemoteFragmentationSession) error + func UpdateRemoteMulticastClassCSession(ctx context.Context, db sqlx.Ext, sess *RemoteMulticastClassCSession) error + func UpdateRemoteMulticastSetup(ctx context.Context, db sqlx.Ext, dmg *RemoteMulticastSetup) error + func UpdateServiceProfile(ctx context.Context, db sqlx.Ext, sp *ServiceProfile) error + func UpdateUser(ctx context.Context, db sqlx.Execer, item UserUpdate) error + func ValidateEmail(email string) error + func ValidatePassword(password string) error + func ValidateUsername(username string) error + type Action int + const Delete + const Insert + const Scan + const Select + const Update + type AggregationInterval string + const AggregationDay + const AggregationHour + const AggregationMinute + const AggregationMonth + type Application struct + Description string + ID int64 + Name string + OrganizationID int64 + PayloadCodec codec.Type + PayloadDecoderScript string + PayloadEncoderScript string + ServiceProfileID uuid.UUID + func GetApplication(ctx context.Context, db sqlx.Queryer, id int64) (Application, error) + func (a Application) Validate() error + type ApplicationListItem struct + ServiceProfileName string + func GetApplications(ctx context.Context, db sqlx.Queryer, limit, offset int, search string) ([]ApplicationListItem, error) + func GetApplicationsForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int, ...) ([]ApplicationListItem, error) + func GetApplicationsForUser(ctx context.Context, db sqlx.Queryer, username string, organizationID int64, ...) ([]ApplicationListItem, error) + type Board struct + CreatedAt time.Time + FPGAVersion *string + MAC lorawan.EUI64 + Model string + OsVersion *string + QaErr int + RootPassword *string + SN *string + Server *string + UpdatedAt time.Time + VpnAddr string + func GetBoard(db sqlx.Queryer, mac lorawan.EUI64) (Board, error) + func GetBoardMacBySerialNumber(db sqlx.Queryer, sn string) (Board, error) + func (bd Board) Validate() error + type DBLogger struct + func DB() *DBLogger + func (db *DBLogger) Beginx() (*TxLogger, error) + func (db *DBLogger) Exec(query string, args ...interface{}) (sql.Result, error) + func (db *DBLogger) Query(query string, args ...interface{}) (*sql.Rows, error) + func (db *DBLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (db *DBLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + type Device struct + Altitude *float64 + ApplicationID int64 + CreatedAt time.Time + DR *int + Description string + DevEUI lorawan.EUI64 + DeviceProfileID uuid.UUID + DeviceStatusBattery *float32 + DeviceStatusExternalPower bool + DeviceStatusMargin *int + LastSeenAt *time.Time + Latitude *float64 + Longitude *float64 + Name string + ReferenceAltitude float64 + SkipFCntCheck bool + Tags hstore.Hstore + UpdatedAt time.Time + Variables hstore.Hstore + func GetDevice(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, ...) (Device, error) + func (d Device) Validate() error + type DeviceActivation struct + AppSKey lorawan.AES128Key + CreatedAt time.Time + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + ID int64 + func GetLastDeviceActivationForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (DeviceActivation, error) + type DeviceFilters struct + ApplicationID int64 + Limit int + MulticastGroupID uuid.UUID + Offset int + Search string + ServiceProfileID uuid.UUID + func (f DeviceFilters) SQL() string + type DeviceKeys struct + AppKey lorawan.AES128Key + CreatedAt time.Time + DevEUI lorawan.EUI64 + GenAppKey lorawan.AES128Key + JoinNonce int + NwkKey lorawan.AES128Key + UpdatedAt time.Time + func GetDeviceKeys(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (DeviceKeys, error) + type DeviceListItem struct + DeviceProfileName string + func GetDevices(ctx context.Context, db sqlx.Queryer, filters DeviceFilters) ([]DeviceListItem, error) + func GetDevicesForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroupID uuid.UUID, ...) ([]DeviceListItem, error) + type DeviceProfile struct + CreatedAt time.Time + DeviceProfile ns.DeviceProfile + Name string + NetworkServerID int64 + OrganizationID int64 + PayloadCodec codec.Type + PayloadDecoderScript string + PayloadEncoderScript string + UpdatedAt time.Time + func GetDeviceProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID, forUpdate, localOnly bool) (DeviceProfile, error) + func (dp DeviceProfile) Validate() error + type DeviceProfileMeta struct + CreatedAt time.Time + DeviceProfileID uuid.UUID + Name string + NetworkServerID int64 + OrganizationID int64 + UpdatedAt time.Time + func GetDeviceProfiles(ctx context.Context, db sqlx.Queryer, limit, offset int) ([]DeviceProfileMeta, error) + func GetDeviceProfilesForApplicationID(ctx context.Context, db sqlx.Queryer, applicationID int64, limit, offset int) ([]DeviceProfileMeta, error) + func GetDeviceProfilesForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int) ([]DeviceProfileMeta, error) + func GetDeviceProfilesForUser(ctx context.Context, db sqlx.Queryer, username string, limit, offset int) ([]DeviceProfileMeta, error) + type ExtraChannel struct + Bandwidth int + Bitrate int + Frequency int + Modulation string + SpreadingFactors []int + type FUOTADeployment struct + BlockAckDelay int + CreatedAt time.Time + DR int + Descriptor [4]byte + FragSize int + FragmentationMatrix uint8 + Frequency int + GroupType FUOTADeploymentGroupType + ID uuid.UUID + MulticastGroupID *uuid.UUID + MulticastTimeout int + Name string + NextStepAfter time.Time + Payload []byte + PingSlotPeriod int + Redundancy int + State FUOTADeploymentState + UnicastTimeout time.Duration + UpdatedAt time.Time + func GetFUOTADeployment(ctx context.Context, db sqlx.Ext, id uuid.UUID, forUpdate bool) (FUOTADeployment, error) + func GetPendingFUOTADeployments(ctx context.Context, db sqlx.Ext, batchSize int) ([]FUOTADeployment, error) + type FUOTADeploymentDevice struct + CreatedAt time.Time + DevEUI lorawan.EUI64 + ErrorMessage string + FUOTADeploymentID uuid.UUID + State FUOTADeploymentDeviceState + UpdatedAt time.Time + func GetFUOTADeploymentDevice(ctx context.Context, db sqlx.Queryer, fuotaDeploymentID uuid.UUID, ...) (FUOTADeploymentDevice, error) + func GetPendingFUOTADeploymentDevice(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (FUOTADeploymentDevice, error) + type FUOTADeploymentDeviceListItem struct + CreatedAt time.Time + DevEUI lorawan.EUI64 + DeviceName string + ErrorMessage string + FUOTADeploymentID uuid.UUID + State FUOTADeploymentDeviceState + UpdatedAt time.Time + func GetFUOTADeploymentDevices(ctx context.Context, db sqlx.Queryer, fuotaDeploymentID uuid.UUID, ...) ([]FUOTADeploymentDeviceListItem, error) + type FUOTADeploymentDeviceState string + const FUOTADeploymentDeviceError + const FUOTADeploymentDevicePending + const FUOTADeploymentDeviceSuccess + type FUOTADeploymentFilters struct + ApplicationID int64 + DevEUI lorawan.EUI64 + Limit int + Offset int + func (f FUOTADeploymentFilters) SQL() string + type FUOTADeploymentGroupType string + const FUOTADeploymentGroupTypeB + const FUOTADeploymentGroupTypeC + type FUOTADeploymentListItem struct + CreatedAt time.Time + ID uuid.UUID + Name string + NextStepAfter time.Time + State FUOTADeploymentState + UpdatedAt time.Time + func GetFUOTADeployments(ctx context.Context, db sqlx.Queryer, filters FUOTADeploymentFilters) ([]FUOTADeploymentListItem, error) + type FUOTADeploymentState string + const FUOTADeploymentCleanup + const FUOTADeploymentDone + const FUOTADeploymentEnqueue + const FUOTADeploymentFragmentationSessSetup + const FUOTADeploymentMulticastCreate + const FUOTADeploymentMulticastSessCSetup + const FUOTADeploymentMulticastSetup + const FUOTADeploymentSetDeviceStatus + const FUOTADeploymentStatusRequest + type GPSPoint struct + Latitude float64 + Longitude float64 + func (l *GPSPoint) Scan(src interface{}) error + func (l GPSPoint) Value() (driver.Value, error) + type Gateway struct + Altitude float64 + CreatedAt time.Time + Description string + FirstSeenAt *time.Time + GatewayProfileID *string + LastPingID *int64 + LastPingSentAt *time.Time + LastSeenAt *time.Time + Latitude float64 + Longitude float64 + MAC lorawan.EUI64 + Name string + NetworkServerID int64 + OrganizationID int64 + Ping bool + UpdatedAt time.Time + func GetGateway(ctx context.Context, db sqlx.Queryer, mac lorawan.EUI64, forUpdate bool) (Gateway, error) + func GetGateways(ctx context.Context, db sqlx.Queryer, limit, offset int, search string) ([]Gateway, error) + func GetGatewaysForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int, ...) ([]Gateway, error) + func GetGatewaysForUser(ctx context.Context, db sqlx.Queryer, username string, limit, offset int, ...) ([]Gateway, error) + func (g Gateway) Validate() error + type GatewayLocation struct + Altitude float64 + Latitude float64 + Longitude float64 + func GetGatewaysLoc(ctx context.Context, db sqlx.Queryer, limit int) ([]GatewayLocation, error) + type GatewayPing struct + CreatedAt time.Time + DR int + Frequency int + GatewayMAC lorawan.EUI64 + ID int64 + func GetGatewayPing(ctx context.Context, db sqlx.Queryer, id int64) (GatewayPing, error) + type GatewayPingRX struct + Altitude float64 + CreatedAt time.Time + GatewayMAC lorawan.EUI64 + ID int64 + LoRaSNR float64 + Location GPSPoint + PingID int64 + RSSI int + ReceivedAt *time.Time + func GetGatewayPingRXForPingID(ctx context.Context, db sqlx.Queryer, pingID int64) ([]GatewayPingRX, error) + type GatewayProfile struct + CreatedAt time.Time + GatewayProfile ns.GatewayProfile + Name string + NetworkServerID int64 + UpdatedAt time.Time + func GetGatewayProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (GatewayProfile, error) + type GatewayProfileMeta struct + CreatedAt time.Time + GatewayProfileID uuid.UUID + Name string + NetworkServerID int64 + NetworkServerName string + UpdatedAt time.Time + func GetGatewayProfiles(ctx context.Context, db sqlx.Queryer, limit, offset int) ([]GatewayProfileMeta, error) + func GetGatewayProfilesForNetworkServerID(ctx context.Context, db sqlx.Queryer, networkServerID int64, limit, offset int) ([]GatewayProfileMeta, error) + type Integration struct + ApplicationID int64 + CreatedAt time.Time + ID int64 + Kind string + Settings json.RawMessage + UpdatedAt time.Time + func GetIntegration(ctx context.Context, db sqlx.Queryer, id int64) (Integration, error) + func GetIntegrationByApplicationID(ctx context.Context, db sqlx.Queryer, applicationID int64, kind string) (Integration, error) + func GetIntegrationsForApplicationID(ctx context.Context, db sqlx.Queryer, applicationID int64) ([]Integration, error) + type MetricsRecord struct + Metrics map[string]float64 + Time time.Time + func GetMetrics(ctx context.Context, p *redis.Pool, agg AggregationInterval, name string, ...) ([]MetricsRecord, error) + type MulticastGroup struct + CreatedAt time.Time + MCAppSKey lorawan.AES128Key + MCKey lorawan.AES128Key + MulticastGroup ns.MulticastGroup + Name string + ServiceProfileID uuid.UUID + UpdatedAt time.Time + func GetMulticastGroup(ctx context.Context, db sqlx.Queryer, id uuid.UUID, forUpdate, localOnly bool) (MulticastGroup, error) + type MulticastGroupFilters struct + DevEUI lorawan.EUI64 + Limit int + Offset int + OrganizationID int64 + Search string + ServiceProfileID uuid.UUID + func (f MulticastGroupFilters) SQL() string + type MulticastGroupListItem struct + CreatedAt time.Time + ID uuid.UUID + Name string + ServiceProfileID uuid.UUID + ServiceProfileName string + UpdatedAt time.Time + func GetMulticastGroups(ctx context.Context, db sqlx.Queryer, filters MulticastGroupFilters) ([]MulticastGroupListItem, error) + type NetworkServer struct + CACert string + CreatedAt time.Time + GatewayDiscoveryDR int + GatewayDiscoveryEnabled bool + GatewayDiscoveryInterval int + GatewayDiscoveryTXFrequency int + ID int64 + Name string + RoutingProfileCACert string + RoutingProfileTLSCert string + RoutingProfileTLSKey string + Server string + TLSCert string + TLSKey string + UpdatedAt time.Time + func GetNetworkServer(ctx context.Context, db sqlx.Queryer, id int64) (NetworkServer, error) + func GetNetworkServerForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (NetworkServer, error) + func GetNetworkServerForDeviceProfileID(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (NetworkServer, error) + func GetNetworkServerForGatewayMAC(ctx context.Context, db sqlx.Queryer, mac lorawan.EUI64) (NetworkServer, error) + func GetNetworkServerForGatewayProfileID(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (NetworkServer, error) + func GetNetworkServerForMulticastGroupID(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (NetworkServer, error) + func GetNetworkServerForServiceProfileID(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (NetworkServer, error) + func GetNetworkServers(ctx context.Context, db sqlx.Queryer, limit, offset int) ([]NetworkServer, error) + func GetNetworkServersForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int) ([]NetworkServer, error) + func (ns NetworkServer) Validate() error + type Organization struct + CanHaveGateways bool + CreatedAt time.Time + DisplayName string + ID int64 + Name string + UpdatedAt time.Time + func GetOrganization(ctx context.Context, db sqlx.Queryer, id int64) (Organization, error) + func GetOrganizations(ctx context.Context, db sqlx.Queryer, limit, offset int, search string) ([]Organization, error) + func GetOrganizationsForUser(ctx context.Context, db sqlx.Queryer, username string, limit, offset int, ...) ([]Organization, error) + func (o Organization) Validate() error + type OrganizationUser struct + CreatedAt time.Time + IsAdmin bool + IsDeviceAdmin bool + IsGatewayAdmin bool + UpdatedAt time.Time + UserID int64 + Username string + func GetOrganizationUser(ctx context.Context, db sqlx.Queryer, organizationID, userID int64) (OrganizationUser, error) + func GetOrganizationUsers(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int) ([]OrganizationUser, error) + type RemoteFragmentationSession struct + BlockAckDelay int + CreatedAt time.Time + Descriptor [4]byte + DevEUI lorawan.EUI64 + FragIndex int + FragSize int + FragmentationMatrix uint8 + MCGroupIDs []int + NbFrag int + Padding int + RetryAfter time.Time + RetryCount int + RetryInterval time.Duration + State RemoteMulticastSetupState + StateProvisioned bool + UpdatedAt time.Time + func GetPendingRemoteFragmentationSessions(ctx context.Context, db sqlx.Queryer, limit, maxRetryCount int) ([]RemoteFragmentationSession, error) + func GetRemoteFragmentationSession(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, fragIndex int, ...) (RemoteFragmentationSession, error) + type RemoteMulticastClassCSession struct + CreatedAt time.Time + DLFrequency int + DR int + DevEUI lorawan.EUI64 + McGroupID int + MulticastGroupID uuid.UUID + RetryAfter time.Time + RetryCount int + RetryInterval time.Duration + SessionTime time.Time + SessionTimeOut int + StateProvisioned bool + UpdatedAt time.Time + func GetPendingRemoteMulticastClassCSessions(ctx context.Context, db sqlx.Queryer, limit, maxRetryCount int) ([]RemoteMulticastClassCSession, error) + func GetRemoteMulticastClassCSession(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, ...) (RemoteMulticastClassCSession, error) + func GetRemoteMulticastClassCSessionByGroupID(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, mcGroupID int, ...) (RemoteMulticastClassCSession, error) + type RemoteMulticastSetup struct + CreatedAt time.Time + DevEUI lorawan.EUI64 + MaxMcFCnt uint32 + McAddr lorawan.DevAddr + McGroupID int + McKeyEncrypted lorawan.AES128Key + MinMcFCnt uint32 + MulticastGroupID uuid.UUID + RetryAfter time.Time + RetryCount int + RetryInterval time.Duration + State RemoteMulticastSetupState + StateProvisioned bool + UpdatedAt time.Time + func GetPendingRemoteMulticastSetupItems(ctx context.Context, db sqlx.Queryer, limit, maxRetryCount int) ([]RemoteMulticastSetup, error) + func GetRemoteMulticastSetup(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, ...) (RemoteMulticastSetup, error) + func GetRemoteMulticastSetupByGroupID(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64, mcGroupID int, ...) (RemoteMulticastSetup, error) + type RemoteMulticastSetupState string + const RemoteMulticastSetupDelete + const RemoteMulticastSetupSetup + type SearchResult struct + ApplicationID *int64 + ApplicationName *string + DeviceDevEUI *lorawan.EUI64 + DeviceName *string + GatewayMAC *lorawan.EUI64 + GatewayName *string + Kind string + OrganizationID *int64 + OrganizationName *string + Score float64 + func GlobalSearch(ctx context.Context, db sqlx.Queryer, username string, globalAdmin bool, ...) ([]SearchResult, error) + type ServiceProfile struct + CreatedAt time.Time + Name string + NetworkServerID int64 + OrganizationID int64 + ServiceProfile ns.ServiceProfile + UpdatedAt time.Time + func GetServiceProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID, localOnly bool) (ServiceProfile, error) + func (sp ServiceProfile) Validate() error + type ServiceProfileMeta struct + CreatedAt time.Time + Name string + NetworkServerID int64 + OrganizationID int64 + ServiceProfileID uuid.UUID + UpdatedAt time.Time + func GetServiceProfiles(ctx context.Context, db sqlx.Queryer, limit, offset int) ([]ServiceProfileMeta, error) + func GetServiceProfilesForOrganizationID(ctx context.Context, db sqlx.Queryer, organizationID int64, limit, offset int) ([]ServiceProfileMeta, error) + func GetServiceProfilesForUser(ctx context.Context, db sqlx.Queryer, username string, limit, offset int) ([]ServiceProfileMeta, error) + type TxLogger struct + func (q *TxLogger) Exec(query string, args ...interface{}) (sql.Result, error) + func (q *TxLogger) Query(query string, args ...interface{}) (*sql.Rows, error) + func (q *TxLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (q *TxLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + type User struct + CreatedAt time.Time + Email string + ID int64 + IsActive bool + IsAdmin bool + Note string + PasswordHash string + SecurityToken *string + SessionTTL int32 + UpdatedAt time.Time + Username string + func GetTokenByUsername(db sqlx.Queryer, username string) (User, error) + func GetUser(ctx context.Context, db sqlx.Queryer, id int64) (User, error) + func GetUserByToken(db sqlx.Queryer, token string) (User, error) + func GetUserByUsername(ctx context.Context, db sqlx.Queryer, username string) (User, error) + func GetUsers(ctx context.Context, db sqlx.Queryer, limit, offset int, search string) ([]User, error) + type UserProfile struct + Organizations []UserProfileOrganization + User UserProfileUser + func GetProfile(ctx context.Context, db sqlx.Queryer, id int64) (UserProfile, error) + type UserProfileOrganization struct + CreatedAt time.Time + ID int64 + IsAdmin bool + IsDeviceAdmin bool + IsGatewayAdmin bool + Name string + UpdatedAt time.Time + type UserProfileUser struct + CreatedAt time.Time + ID int64 + IsActive bool + IsAdmin bool + SessionTTL int32 + UpdatedAt time.Time + Username string + type UserUpdate struct + Email string + ID int64 + IsActive bool + IsAdmin bool + Note string + SessionTTL int32 + Username string