sqldb

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCIRARepo          = consoleerrors.CreateConsoleError("CIRARepo")
	ErrCIRARepoDatabase  = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("CIRARepo")}
	ErrCIRARepoNotUnique = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("CIRARepo")}
)
View Source
var (
	ErrDeviceDatabase  = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("DeviceRepo")}
	ErrDeviceNotUnique = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("DeviceRepo")}
)
View Source
var (
	ErrDomainDatabase  = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("DomainRepo")}
	ErrDomainNotUnique = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("DomainRepo")}
)
View Source
var (
	ErrIEEE8021xDatabase  = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("IEEE8021xRepo")}
	ErrIEEE8021xNotUnique = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("IEEE8021xRepo")}
)
View Source
var (
	ErrProfileDatabase  = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("ProfileRepo")}
	ErrProfileNotUnique = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("ProfileRepo")}
)
View Source
var (
	ErrProfileWiFiConfigsDatabase            = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("ProfileWiFiConfigsRepo")}
	ErrProfileWiFiConfigsNotUnique           = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("ProfileWiFiConfigsRepo")}
	ErrProfileWiFiConfigsForeignKeyViolation = ForeignKeyViolationError{Console: consoleerrors.CreateConsoleError("ProfileWiFiConfigsRepo")}
)
View Source
var (
	ErrWiFiDatabase                = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("WirelessRepo")}
	ErrWiFiNotUnique               = repoerrors.NotUniqueError{Console: consoleerrors.CreateConsoleError("WirelessRepo")}
	ErrWiFiIEEEForeignKeyViolation = ForeignKeyViolationError{Console: consoleerrors.CreateConsoleError("WirelessRepo")}
)

Functions

This section is empty.

Types

type CIRARepo

type CIRARepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

CIRARepo -.

func NewCIRARepo

func NewCIRARepo(database *db.SQL, log logger.Interface) *CIRARepo

New -.

func (*CIRARepo) Delete

func (r *CIRARepo) Delete(_ context.Context, configName, tenantID string) (bool, error)

Delete -.

func (*CIRARepo) Get

func (r *CIRARepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.CIRAConfig, error)

Get -.

func (*CIRARepo) GetByName

func (r *CIRARepo) GetByName(_ context.Context, configName, tenantID string) (*entity.CIRAConfig, error)

GetByName -.

func (*CIRARepo) GetCount

func (r *CIRARepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*CIRARepo) Insert

func (r *CIRARepo) Insert(_ context.Context, p *entity.CIRAConfig) (string, error)

Insert -.

func (*CIRARepo) Update

func (r *CIRARepo) Update(_ context.Context, p *entity.CIRAConfig) (bool, error)

Update -.

type DeviceRepo

type DeviceRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

DeviceRepo -.

func NewDeviceRepo

func NewDeviceRepo(database *db.SQL, log logger.Interface) *DeviceRepo

New -.

func (*DeviceRepo) Delete

func (r *DeviceRepo) Delete(_ context.Context, guid, tenantID string) (bool, error)

Delete -.

func (*DeviceRepo) Get

func (r *DeviceRepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.Device, error)

Get -.

func (*DeviceRepo) GetByColumn

func (r *DeviceRepo) GetByColumn(_ context.Context, columnName, queryValue, tenantID string) ([]entity.Device, error)

func (*DeviceRepo) GetByID

func (r *DeviceRepo) GetByID(_ context.Context, guid, tenantID string) (*entity.Device, error)

GetByID -.

func (*DeviceRepo) GetByTags

func (r *DeviceRepo) GetByTags(_ context.Context, tags []string, method string, limit, offset int, tenantID string) ([]entity.Device, error)

func (*DeviceRepo) GetCount

func (r *DeviceRepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*DeviceRepo) GetDistinctTags

func (r *DeviceRepo) GetDistinctTags(_ context.Context, tenantID string) ([]string, error)

func (*DeviceRepo) Insert

func (r *DeviceRepo) Insert(_ context.Context, d *entity.Device) (string, error)

Insert -.

func (*DeviceRepo) Update

func (r *DeviceRepo) Update(_ context.Context, d *entity.Device) (bool, error)

Update -.

func (*DeviceRepo) UpdateConnectionStatus added in v1.22.3

func (r *DeviceRepo) UpdateConnectionStatus(_ context.Context, guid string, status bool) error

UpdateConnectionStatus updates only the connection status and timestamps for a device.

func (*DeviceRepo) UpdateLastSeen added in v1.22.3

func (r *DeviceRepo) UpdateLastSeen(_ context.Context, guid string) error

UpdateLastSeen updates the lastseen timestamp for a device.

type DomainRepo

type DomainRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

DomainRepo -.

func NewDomainRepo

func NewDomainRepo(database *db.SQL, log logger.Interface) *DomainRepo

New -.

func (*DomainRepo) Delete

func (r *DomainRepo) Delete(_ context.Context, domainName, tenantID string) (bool, error)

Delete -.

func (*DomainRepo) Get

func (r *DomainRepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.Domain, error)

Get -.

func (*DomainRepo) GetByName

func (r *DomainRepo) GetByName(_ context.Context, domainName, tenantID string) (*entity.Domain, error)

GetByName -.

func (*DomainRepo) GetCount

