datastore

package
v0.0.0-...-1a88b7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DbMigrationPath = "./scripts/db/migrations"

Variables

This section is empty.

Functions

func Close

func Close(db *gorm.DB)

func CreateMigrationFile

func CreateMigrationFile(migrationName string) error

From hmscontent

func MigrateDb

func MigrateDb(config *config.Config, direction string, steps int) error

func MigrateDown

func MigrateDown(config *config.Config, steps int) error

func MigrateUp

func MigrateUp(config *config.Config, steps int) error

func NewDB

func NewDB(cfg *config.Config) (db *gorm.DB)

func NewDbMigration

func NewDbMigration(config *config.Config) (db *gorm.DB, m *migrate.Migrate, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL