Documentation
¶
Index ¶
- Variables
- type PGXTransactor
- type Querier
- type Service
- func (s *Service) Create(ctx context.Context, actor db.User, input api.VlanWrite) (db.Vlan, error)
- func (s *Service) Delete(ctx context.Context, actor db.User, vlanID int32) error
- func (s *Service) Get(ctx context.Context, vlanID int32) (db.Vlan, error)
- func (s *Service) List(ctx context.Context) ([]db.Vlan, error)
- func (s *Service) Update(ctx context.Context, actor db.User, currentVlanID int32, patch api.VlanPatch) (db.Vlan, error)
- type Transactor
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type PGXTransactor ¶
type PGXTransactor struct {
// contains filtered or unexported fields
}
func NewPGXTransactor ¶
func NewPGXTransactor(pool *pgxpool.Pool) *PGXTransactor
type Querier ¶
type Querier interface {
ListVlans(ctx context.Context) ([]db.Vlan, error)
GetVlanByVlanID(ctx context.Context, arg db.GetVlanByVlanIDParams) (db.Vlan, error)
CreateVlan(ctx context.Context, arg db.CreateVlanParams) (db.Vlan, error)
UpdateVlan(ctx context.Context, arg db.UpdateVlanParams) (db.Vlan, error)
DeleteVlan(ctx context.Context, arg db.DeleteVlanParams) 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
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.