sqldb

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

type DatabaseError struct {
	Console consoleerrors.InternalError
}

func (DatabaseError) Error

func (e DatabaseError) Error() string

func (DatabaseError) Wrap

func (e DatabaseError) Wrap(call, function string, err error) error

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 -.

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
}

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 NotFoundError

type NotFoundError struct {
	Console consoleerrors.InternalError
}

func (NotFoundError) Error

func (e NotFoundError) Error() string

func (NotFoundError) Wrap

func (e NotFoundError) Wrap(call, function string, err error) error

func (NotFoundError) WrapWithMessage

func (e NotFoundError) WrapWithMessage(call, function, message string) error

type NotUniqueError

type NotUniqueError struct {
	Console consoleerrors.InternalError
}

func (NotUniqueError) Error

func (e NotUniqueError) Error() string

func (NotUniqueError) Wrap

func (e NotUniqueError) Wrap(details string) error

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