global

package
v0.0.0-...-8c43f31 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	System = sdk.NewSystem(sdk.WithStore(bb))
)

Functions

func Init

func Init(ctx context.Context, keyOrBunker string, password string) error

func JoinGroup

func JoinGroup(ctx context.Context, gad nip29.GroupAddress) error

func LeaveGroup

func LeaveGroup(ctx context.Context, gad nip29.GroupAddress) error

Types

type Group

type Group struct {
	nip29.Group
	NewMessage     chan *nostr.Event
	StoredMessages chan []*nostr.Event
	// contains filtered or unexported fields
}

func GetGroup

func GetGroup(ctx context.Context, gad nip29.GroupAddress) *Group

func (*Group) OnUpdated

func (g *Group) OnUpdated(fn func())

func (Group) SendChatMessage

func (g Group) SendChatMessage(ctx context.Context, text string, replyTo string) error

type Me

type Me struct {
	User

	MetadataUpdated chan struct{}
	JoinedGroup     chan *Group
	LeftGroup       chan nip29.GroupAddress
	// contains filtered or unexported fields
}

func GetMe

func GetMe(ctx context.Context) *Me

func (*Me) InGroup

func (me *Me) InGroup(gad nip29.GroupAddress) bool

func (*Me) OnListUpdated

func (me *Me) OnListUpdated(fn func())

type Relay

type Relay struct {
	URL   string
	Image string
	Name  string

	GroupsList   []nip29.Group
	GroupsLoaded chan struct{}
}

func LoadRelay

func LoadRelay(ctx context.Context, url string) (*Relay, error)

type User

type User struct {
	sdk.ProfileMetadata
}

func GetUser

func GetUser(ctx context.Context, pubkey string) User

func SearchUsers

func SearchUsers(ctx context.Context, query string) []User

Jump to

Keyboard shortcuts

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