Documentation ¶
Index ¶
- Constants
- func Close(db *gorm.DB)
- func CreateMigrationFile(migrationName string) error
- func MigrateDb(config *config.Config, direction string, steps int) error
- func MigrateDown(config *config.Config, steps int) error
- func MigrateUp(config *config.Config, steps int) error
- func NewDB(cfg *config.Config) (db *gorm.DB)
- func NewDbMigration(config *config.Config) (db *gorm.DB, m *migrate.Migrate, err error)
- type HostconfJwkDb
Constants ¶
View Source
const DbMigrationPath = "./scripts/db/migrations"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HostconfJwkDb ¶
type HostconfJwkDb struct {
// contains filtered or unexported fields
}
func NewHostconfJwkDb ¶
func NewHostconfJwkDb(cfg *config.Config, log *slog.Logger) *HostconfJwkDb
NewHostconfJwkDb Create new HostconfJwkDb
func (*HostconfJwkDb) ListKeys ¶
func (r *HostconfJwkDb) ListKeys() (err error)
List all JWKs in database
func (*HostconfJwkDb) Purge ¶
func (r *HostconfJwkDb) Purge() (err error)
Purge and remove expired JWKs from database
func (*HostconfJwkDb) Refresh ¶
func (r *HostconfJwkDb) Refresh() (err error)
Refresh and create JWKs in database A new JWK is created whenever the database has no valid JWK or all JWKs expire within the renewal threshold period.
func (*HostconfJwkDb) Revoke ¶
func (r *HostconfJwkDb) Revoke(kid string) (err error)
Mark a JWK as revoked
Click to show internal directories.
Click to hide internal directories.