Documentation
¶
Overview ¶
Package database - Handles all interaction with ArangoDB
Index ¶
- func FindReleaseByCompositeKey(ctx context.Context, db arangodb.Database, name, version, contentSha string) (string, error)
- func FindSBOMByContentHash(ctx context.Context, db arangodb.Database, contentHash string) (string, error)
- func GetEnvDefault(key, defVal string) string
- func InitLogger() *zap.Logger
- type DBConnection
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 ¶
GetEnvDefault is a convenience function for handling env vars
func InitLogger ¶
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
Click to show internal directories.
Click to hide internal directories.