core

package
v0.0.0-...-3e4451e Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheManager *cache.Cache[[]byte]
View Source
var DB *gorm.DB

Functions

func FetchAuthorizations

func FetchAuthorizations() (gin.Accounts, error)

FetchAuthorizations fetches from the database a Gin Accounts map for using in BasicAuth requests. Authorizations must be added to the database beforehand in a table called `auth` with the following rows:

  • ID: int PK
  • name: text
  • pass: text

The following statement can be used to create the auth table:

CREATE TABLE "auth" (
	"ID"	INTEGER,
	"name"	TEXT,
	"pass"	TEXT,
	PRIMARY KEY("ID")
)

func InitCache

func InitCache() error

func InitStorage

func InitStorage(storagePath string) error

InitStorage initializes the databse from a given path, creating it if necessary.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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