database

package
v12.0.403 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package database - Handles all interaction with ArangoDB

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindReleaseByCompositeKey

func FindReleaseByCompositeKey(ctx context.Context, db arangodb.Database, name, version, contentSha string) (string, error)

FindReleaseByCompositeKey retrieves a release key based on unique identifiers

func FindSBOMByContentHash

func FindSBOMByContentHash(ctx context.Context, db arangodb.Database, contentHash string) (string, error)

FindSBOMByContentHash retrieves an SBOM document from the database by its content hash

func GetEnvDefault

func GetEnvDefault(key, defVal string) string

GetEnvDefault is a convenience function for handling env vars

func InitLogger

func InitLogger() *zap.Logger

InitLogger sets up the Zap Logger to log to the console in a human readable format

Types

type DBConnection

type DBConnection struct {
	Collections map[string]arangodb.Collection
	Database    arangodb.Database
}

DBConnection is the structure that defined the database engine and collections

func InitializeDatabase

func InitializeDatabase() DBConnection

InitializeDatabase is the function for connecting to the db engine, creating the database and collections

Jump to

Keyboard shortcuts

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