Documentation ¶
Index ¶
- Variables
- func AddEvent(relay Relay, evt nostr.Event) (accepted bool, message string)
- func GetListeningFilters() nostr.Filters
- func Start(relay Relay)
- type AdvancedDeleter
- type AdvancedQuerier
- type AdvancedSaver
- type CustomWebSocketHandler
- type Informationer
- type Injector
- type Listener
- type Notice
- type Relay
- type Settings
- type Storage
- type WebSocket
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = log
View Source
var Router = mux.NewRouter()
Functions ¶
func GetListeningFilters ¶
func GetListeningFilters() nostr.Filters
Types ¶
type AdvancedDeleter ¶ added in v1.5.0
type AdvancedQuerier ¶ added in v1.5.0
type AdvancedQuerier interface { BeforeQuery(*nostr.Filter) AfterQuery([]nostr.Event, *nostr.Filter) }
type AdvancedSaver ¶ added in v1.5.0
type AdvancedSaver interface { BeforeSave(*nostr.Event) AfterSave(*nostr.Event) }
type CustomWebSocketHandler ¶ added in v1.5.2
type CustomWebSocketHandler interface {
HandleUnknownType(ws *WebSocket, typ string, request []json.RawMessage)
}
type Informationer ¶ added in v1.5.0
type Informationer interface {
GetNIP11InformationDocument() nip11.RelayInformationDocument
}
type Relay ¶
type Relay interface { Name() string Init() error OnInitialized() AcceptEvent(*nostr.Event) bool Storage() Storage }
relay
type Storage ¶ added in v1.5.0
type Storage interface { Init() error QueryEvents(filter *nostr.Filter) (events []nostr.Event, err error) DeleteEvent(id string, pubkey string) error SaveEvent(event *nostr.Event) error }
storage
Source Files ¶
Click to show internal directories.
Click to hide internal directories.