dbservice

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DbBucketActionStats  = "WebhookActionStats"
	DbBucketSharedConfig = "WebhookSharedConfig"

	DbSizeLimit = 0

	DateFmt = time.RFC3339Nano

	DbPath = "/server/database/webhooks.db"
)
View Source
var Init = func(db *bbolt.DB, bucket string) error {
	return db.Update(func(tx *bbolt.Tx) error {
		_, err := tx.CreateBucketIfNotExists([]byte(bucket))
		return err
	})
}

Functions

func AggregateScans

func AggregateScans(output string,
	currentScan map[string]string,
	scansPerTicket int,
	ignoreTheQuantity bool) ([]map[string]string, error)

func ChangeDbPath

func ChangeDbPath(newPath string)

func CheckExpiredData

func CheckExpiredData()

func CheckSizeLimit

func CheckSizeLimit()

func EnsureApiKey

func EnsureApiKey() error

func GetApiKey

func GetApiKey() (string, error)

func MayBeStoreMessage

func MayBeStoreMessage(message []byte, messageKey string, expired *time.Time) (wasStored bool, err error)

func RegisterPlgnInvctn

func RegisterPlgnInvctn(name string) error

func SetNewDbPathFromEnv

func SetNewDbPathFromEnv()

Types

This section is empty.

Jump to

Keyboard shortcuts

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