pyramid

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionInvite  = "invite"
	ActionDrop    = "drop"
	ActionLeave   = "leave"
	ActionDisable = "disable"
	ActionEnable  = "enable"
)

Variables

View Source
var (
	AbsoluteKey nostr.PubKey
	Members     = xsync.NewMapOf[nostr.PubKey, Member]()
)

Functions

func AddAction

func AddAction(type_ Action, author nostr.PubKey, target nostr.PubKey) error

func CanInviteMore

func CanInviteMore(pubkey nostr.PubKey) bool

func GetChildren

func GetChildren(parent nostr.PubKey) iter.Seq2[nostr.PubKey, Member]

func GetInviteCount added in v1.0.25

func GetInviteCount(pubkey nostr.PubKey) int

func GetInviters added in v1.0.11

func GetInviters(pubkey nostr.PubKey) []nostr.PubKey

func GetLevel added in v1.0.22

func GetLevel(pubkey nostr.PubKey) int

func GetMaxBlossomUploadSizeFor added in v1.1.0

func GetMaxBlossomUploadSizeFor(pubkey nostr.PubKey) int

func GetMaxInvitesFor added in v1.0.22

func GetMaxInvitesFor(pubkey nostr.PubKey) int

func HasRootUsers

func HasRootUsers() bool

func HasSingleRootAncestor added in v1.0.19

func HasSingleRootAncestor(ancestor nostr.PubKey, target nostr.PubKey) bool

func IsAncestorOf

func IsAncestorOf(ancestor nostr.PubKey, target nostr.PubKey) bool

func IsMember

func IsMember(pubkey nostr.PubKey) bool

func IsParentOf

func IsParentOf(parent nostr.PubKey, target nostr.PubKey) bool

func IsRoot

func IsRoot(pubkey nostr.PubKey) bool

func LoadManagement

func LoadManagement() error

Types

type Action

type Action string

type Member added in v1.0.19

type Member struct {
	Parents []nostr.PubKey
	Removed bool
}

Jump to

Keyboard shortcuts

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