db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const LogDeploymentTable = "sp_log_deployment"

LogDeploymentTable .

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*gorm.DB
	LogDeployment LogDeploymentDB
}

DB .

func New

func New(db *gorm.DB) *DB

New .

func (*DB) Begin

func (db *DB) Begin() *DB

Begin .

type LogDeployment

type LogDeployment struct {
	ID           int64  `gorm:"column:id" json:"id"`
	OrgID        string `gorm:"column:org_id" json:"org_id"`
	ClusterName  string `gorm:"column:cluster_name" json:"cluster_name"`
	ClusterType  int    `gorm:"column:cluster_type" json:"cluster_type"`
	ESURL        string `gorm:"column:es_url" json:"es_url"`
	ESConfig     string `gorm:"column:es_config" json:"es_config"`
	CollectorURL string `gorm:"column:collector_url" json:"collector_url"`
	Domain       string `gorm:"column:domain" json:"domain"`
}

LogDeployment .

func (LogDeployment) TableName

func (LogDeployment) TableName() string

TableName .

type LogDeploymentDB

type LogDeploymentDB struct {
	*gorm.DB
}

LogDeploymentDB .

func (*LogDeploymentDB) QueryByClusters

func (db *LogDeploymentDB) QueryByClusters(clusters ...string) ([]*LogDeployment, error)

QueryByClusters .

func (*LogDeploymentDB) QueryByOrgID

func (db *LogDeploymentDB) QueryByOrgID(orgID int64) ([]*LogDeployment, error)

QueryByOrgID .

Jump to

Keyboard shortcuts

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