ui

package
v0.0.0-...-75f766f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

blocks display in block mode, lower level than other modes

Index

Constants

View Source
const (
	CONTENT_FILTER_ALL   string = "ALL"
	CONTENT_FILTER_MUTED string = "MUTED"
	CONTENT_FILTER_MINE  string = "MINE"
)
View Source
const PUBQUEUE_PAGE = "pubqueue"

Variables

View Source
var ChainAuthSupportedTrxTypes = []string{
	"POST",
	"ANNOUNCE",
	"REQ_BLOCK_FORWARD",
	"REQ_BLOCK_BACKWARD",
	"ASK_PEERID",
	"BLOCK_SYNCED",
	"BLOCK_PRODUCED",
}
View Source
var FILTERS = map[string]func(api.ContentStruct) bool{
	CONTENT_FILTER_ALL: func(content api.ContentStruct) bool {
		return !contains(config.RumConfig.Quorum.Muted, content.Publisher)
	},
	CONTENT_FILTER_MUTED: func(content api.ContentStruct) bool {
		return contains(config.RumConfig.Quorum.Muted, content.Publisher)
	},
	CONTENT_FILTER_MINE: func(content api.ContentStruct) bool {
		return quorumData.GetNodeInfo().NodePubKey == content.Publisher
	},
}
View Source
var PANNEL_CHAIN_AUTH_LIST_FORM = "form.chain.auth.list"
View Source
var PANNEL_CHAIN_AUTH_MODE_FORM = "form.chain.auth.mode"
View Source
var PANNEL_CHAIN_CONFIG_PAGE = "chain.config"
View Source
var PANNEL_GROUP_CONFIG_FORM = "form.group.config"
View Source
var PANNEL_GROUP_FORM = "form.group"

Functions

func AdminRefreshAll

func AdminRefreshAll(groupId string)

func BlockCMDJump

func BlockCMDJump(cmd string)

func Blocks

func Blocks()

func BlocksExit

func BlocksExit()

func BlocksRefreshAll

func BlocksRefreshAll()

func ChainAuthListForm

func ChainAuthListForm(groupId, listType, action, pubkey string, trxTypes []string)

func ChainAuthModeForm

func ChainAuthModeForm(groupId, trxType, mode string)

func ChainConfigPage

func ChainConfigPage(groupId string)

func ChainConfigRefreshAll

func ChainConfigRefreshAll(groupId string)

func CreateGroupForm

func CreateGroupForm()

func Error

func Error(title, text string)

func GroupAdminPage

func GroupAdminPage(groupId string)

func GroupConfigFormShow

func GroupConfigFormShow(groupId string, item *handlers.AppConfigKeyItem)

func Help

func Help()

Help displays the help and keybindings.

func Info

func Info(title, text string)

func Init

func Init()

func NetworkPage

func NetworkPage()

func NetworkPageExit

func NetworkPageExit()

func NetworkRefreshAll

func NetworkRefreshAll()

func Pubqueue

func Pubqueue()

func PubqueueExit

func PubqueueExit()

func PubqueueRefreshAll

func PubqueueRefreshAll()

func Quorum

func Quorum(apiServer string)

Quorum function will init the main widget it will start a ticker to keep refreshing data from api server

func QuorumApplyTokenHandler

func QuorumApplyTokenHandler(cmd string)

CMD /token.apply handler

func QuorumBackupHandler

func QuorumBackupHandler()

func QuorumCmdJoinHandler

func QuorumCmdJoinHandler(cmd string)

CMD /join handler

func QuorumCmdSendHandler

func QuorumCmdSendHandler(cmd string)

CMD /send handler

func QuorumDelGroupHandler

func QuorumDelGroupHandler()

CMD /group.delete handler

func QuorumExit

func QuorumExit()

func QuorumForceSyncGroupHandler

func QuorumForceSyncGroupHandler()

CMD /group.sync handler

func QuorumGetGroupSeedHandler

func QuorumGetGroupSeedHandler()

func QuorumGroupAdminHandler

func QuorumGroupAdminHandler()

CMD /group.admin

func QuorumGroupChainConfigHandler

func QuorumGroupChainConfigHandler()

func QuorumGroupNickHandler

func QuorumGroupNickHandler(cmd string)

CMD /nick handler

func QuorumLeaveGroupHandler

func QuorumLeaveGroupHandler()

CMD /group.leave handler

func QuorumNewGroupHandler

func QuorumNewGroupHandler()

CMD /group.create handler

func QuorumRefreshAll

func QuorumRefreshAll()

Refresh all data update ui if new content comes in run in a goroutine

func SaveSeedToTmpFile

func SaveSeedToTmpFile(seedBytes []byte) (*os.File, error)

func SaveToTmpFile

func SaveToTmpFile(bytes []byte, prefix string) (*os.File, error)

func Welcome

func Welcome()

func YesNo

func YesNo(text string) bool

YesNo will block on channel so better to run in a goroutine

Types

type ChainAuthListFormParam

type ChainAuthListFormParam struct {
	GroupId  string
	ListType string // allow or deny
	Action   string // add or remove
	Pubkey   string // which key to add
	TrxTypes []string
	Memo     string
}

type ChainAuthModeFormParam

type ChainAuthModeFormParam struct {
	GroupId string
	TrxType string
	Mode    string
}

Jump to

Keyboard shortcuts

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