app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Unlicense Imports: 12 Imported by: 0

Documentation

Overview

Package app implements the realy nostr relay with a simple follow/mute list authentication scheme and the new HTTP REST based protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonitorResources

func MonitorResources(c context.T)

Types

type List

type List map[string]struct{}

type Relay

type Relay struct {
	sync.Mutex
	*config.C
	Store store.I
}

func (*Relay) AcceptEvent

func (r *Relay) AcceptEvent(
	c context.T, evt *event.E, hr *http.Request,
	origin string, authedPubkey []byte,
) (accept bool, notice string, afterSave func())

func (*Relay) AcceptFilter

func (r *Relay) AcceptFilter(
	c context.T, hr *http.Request, f *filter.S,
	authedPubkey []byte,
) (allowed *filter.S, ok bool, modified bool)

func (*Relay) AcceptReq

func (r *Relay) AcceptReq(
	c context.T, hr *http.Request, id []byte,
	ff *filters.T, authedPubkey []byte,
) (allowed *filters.T, ok bool, modified bool)

func (*Relay) Init

func (r *Relay) Init() (err error)

func (*Relay) Name

func (r *Relay) Name() string

func (*Relay) Storage

func (r *Relay) Storage() store.I

Directories

Path Synopsis
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files.
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files.
options
Package options provides some option configurations for the realy relay.
Package options provides some option configurations for the realy relay.
publish
Package publisher is a singleton package that keeps track of subscriptions in both websockets and http SSE, including managing the authentication state of a connection.
Package publisher is a singleton package that keeps track of subscriptions in both websockets and http SSE, including managing the authentication state of a connection.

Jump to

Keyboard shortcuts

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