Documentation
¶
Index ¶
- Variables
- type DeviceRecord
- type PGXTransactor
- type Querier
- type Service
- func (s *Service) Create(ctx context.Context, actor db.User, input api.NetworkDeviceWrite) (DeviceRecord, error)
- func (s *Service) Delete(ctx context.Context, actor db.User, id uuid.UUID) error
- func (s *Service) Get(ctx context.Context, id uuid.UUID) (DeviceRecord, error)
- func (s *Service) List(ctx context.Context) ([]DeviceRecord, error)
- func (s *Service) Update(ctx context.Context, actor db.User, id uuid.UUID, patch api.NetworkDevicePatch) (DeviceRecord, error)
- type Transactor
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DeviceRecord ¶
type DeviceRecord struct {
Device db.NetworkDevice
VLAN db.Vlan
}
type PGXTransactor ¶
type PGXTransactor struct {
// contains filtered or unexported fields
}
func NewPGXTransactor ¶
func NewPGXTransactor(pool *pgxpool.Pool) *PGXTransactor
type Querier ¶
type Querier interface {
ListNetworkDevices(ctx context.Context) ([]db.NetworkDevice, error)
GetNetworkDeviceByID(ctx context.Context, arg db.GetNetworkDeviceByIDParams) (db.NetworkDevice, error)
CreateNetworkDevice(ctx context.Context, arg db.CreateNetworkDeviceParams) (db.NetworkDevice, error)
UpdateNetworkDevice(ctx context.Context, arg db.UpdateNetworkDeviceParams) (db.NetworkDevice, error)
DeleteNetworkDevice(ctx context.Context, arg db.DeleteNetworkDeviceParams) error
GetVlanByVlanID(ctx context.Context, arg db.GetVlanByVlanIDParams) (db.Vlan, error)
UpsertRadcheckCleartextPassword(ctx context.Context, arg db.UpsertRadcheckCleartextPasswordParams) error
DeleteRadcheckCleartextPasswordByUsername(ctx context.Context, arg db.DeleteRadcheckCleartextPasswordByUsernameParams) error
DeleteRadusergroupsByUsername(ctx context.Context, arg db.DeleteRadusergroupsByUsernameParams) error
InsertRadusergroup(ctx context.Context, arg db.InsertRadusergroupParams) error
CreateAuditLog(ctx context.Context, arg db.CreateAuditLogParams) (db.AuditLog, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(queries Querier, tx Transactor) *Service
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, actor db.User, input api.NetworkDeviceWrite) (DeviceRecord, error)
type Transactor ¶
type ValidationError ¶
type ValidationError struct {
Message string
}
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.