db

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: GPL-3.0 Imports: 12 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 Kubernetes 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 DeleteKubernetes

func DeleteKubernetes(name string) error

DeleteKubernetes removes a kubernetes 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 GetAllKubernetes

func GetAllKubernetes() ([]sqlc.Kubernetes, error)

GetAllKubernetes retrieves all kubernetes 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 GetKubernetesByName

func GetKubernetesByName(name string) (*sqlc.Kubernetes, error)

GetKubernetesByName retrieves a single kubernetes entry by name from the database.

func GetLatestReleaseCache added in v0.8.0

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 InsertKubernetes

func InsertKubernetes(name, dir, contextStr, apiURL, guiURL, backofficeURL, protocol string) (*sqlc.Kubernetes, error)

InsertKubernetes adds a new kubernetes entry to the database.

func UpsertLatestReleaseCache added in v0.8.0

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