db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPbxIPNotDefined             = errors.New("pbx ip address not defined")
	ErrSbcFqdnNotDefined           = errors.New("sbc fqdn not defined")
	ErrRTPEnginePublicIPNotDefined = errors.New("rtp engine public ip address not defined")
)

Functions

func DefaultDBLocation

func DefaultDBLocation() string

Types

type IDB

type IDB interface {
	Close() error
	CreateFreshDB() error

	SaveSBCInformation() (int64, error)
	SaveContainerID(rowID int64, tableName, id string) error

	GetSBCParameters(sbcID int64) (types.Sbc, error)
	GetSBCIdFromFqdn(sbcFqdn string) int64
	GetKamailioInsertID(sbcFqdn string) int64
	GetRTPEngineInsertID(sbcFqdn string) int64
	GetContainerIDsFromSbcFqdn(sbcFqdn string) []string
	GetAllFqdnNames() ([]string, error)
	GetLetsEncryptNodeID() (string, error)

	RevertLastInsert()
	RemoveSbcInfo(sbcFqdn string) error
	RemoveLetsEncryptInfo(nodeID string) error
}

func NewDB

func NewDB(logger hclog.Logger, dbLocation string) (IDB, error)

Jump to

Keyboard shortcuts

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