Documentation ¶
Index ¶
- type Clock
- type DB
- func (db *DB) CreateAdmin(ctx context.Context, adm *linkedca.Admin) error
- func (db *DB) CreateProvisioner(ctx context.Context, prov *linkedca.Provisioner) error
- func (db *DB) DeleteAdmin(ctx context.Context, id string) error
- func (db *DB) DeleteProvisioner(ctx context.Context, id string) error
- func (db *DB) GetAdmin(ctx context.Context, id string) (*linkedca.Admin, error)
- func (db *DB) GetAdmins(ctx context.Context) ([]*linkedca.Admin, error)
- func (db *DB) GetProvisioner(ctx context.Context, id string) (*linkedca.Provisioner, error)
- func (db *DB) GetProvisioners(ctx context.Context) ([]*linkedca.Provisioner, error)
- func (db *DB) UpdateAdmin(ctx context.Context, adm *linkedca.Admin) error
- func (db *DB) UpdateProvisioner(ctx context.Context, prov *linkedca.Provisioner) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a struct that implements the AdminDB interface.
func (*DB) CreateAdmin ¶
CreateAdmin stores a new admin to the database.
func (*DB) CreateProvisioner ¶
CreateProvisioner stores a new provisioner to the database.
func (*DB) DeleteAdmin ¶
DeleteAdmin saves an updated admin to the database.
func (*DB) DeleteProvisioner ¶
DeleteProvisioner saves an updated admin to the database.
func (*DB) GetAdmins ¶
GetAdmins retrieves and unmarshals all active (not deleted) admins from the database. TODO should we be paginating?
func (*DB) GetProvisioner ¶
GetProvisioner retrieves and unmarshals a provisioner from the database.
func (*DB) GetProvisioners ¶
GetProvisioners retrieves and unmarshals all active (not deleted) provisioners from the database.
func (*DB) UpdateAdmin ¶
UpdateAdmin saves an updated admin to the database.
func (*DB) UpdateProvisioner ¶
UpdateProvisioner saves an updated provisioner to the database.