database

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGormLogger

func SetGormLogger(l logger.Interface)

Types

type DB

type DB struct {
	*gorm.DB
}

func Initialize

func Initialize(ctx context.Context, databaseURL string) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) FindEnvironmentIDByApiKey

func (db *DB) FindEnvironmentIDByApiKey(ctx context.Context, apiKey string) (string, error)

FindEnvironmentIDByApiKey finds the environment ID that is associated with the given API key. It queries the api_keys table to validate the key and find the associated environment.

Jump to

Keyboard shortcuts

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