Documentation ¶
Index ¶
- Constants
- Variables
- func GetActiveChannelIdFromFundingTransaction(fundingTransactionHash string, fundingOutputIndex int) int
- func GetActiveChannelIdFromShortChannelId(shortChannelId string) int
- func GetActiveNodeIdFromPublicKey(publicKey string, chain Chain, network Network) int
- func GetActiveTorqNodeIdFromPublicKey(publicKey string, chain Chain, network Network) int
- func GetAllChannelPublicKeys(chain Chain, network Network) []string
- func GetAllTorqNodeIds(chain Chain, network Network) []int
- func GetAllTorqPublicKeys(chain Chain, network Network) []string
- func GetChannelIdFromFundingTransaction(fundingTransactionHash string, fundingOutputIndex int) int
- func GetChannelIdFromShortChannelId(shortChannelId string) int
- func GetChannelNodeIds(chain Chain, network Network) []int
- func GetChannelPublicKeys(chain Chain, network Network) []string
- func GetNodeIdFromPublicKey(publicKey string, chain Chain, network Network) int
- func InactivateChannelNode(publicKey string, chain Chain, network Network)
- func ManagedChannelCache(ch chan ManagedChannel, ctx context.Context)
- func ManagedNodeCache(ch chan ManagedNode, ctx context.Context)
- func ManagedSettingsCache(ch chan ManagedSettings, ctx context.Context)
- func SendToManagedChannelChannel(ch chan ManagedChannel, managedChannel ManagedChannel)
- func SendToManagedChannelSettingsChannel(ch chan ManagedChannelSettings, channelSettings ManagedChannelSettings)
- func SendToManagedNodeChannel(ch chan ManagedNode, managedNode ManagedNode)
- func SendToManagedNodeIdsChannel(ch chan []int, channelIds []int)
- func SendToManagedNodeSettingsChannel(ch chan ManagedNodeSettings, nodeSettings ManagedNodeSettings)
- func SendToManagedPublicKeysChannel(ch chan []string, publicKeys []string)
- func SendToManagedSettingsChannel(ch chan ManagedSettings, managedSettings ManagedSettings)
- func SetChannel(channelId int, shortChannelId *string, status ChannelStatus, ...)
- func SetChannelNode(nodeId int, publicKey string, chain Chain, network Network, ...)
- func SetChannelStatus(channelId int, status ChannelStatus)
- func SetInactiveChannelNode(nodeId int, publicKey string, chain Chain, network Network)
- func SetSettings(defaultDateRange, defaultLanguage, weekStartsOn, preferredTimeZone string)
- func SetTorqNode(nodeId int, status Status, publicKey string, chain Chain, network Network)
- type Chain
- type ChannelStatus
- type Implementation
- type ManagedChannel
- type ManagedChannelCacheOperationType
- type ManagedChannelSettings
- type ManagedNode
- type ManagedNodeCacheOperationType
- type ManagedNodeSettings
- type ManagedSettings
- type ManagedSettingsCacheOperationType
- type Network
- type Status
Constants ¶
View Source
const ( Active = Status(iota) Inactive Pending Deleted )
View Source
const ( LND = Implementation(iota) CLN )
View Source
const ( Bitcoin = Chain(iota) Litecoin )
View Source
const ( MainNet = Network(iota) SigNet SimNet RegTest TestNet )
View Source
const ( Opening = ChannelStatus(iota) Open Closing CooperativeClosed = 100 LocalForceClosed = 101 RemoteForceClosed = 102 BreachClosed = 103 FundingCancelledClosed = 104 AbandonedClosed = 105 )
Variables ¶
View Source
var ManagedChannelChannel = make(chan ManagedChannel) //nolint:gochecknoglobals
View Source
var ManagedNodeChannel = make(chan ManagedNode) //nolint:gochecknoglobals
View Source
var ManagedSettingsChannel = make(chan ManagedSettings) //nolint:gochecknoglobals
Functions ¶
func GetAllChannelPublicKeys ¶
func GetAllTorqNodeIds ¶
func GetAllTorqPublicKeys ¶
func GetChannelNodeIds ¶
func GetChannelPublicKeys ¶
func GetNodeIdFromPublicKey ¶
func InactivateChannelNode ¶
func ManagedChannelCache ¶
func ManagedChannelCache(ch chan ManagedChannel, ctx context.Context)
ManagedChannelCache parameter Context is for test cases...
func ManagedNodeCache ¶
func ManagedNodeCache(ch chan ManagedNode, ctx context.Context)
ManagedNodeCache parameter Context is for test cases...
func ManagedSettingsCache ¶
func ManagedSettingsCache(ch chan ManagedSettings, ctx context.Context)
ManagedSettingsCache parameter Context is for test cases...
func SendToManagedChannelChannel ¶
func SendToManagedChannelChannel(ch chan ManagedChannel, managedChannel ManagedChannel)
func SendToManagedChannelSettingsChannel ¶
func SendToManagedChannelSettingsChannel(ch chan ManagedChannelSettings, channelSettings ManagedChannelSettings)
func SendToManagedNodeChannel ¶
func SendToManagedNodeChannel(ch chan ManagedNode, managedNode ManagedNode)
func SendToManagedNodeSettingsChannel ¶
func SendToManagedNodeSettingsChannel(ch chan ManagedNodeSettings, nodeSettings ManagedNodeSettings)
func SendToManagedSettingsChannel ¶
func SendToManagedSettingsChannel(ch chan ManagedSettings, managedSettings ManagedSettings)
func SetChannel ¶
func SetChannel(channelId int, shortChannelId *string, status ChannelStatus, fundingTransactionHash string, fundingOutputIndex int)
func SetChannelNode ¶
func SetChannelNode(nodeId int, publicKey string, chain Chain, network Network, status ChannelStatus)
func SetChannelStatus ¶
func SetChannelStatus(channelId int, status ChannelStatus)
func SetInactiveChannelNode ¶
func SetSettings ¶
func SetSettings(defaultDateRange, defaultLanguage, weekStartsOn, preferredTimeZone string)
Types ¶
type ChannelStatus ¶
type ChannelStatus int
func GetChannelStatusFromChannelId ¶
func GetChannelStatusFromChannelId(channelId int) ChannelStatus
type Implementation ¶
type Implementation int
type ManagedChannel ¶
type ManagedChannel struct { Type ManagedChannelCacheOperationType ChannelId int ShortChannelId string FundingTransactionHash string FundingOutputIndex int Status ChannelStatus Out chan ManagedChannel ChannelIdSettingsOut chan ManagedChannelSettings }
type ManagedChannelCacheOperationType ¶
type ManagedChannelCacheOperationType uint
const ( // READ_ACTIVE_CHANNELID_BY_SHORTCHANNELID please provide ShortChannelId and Out READ_ACTIVE_CHANNELID_BY_SHORTCHANNELID ManagedChannelCacheOperationType = iota // READ_CHANNELID_BY_SHORTCHANNELID please provide ShortChannelId and Out READ_CHANNELID_BY_SHORTCHANNELID // READ_ACTIVE_CHANNELID_BY_FUNDING_TRANSACTION please provide FundingTransactionHash, FundingOutputIndex and Out READ_ACTIVE_CHANNELID_BY_FUNDING_TRANSACTION // READ_CHANNELID_BY_FUNDING_TRANSACTION please provide FundingTransactionHash, FundingOutputIndex and Out READ_CHANNELID_BY_FUNDING_TRANSACTION // READ_STATUSID_BY_CHANNELID please provide ChannelId and Out READ_STATUSID_BY_CHANNELID // READ_CHANNEL_SETTINGS please provide ChannelId and ChannelIdSettingsOut READ_CHANNEL_SETTINGS // WRITE_CHANNEL Please provide ChannelId, FundingTransactionHash, FundingOutputIndex and Status (other values are optional in case of pending open channel) WRITE_CHANNEL // WRITE_CHANNELSTATUSID Please provide ChannelId and Status WRITE_CHANNELSTATUSID )
type ManagedChannelSettings ¶
type ManagedChannelSettings struct { ChannelId int ShortChannelId string FundingTransactionHash string FundingOutputIndex int Status ChannelStatus }
func GetChannelSettingsFromChannelId ¶
func GetChannelSettingsFromChannelId(channelId int) ManagedChannelSettings
type ManagedNode ¶
type ManagedNode struct { Type ManagedNodeCacheOperationType NodeId int Chain *Chain Network *Network PublicKey string Out chan ManagedNode NodeIdsOut chan []int NodeIdSettingsOut chan ManagedNodeSettings PublicKeysOut chan []string }
type ManagedNodeCacheOperationType ¶
type ManagedNodeCacheOperationType uint
const ( READ_ALL_TORQ_NODE ManagedNodeCacheOperationType = iota WRITE_INACTIVE_TORQ_NODE READ_ALL_TORQ_NODEIDS READ_ALL_TORQ_PUBLICKEYS READ_ACTIVE_TORQ_NODE WRITE_ACTIVE_TORQ_NODE READ_ACTIVE_TORQ_NODEIDS READ_ACTIVE_TORQ_PUBLICKEYS READ_ACTIVE_CHANNEL_NODE READ_CHANNEL_NODE WRITE_ACTIVE_CHANNEL_NODE WRITE_INACTIVE_CHANNEL_NODE INACTIVATE_CHANNEL_NODE READ_ALL_CHANNEL_NODEIDS READ_ALL_CHANNEL_PUBLICKEYS READ_NODE_SETTINGS )
type ManagedNodeSettings ¶
type ManagedNodeSettings struct { NodeId int Chain Chain Network Network PublicKey string Status Status }
func GetNodeSettingsByNodeId ¶
func GetNodeSettingsByNodeId(nodeId int) ManagedNodeSettings
type ManagedSettings ¶
type ManagedSettings struct { Type ManagedSettingsCacheOperationType DefaultLanguage string PreferredTimeZone string DefaultDateRange string WeekStartsOn string Out chan ManagedSettings }
func GetSettings ¶
func GetSettings() ManagedSettings
type ManagedSettingsCacheOperationType ¶
type ManagedSettingsCacheOperationType uint
const ( // READ please provide Out READ ManagedSettingsCacheOperationType = iota // WRITE please provide defaultLanguage, preferredTimeZone, defaultDateRange and weekStartsOn WRITE )
type Network ¶
type Network int
func GetNetwork ¶
GetNetwork defaults to MainNet when no match is found
Click to show internal directories.
Click to hide internal directories.