func (r *DomainRepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*DomainRepo) GetDomainByDomainSuffix

func (r *DomainRepo) GetDomainByDomainSuffix(_ context.Context, domainSuffix, tenantID string) (*entity.Domain, error)

GetDomainByDomainSuffix -.

func (*DomainRepo) Insert

func (r *DomainRepo) Insert(_ context.Context, d *entity.Domain) (string, error)

Insert -.

func (*DomainRepo) Update

func (r *DomainRepo) Update(_ context.Context, d *entity.Domain) (bool, error)

Update -.

type ForeignKeyViolationError

type ForeignKeyViolationError struct {
	Console consoleerrors.InternalError
}

ForeignKeyViolationError lives in sqldb (not internal/repoerrors) because foreign key constraints are a relational-only concept. Backends without referential integrity (e.g. MongoDB) do not produce this error, so it has no place in the cross-backend error vocabulary.

func (ForeignKeyViolationError) Error

func (e ForeignKeyViolationError) Error() string

func (ForeignKeyViolationError) Wrap

func (e ForeignKeyViolationError) Wrap(details string) error

type IEEE8021xRepo

type IEEE8021xRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

IEEE8021xRepo -.

func NewIEEE8021xRepo

func NewIEEE8021xRepo(database *db.SQL, log logger.Interface) *IEEE8021xRepo

New -.

func (*IEEE8021xRepo) CheckProfileExists

func (r *IEEE8021xRepo) CheckProfileExists(_ context.Context, profileName, tenantID string) (bool, error)

CheckProfileExits -.

func (*IEEE8021xRepo) Delete

func (r *IEEE8021xRepo) Delete(_ context.Context, profileName, tenantID string) (bool, error)

Delete -.

func (*IEEE8021xRepo) Get

func (r *IEEE8021xRepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.IEEE8021xConfig, error)

Get -.

func (*IEEE8021xRepo) GetByName

func (r *IEEE8021xRepo) GetByName(_ context.Context, profileName, tenantID string) (*entity.IEEE8021xConfig, error)

GetByName -.

func (*IEEE8021xRepo) GetCount

func (r *IEEE8021xRepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*IEEE8021xRepo) Insert

Insert -.

func (*IEEE8021xRepo) Update

Update -.

type ProfileRepo

type ProfileRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

ProfileRepo -.

func NewProfileRepo

func NewProfileRepo(database *db.SQL, log logger.Interface) *ProfileRepo

New -.

func (*ProfileRepo) Delete

func (r *ProfileRepo) Delete(_ context.Context, profileName, tenantID string) (bool, error)

func (*ProfileRepo) Get

func (r *ProfileRepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.Profile, error)

Get -.

func (*ProfileRepo) GetByName

func (r *ProfileRepo) GetByName(_ context.Context, profileName, tenantID string) (*entity.Profile, error)

func (*ProfileRepo) GetCount

func (r *ProfileRepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*ProfileRepo) Insert

func (r *ProfileRepo) Insert(_ context.Context, p *entity.Profile) (string, error)

Insert -.

func (*ProfileRepo) Update

func (r *ProfileRepo) Update(_ context.Context, p *entity.Profile) (bool, error)

type ProfileWiFiConfigsRepo

type ProfileWiFiConfigsRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

func NewProfileWiFiConfigsRepo

func NewProfileWiFiConfigsRepo(database *db.SQL, log logger.Interface) *ProfileWiFiConfigsRepo

func (*ProfileWiFiConfigsRepo) DeleteByProfileName

func (r *ProfileWiFiConfigsRepo) DeleteByProfileName(_ context.Context, profileName, tenantID string) (bool, error)

Delete -.

func (*ProfileWiFiConfigsRepo) GetByProfileName

func (r *ProfileWiFiConfigsRepo) GetByProfileName(_ context.Context, profileName, tenantID string) ([]entity.ProfileWiFiConfigs, error)

Get by profile name -.

func (*ProfileWiFiConfigsRepo) Insert

Insert -.

type WirelessRepo

type WirelessRepo struct {
	*db.SQL
	// contains filtered or unexported fields
}

WirelessRepo -.

func NewWirelessRepo

func NewWirelessRepo(database *db.SQL, log logger.Interface) *WirelessRepo

New -.

func (*WirelessRepo) CheckProfileExists

func (r *WirelessRepo) CheckProfileExists(_ context.Context, profileName, tenantID string) (bool, error)

CheckProfileExits -.

func (*WirelessRepo) Delete

func (r *WirelessRepo) Delete(_ context.Context, profileName, tenantID string) (bool, error)

Delete -.

func (*WirelessRepo) Get

func (r *WirelessRepo) Get(_ context.Context, top, skip int, tenantID string) ([]entity.WirelessConfig, error)

Get -.

func (*WirelessRepo) GetByName

func (r *WirelessRepo) GetByName(_ context.Context, profileName, tenantID string) (*entity.WirelessConfig, error)

GetByName -.

func (*WirelessRepo) GetCount

func (r *WirelessRepo) GetCount(_ context.Context, tenantID string) (int, error)

GetCount -.

func (*WirelessRepo) Insert

Insert -.

func (*WirelessRepo) Update

Update -.

Jump to

Keyboard shortcuts

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