database

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APPLICATION_FIELDS = "" /* 167-byte string literal not displayed */
	TARGET_FIELDS      = "id,enable,type,args"
)

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, log *zap.Logger) (*Database, error)

func (*Database) GetApplication

func (db *Database) GetApplication(
	userKey string,
	token string,
) (application.Application, error)

func (*Database) GetApplicationsForUser added in v0.4.3

func (db *Database) GetApplicationsForUser(
	userID string,
) ([]application.Application, error)

func (*Database) GetTargetByID

func (db *Database) GetTargetByID(targetID string) (target.Target, error)

func (*Database) GetTargets added in v0.4.3

func (db *Database) GetTargets() ([]target.Target, error)

func (*Database) GetUserFromToken

func (db *Database) GetUserFromToken(token string) (user.User, error)

func (*Database) IncrementStat added in v0.4.3

func (db *Database) IncrementStat(
	userKey string,
	token string,
	stat string,
) error

func (*Database) SaveInput added in v0.4.3

func (db *Database) SaveInput(
	userKey string,
	token string,
	input string,
) error

func (*Database) Shutdown

func (db *Database) Shutdown() error

Jump to

Keyboard shortcuts

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