database

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
}

DB is a wrapper around sql.DB

func InitDB

func InitDB(dbPath string) (*DB, error)

InitDB initializes the database connection

func (*DB) GetMiddleware

func (db *DB) GetMiddleware(id string) (map[string]interface{}, error)

GetMiddleware fetches a specific middleware by ID

func (*DB) GetMiddlewares

func (db *DB) GetMiddlewares() ([]map[string]interface{}, error)

GetMiddlewares fetches all middleware definitions

func (*DB) GetResource

func (db *DB) GetResource(id string) (map[string]interface{}, error)

GetResource fetches a specific resource by ID

func (*DB) GetResources

func (db *DB) GetResources() ([]map[string]interface{}, error)

GetResources fetches all resources

Jump to

Keyboard shortcuts

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