settings

package
v0.13.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeIdByGRPC added in v0.8.6

func GetNodeIdByGRPC(db *sqlx.DB, grpcAddress string) (int, error)

func GetPingSystemNodeIds added in v0.13.0

func GetPingSystemNodeIds(db *sqlx.DB, pingSystem commons.PingSystem) ([]int, error)

func InitializeManagedNodeCache added in v0.10.0

func InitializeManagedNodeCache(db *sqlx.DB) error

func InitializeManagedSettingsCache added in v0.10.0

func InitializeManagedSettingsCache(db *sqlx.DB) error

func RegisterSettingRoutes

func RegisterSettingRoutes(r *gin.RouterGroup, db *sqlx.DB, serviceChannel chan commons.ServiceChannelMessage)

func RegisterUnauthenticatedRoutes added in v0.7.0

func RegisterUnauthenticatedRoutes(r *gin.RouterGroup, db *sqlx.DB)

func SetNodeConnectionDetailsByConnectionDetails added in v0.10.0

func SetNodeConnectionDetailsByConnectionDetails(
	db *sqlx.DB,
	nodeId int,
	status commons.Status,
	grpcAddress string,
	tlsDataBytes []byte,
	macaroonDataBytes []byte) error

Types

type ConnectionDetails added in v0.7.3

type ConnectionDetails struct {
	NodeId            int
	Name              string
	GRPCAddress       string
	TLSFileBytes      []byte
	MacaroonFileBytes []byte
	Status            commons.Status
	PingSystem        commons.PingSystem
	CustomSettings    commons.NodeConnectionDetailCustomSettings
}

func GetActiveNodesConnectionDetails added in v0.8.19

func GetActiveNodesConnectionDetails(db *sqlx.DB) ([]ConnectionDetails, error)

func GetAmbossPingNodesConnectionDetails added in v0.11.0

func GetAmbossPingNodesConnectionDetails(db *sqlx.DB) ([]ConnectionDetails, error)

func GetConnectionDetailsById added in v0.10.0

func GetConnectionDetailsById(db *sqlx.DB, nodeId int) (ConnectionDetails, error)

GetConnectionDetailsById will still fetch details even if node is disabled or deleted

func GetVectorPingNodesConnectionDetails added in v0.11.0

func GetVectorPingNodesConnectionDetails(db *sqlx.DB) ([]ConnectionDetails, error)

func (*ConnectionDetails) AddNodeConnectionDetailCustomSettings added in v0.13.0

func (connectionDetails *ConnectionDetails) AddNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings)

func (*ConnectionDetails) AddPingSystem added in v0.11.0

func (connectionDetails *ConnectionDetails) AddPingSystem(pingSystem commons.PingSystem)

func (*ConnectionDetails) HasNodeConnectionDetailCustomSettings added in v0.13.0

func (connectionDetails *ConnectionDetails) HasNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings) bool

func (*ConnectionDetails) HasPingSystem added in v0.11.0

func (connectionDetails *ConnectionDetails) HasPingSystem(pingSystem commons.PingSystem) bool

func (*ConnectionDetails) RemoveNodeConnectionDetailCustomSettings added in v0.13.0

func (connectionDetails *ConnectionDetails) RemoveNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings)

func (*ConnectionDetails) RemovePingSystem added in v0.11.0

func (connectionDetails *ConnectionDetails) RemovePingSystem(pingSystem commons.PingSystem)

type NodeConnectionDetails added in v0.11.1

type NodeConnectionDetails struct {
	NodeId            int                                        `json:"nodeId" form:"nodeId" db:"node_id"`
	Name              string                                     `json:"name" form:"name" db:"name"`
	Implementation    commons.Implementation                     `json:"implementation" form:"implementation" db:"implementation"`
	GRPCAddress       *string                                    `json:"grpcAddress" form:"grpcAddress" db:"grpc_address"`
	TLSFileName       *string                                    `json:"tlsFileName" db:"tls_file_name"`
	TLSDataBytes      []byte                                     `db:"tls_data"`
	TLSFile           *multipart.FileHeader                      `form:"tlsFile"`
	MacaroonFileName  *string                                    `json:"macaroonFileName" db:"macaroon_file_name"`
	MacaroonDataBytes []byte                                     `db:"macaroon_data"`
	MacaroonFile      *multipart.FileHeader                      `form:"macaroonFile"`
	Status            commons.Status                             `json:"status" db:"status_id"`
	PingSystem        commons.PingSystem                         `json:"pingSystem" db:"ping_system"`
	CustomSettings    commons.NodeConnectionDetailCustomSettings `json:"customSettings" db:"custom_settings"`
	CreateOn          time.Time                                  `json:"createdOn" db:"created_on"`
	UpdatedOn         *time.Time                                 `json:"updatedOn"  db:"updated_on"`
}

func AddNodeToDB added in v0.8.6

func AddNodeToDB(db *sqlx.DB, implementation commons.Implementation,
	grpcAddress string, tlsDataBytes []byte, macaroonDataBytes []byte) (NodeConnectionDetails, error)

func SetNodeConnectionDetails added in v0.10.0

func SetNodeConnectionDetails(db *sqlx.DB, ncd NodeConnectionDetails) (NodeConnectionDetails, error)

func (*NodeConnectionDetails) AddNodeConnectionDetailCustomSettings added in v0.13.0

func (ncd *NodeConnectionDetails) AddNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings)

func (*NodeConnectionDetails) AddNotificationType added in v0.11.1

func (ncd *NodeConnectionDetails) AddNotificationType(pingSystem commons.PingSystem)

func (*NodeConnectionDetails) HasNodeConnectionDetailCustomSettings added in v0.13.0

func (ncd *NodeConnectionDetails) HasNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings) bool

func (*NodeConnectionDetails) HasNotificationType added in v0.11.1

func (ncd *NodeConnectionDetails) HasNotificationType(pingSystem commons.PingSystem) bool

func (*NodeConnectionDetails) RemoveNodeConnectionDetailCustomSettings added in v0.13.0

func (ncd *NodeConnectionDetails) RemoveNodeConnectionDetailCustomSettings(customSettings commons.NodeConnectionDetailCustomSettings)

func (*NodeConnectionDetails) RemoveNotificationType added in v0.11.1

func (ncd *NodeConnectionDetails) RemoveNotificationType(pingSystem commons.PingSystem)

Jump to

Keyboard shortcuts

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