exposure-notifications-server: github.com/google/exposure-notifications-server/internal/verification/database Index | Files

package database

import "github.com/google/exposure-notifications-server/internal/verification/database"

Package database is a database interface to health authorities.

Index

Package Files

health_authority_db.go

type HealthAuthorityDB Uses

type HealthAuthorityDB struct {
    // contains filtered or unexported fields
}

HealthAuthorityDB allows for opreations against authorized health authorities for diagnosis signature verification.

func New Uses

func New(db *database.DB) *HealthAuthorityDB

New creates a HealthAuthorityDB attached to a specific database driver.

func (*HealthAuthorityDB) AddHealthAuthority Uses

func (db *HealthAuthorityDB) AddHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error

AddHealthAuthority inserts a new HealthAuthority record into the database.

func (*HealthAuthorityDB) AddHealthAuthorityKey Uses

func (db *HealthAuthorityDB) AddHealthAuthorityKey(ctx context.Context, ha *model.HealthAuthority, hak *model.HealthAuthorityKey) error

func (*HealthAuthorityDB) GetHealthAuthority Uses

func (db *HealthAuthorityDB) GetHealthAuthority(ctx context.Context, issuer string) (*model.HealthAuthority, error)

GetHealthAuthority retrieves a HealthAuthority record by the issuer name.

func (*HealthAuthorityDB) GetHealthAuthorityByID Uses

func (db *HealthAuthorityDB) GetHealthAuthorityByID(ctx context.Context, id int64) (*model.HealthAuthority, error)

func (*HealthAuthorityDB) GetHealthAuthorityKeys Uses

func (db *HealthAuthorityDB) GetHealthAuthorityKeys(ctx context.Context, ha *model.HealthAuthority) ([]*model.HealthAuthorityKey, error)

func (*HealthAuthorityDB) ListAllHealthAuthoritiesWithoutKeys Uses

func (db *HealthAuthorityDB) ListAllHealthAuthoritiesWithoutKeys(ctx context.Context) ([]*model.HealthAuthority, error)

func (*HealthAuthorityDB) UpdateHealthAuthority Uses

func (db *HealthAuthorityDB) UpdateHealthAuthority(ctx context.Context, ha *model.HealthAuthority) error

func (*HealthAuthorityDB) UpdateHealthAuthorityKey Uses

func (db *HealthAuthorityDB) UpdateHealthAuthorityKey(ctx context.Context, hak *model.HealthAuthorityKey) error

Package database imports 7 packages (graph) and is imported by 7 packages. Updated 2020-09-27. Refresh now. Tools for package owners.