mongo

package
v0.0.0-...-1cec081 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

View Source
const (
	EnvAccountDBName = "ACCOUNT_DB_NAME"
	EnvTrafficDBName = "TRAFFIC_DB_NAME"
	EnvCVMDBName     = "CVM_DB_NAME"
	EnvCVMConn       = "CVM_DB_CONN"
	EnvTrafficConn   = "TRAFFIC_CONN"
)
View Source
const (
	DefaultAccountDBName  = "sealos-resources"
	DefaultTrafficDBName  = "sealos-networkmanager"
	DefaultAuthDBName     = "sealos-auth"
	DefaultCVMDBName      = "sealos-cvm"
	DefaultCVMConn        = "cvm"
	DefaultMeteringConn   = "metering"
	DefaultMonitorConn    = "monitor"
	DefaultBillingConn    = "billing"
	DefaultUserConn       = "user"
	DefaultPricesConn     = "prices"
	DefaultPropertiesConn = "properties"
	//TODO fix
	DefaultTrafficConn = "traffic"
)
View Source
const DefaultRetentionDay = 30

Variables

This section is empty.

Functions

func NewMongoInterface

func NewMongoInterface(ctx context.Context, URL string) (database.Interface, error)

Types

type AccountBalanceSpecBSON

type AccountBalanceSpecBSON struct {
	// Time    metav1.Time `json:"time" bson:"time"`
	// If the Time field is of the time. time type, it cannot be converted to json crd, so use metav1.Time. However, metav1.Time cannot be inserted into mongo, so you need to convert it to time.Time
	Time                                   time.Time `json:"time" bson:"time"`
	accountv1.BillingRecordQueryItemInline `json:",inline" bson:",inline"`
}

Jump to

Keyboard shortcuts

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