infostore

package
v0.8.21 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB_FILE_PATH string

Functions

func Close

func Close(db *gorm.DB) error

Meta DB Closer

func CountAllConnections added in v0.8.17

func CountAllConnections(info interface{}) (int64, error)

CountAllConnections counts all entries in the connection_config_infos table info is a pointer to a ConnectionConfigInfo struct

func CountAllNameIDs added in v0.8.17

func CountAllNameIDs(info interface{}) (int64, error)

CountAllNameIDs counts all name_ids using the model type passed as info

func CountConnectionsByProvider added in v0.8.17

func CountConnectionsByProvider(info interface{}, providerName string) (int64, error)

CountConnectionsByProvider counts entries in the connection_config_infos table by provider_name info is a pointer to a ConnectionConfigInfo struct

func CountNameIDsByConnection added in v0.8.17

func CountNameIDsByConnection(info interface{}, connectionName string) (int64, error)

CountNameIDsByConnection counts name_ids in a model filtered by connection_name

func Delete

func Delete(info interface{}, columName string, columnValue string) (bool, error)

Delete a Info with a condition

func DeleteBy3Conditions

func DeleteBy3Conditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string,
	columnName3 string, columnValue3 string) (bool, error)

Delete all Infos with three conditions ex) Conneciton Name, Resource Name, Owner VPC Name

func DeleteByConditions

func DeleteByConditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string) (bool, error)

Delete all Infos with two conditions ex) Conneciton Name, Resource Name ex) Conneciton Name, Owner VPC Name

func Get

func Get(info interface{}, columnName string, columnValue string) error

Get a Info with a condition

func GetBy3Conditions

func GetBy3Conditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string,
	columnName3 string, columnValue3 string) error

Get a Info with three conditions(Conneciton Name, Resource NameId, Owner VPC Name)

func GetByConditionAndContain added in v0.8.11

func GetByConditionAndContain(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnContainValue2 string) error

GetByConditionAndContain finds an entry that matches the given conditions: - columnName1 must equal columnValue1 - columnName2 must contain columnContainValue2

func GetByConditions

func GetByConditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string) error

Get a Info with two conditions(Conneciton Name, Resource NameId)

func GetByConditionsAndContain

func GetByConditionsAndContain(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string,
	columnName3 string, columnValue3 string) error

Get a Info with two conditions(Conneciton Name, Resource NameId) and contain(contained_text)

func GetByContain

func GetByContain(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string) error

Get a Info with a condition(Conneciton Name) and contains(contained_text)

func Has

func Has(info interface{}, columnName string, columnValue string) (bool, error)

Check if a Info exists with a condition

func HasBy3Conditions

func HasBy3Conditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string,
	columnName3 string, columnValue3 string) (bool, error)

Check if a Info exists with three conditions(Conneciton Name, Resource NameId, Owner vpc name)

func HasByConditions

func HasByConditions(info interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string) (bool, error)

Check if a Info exists with two conditions(Conneciton Name, Resource NameId)

func Insert

func Insert(info interface{}) error

Insert a Info

func List

func List(infoList interface{}) error

List all Info

func ListByCondition

func ListByCondition(infoList interface{}, columnName string, columnValue string) error

List all Info with a condition(ex. Conneciton Name)

func ListByConditions

func ListByConditions(infoList interface{}, columnName1 string, columnValue1 string, columnName2 string, columnValue2 string) error

List all Info with two conditions(ex. Conneciton Name and Owner VPC Name) Used for SubnetInfoList, ...

func ListNameIDByConnection added in v0.8.20

func ListNameIDByConnection(info interface{}, connectionName string) ([]string, error)

ListNameIDByConnection retrieves a list of name_ids in a model filtered by connection_name

func Open

func Open() (*gorm.DB, error)

Meta DB Opener

func Ping added in v0.8.13

func Ping() error

Types

type AZList added in v0.8.11

type AZList []string

func (*AZList) Scan added in v0.8.11

func (o *AZList) Scan(src any) error

func (AZList) Value added in v0.8.11

func (o AZList) Value() (driver.Value, error)

type KVList

type KVList []icdrs.KeyValue

KeyValue is a struct for Key-Value pair KVList type is used for storing a list of KeyValue with a json format

func (*KVList) Scan

func (o *KVList) Scan(src any) error

func (KVList) Value

func (o KVList) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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