usecase

package
v1.26.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloserFunc added in v1.26.0

type CloserFunc func() error

CloserFunc adapts a plain function to io.Closer.

func (CloserFunc) Close added in v1.26.0

func (f CloserFunc) Close() error

type Repos added in v1.26.0

type Repos struct {
	Devices            devices.Repository
	Domains            domains.Repository
	Profiles           profiles.Repository
	ProfileWiFiConfigs profilewificonfigs.Repository
	IEEE8021xConfigs   ieee8021xconfigs.Repository
	CIRAConfigs        ciraconfigs.Repository
	WirelessConfigs    wificonfigs.Repository

	// Closer releases the underlying driver.
	Closer io.Closer
}

Repos is the bundle of repository interfaces an app instance needs. Concrete backend constructors live alongside their dialer (e.g. in internal/app) so this package never imports a storage driver.

func NewSQLRepos added in v1.26.0

func NewSQLRepos(database *db.SQL, log logger.Interface) *Repos

NewSQLRepos builds the repo bundle from an open *db.SQL pool (Postgres or embedded SQLite — same code path, picked by URL).

type Usecases

type Usecases struct {
	Devices            devices.Feature
	Domains            domains.Feature
	AMTExplorer        amtexplorer.Feature
	Profiles           profiles.Feature
	ProfileWiFiConfigs profilewificonfigs.Feature
	IEEE8021xProfiles  ieee8021xconfigs.Feature
	CIRAConfigs        ciraconfigs.Feature
	WirelessProfiles   wificonfigs.Feature
	Exporter           export.Exporter
}

Usecases bundles every feature the HTTP handlers depend on.

func NewUseCases

func NewUseCases(repos *Repos, log logger.Interface, certStore security.Storager) *Usecases

NewUseCases wires every use case from a repo bundle. The caller picks the backend via one of the Repos constructors; this function doesn't care which.

Directories

Path Synopsis
nosqldb
mongo
Package mongo implements every *.Repository interface against MongoDB.
Package mongo implements every *.Repository interface against MongoDB.

Jump to

Keyboard shortcuts

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