Documentation ¶
Overview ¶
Package database is a database interface to health authorities.
Index ¶
- type HealthAuthorityDB
- func (db *HealthAuthorityDB) AddHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error
- func (db *HealthAuthorityDB) AddHealthAuthorityKey(ctx context.Context, ha *model.HealthAuthority, hak *model.HealthAuthorityKey) error
- func (db *HealthAuthorityDB) GetHealthAuthority(ctx context.Context, issuer string) (*model.HealthAuthority, error)
- func (db *HealthAuthorityDB) GetHealthAuthorityByID(ctx context.Context, id int64) (*model.HealthAuthority, error)
- func (db *HealthAuthorityDB) GetHealthAuthorityKeys(ctx context.Context, ha *model.HealthAuthority) ([]*model.HealthAuthorityKey, error)
- func (db *HealthAuthorityDB) ListAllHealthAuthoritiesWithoutKeys(ctx context.Context) ([]*model.HealthAuthority, error)
- func (db *HealthAuthorityDB) UpdateHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error
- func (db *HealthAuthorityDB) UpdateHealthAuthorityKey(ctx context.Context, hak *model.HealthAuthorityKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthAuthorityDB ¶
type HealthAuthorityDB struct {
// contains filtered or unexported fields
}
HealthAuthorityDB allows for opreations against authorized health authorities for diagnosis signature verification.
func New ¶
func New(db *database.DB) *HealthAuthorityDB
New creates a HealthAuthorityDB attached to a specific database driver.
func (*HealthAuthorityDB) AddHealthAuthority ¶
func (db *HealthAuthorityDB) AddHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error
AddHealthAuthority inserts a new HealthAuthority record into the database.
func (*HealthAuthorityDB) AddHealthAuthorityKey ¶
func (db *HealthAuthorityDB) AddHealthAuthorityKey(ctx context.Context, ha *model.HealthAuthority, hak *model.HealthAuthorityKey) error
func (*HealthAuthorityDB) GetHealthAuthority ¶
func (db *HealthAuthorityDB) GetHealthAuthority(ctx context.Context, issuer string) (*model.HealthAuthority, error)
GetHealthAuthority retrieves a HealthAuthority record by the issuer name.
func (*HealthAuthorityDB) GetHealthAuthorityByID ¶
func (db *HealthAuthorityDB) GetHealthAuthorityByID(ctx context.Context, id int64) (*model.HealthAuthority, error)
func (*HealthAuthorityDB) GetHealthAuthorityKeys ¶
func (db *HealthAuthorityDB) GetHealthAuthorityKeys(ctx context.Context, ha *model.HealthAuthority) ([]*model.HealthAuthorityKey, error)
func (*HealthAuthorityDB) ListAllHealthAuthoritiesWithoutKeys ¶
func (db *HealthAuthorityDB) ListAllHealthAuthoritiesWithoutKeys(ctx context.Context) ([]*model.HealthAuthority, error)
func (*HealthAuthorityDB) UpdateHealthAuthority ¶
func (db *HealthAuthorityDB) UpdateHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error
func (*HealthAuthorityDB) UpdateHealthAuthorityKey ¶
func (db *HealthAuthorityDB) UpdateHealthAuthorityKey(ctx context.Context, hak *model.HealthAuthorityKey) error
Click to show internal directories.
Click to hide internal directories.