db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package db manages the SQLite database for epos-opensource. It embeds the SQL schema, ensures the database file is created under the configured data directory, and provides functions to open the connection and perform CRUD operations on K8s and Docker entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDocker

func DeleteDocker(name string) error

DeleteDocker removes a docker entry from the database for the given name.

func DeleteIngestedFilesByEnvironment

func DeleteIngestedFilesByEnvironment(envType, envName string) error

DeleteIngestedFilesByEnvironment deletes all ingested file records for an environment.

func DeleteK8s

func DeleteK8s(name string) error

DeleteK8s removes a k8s entry from the database for the given name.

func Get

func Get() (*sqlc.Queries, error)

Get opens a new connection to the database, creating the database file and schema if they do not exist.

func GetAllDocker

func GetAllDocker() ([]sqlc.Docker, error)

GetAllDocker retrieves all docker entries from the database.

func GetAllK8s

func GetAllK8s() ([]sqlc.K8s, error)

GetAllK8s retrieves all k8s entries from the database.

func GetDockerByName

func GetDockerByName(name string) (*sqlc.Docker, error)

GetDockerByName retrieves a single docker entry by name from the database.

func GetIngestedFilesByEnvironment

func GetIngestedFilesByEnvironment(envType, envName string) ([]sqlc.GetIngestedFilesByEnvironmentRow, error)

GetIngestedFilesByEnvironment retrieves all ingested file records for an environment.

func GetK8sByName

func GetK8sByName(name string) (*sqlc.K8s, error)

GetK8sByName retrieves a single k8s entry by name from the database.

func GetLatestReleaseCache

func GetLatestReleaseCache() (sqlc.LatestReleaseCache, error)

GetLatestReleaseCache retrieves the latest release cache from the database.

func InsertDocker

func InsertDocker(docker sqlc.Docker) (*sqlc.Docker, error)

InsertDocker adds a new docker entry to the database.

func InsertIngestedFile

func InsertIngestedFile(envType, envName, filePath string) error

InsertIngestedFile inserts or updates an ingested file record.

func InsertK8s

func InsertK8s(name, dir, contextStr, apiURL, guiURL, backofficeURL, protocol string, tlsEnabled bool) (*sqlc.K8s, error)

InsertK8s adds a new k8s entry to the database.

func UpsertLatestReleaseCache

func UpsertLatestReleaseCache(tagName string, fetchedAt time.Time) error

UpsertLatestReleaseCache updates or inserts the latest release cache in the database.

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