base

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package base defines the names and variables that have global scope throughout which can be used in other subpackages

Index

Constants

View Source
const APIVersion = "v1"

APIVersion sets the version of API in paths.

View Source
const CEEMSDBName = "ceems.db"

CEEMSDBName is the name of CEEMS DB file.

View Source
const CEEMSServerAppName = "ceems_api_server"

CEEMSServerAppName is kingpin app name.

Variables

View Source
var (
	UnitsDBTableName      = models.Unit{}.TableName()
	UsageDBTableName      = models.Usage{}.TableName()
	DailyUsageDBTableName = models.DailyUsage{}.TableName()
	ProjectsDBTableName   = models.Project{}.TableName()
	UsersDBTableName      = models.User{}.TableName()
	AdminUsersDBTableName = models.AdminUsers{}.TableName()
)

DB table names.

View Source
var (
	UnitsDBTableColNames      = models.Unit{}.TagNames("json")
	UsageDBTableColNames      = models.Usage{}.TagNames("json")
	ProjectsDBTableColNames   = models.Project{}.TagNames("json")
	UsersDBTableColNames      = models.User{}.TagNames("json")
	AdminUsersDBTableColNames = models.AdminUsers{}.TagNames("json")
)

Slice of field names of all tables This slice will not contain the DB columns that are ignored in the query.

View Source
var (
	UnitsDBTableStructFieldColNameMap      = models.Unit{}.TagMap("", "sql")
	UsageDBTableStructFieldColNameMap      = models.Usage{}.TagMap("", "sql")
	ProjectsDBTableStructFieldColNameMap   = models.Project{}.TagMap("", "sql")
	UsersDBTableStructFieldColNameMap      = models.User{}.TagMap("", "sql")
	AdminUsersDBTableStructFieldColNameMap = models.AdminUsers{}.TagMap("", "sql")
)

Map of struct field name to DB column name.

View Source
var CEEMSServerApp = *kingpin.New(
	CEEMSServerAppName,
	"API server for reporting usage statistics for batchjobs/VMs/Pods.",
)

CEEMSServerApp is kinpin app.

View Source
var (
	ConfigFilePath string
)

CLI args with global scope.

View Source
var DatetimeLayout = fmt.Sprintf("%sT%s", time.DateOnly, time.TimeOnly)

DatetimeLayout to be used in the package.

View Source
var (
	InvalidIDRegex = regexp.MustCompile("[^a-zA-Z0-9-_]")
)

Cluster and Updater ID valid regex.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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