server

package
v0.0.0-...-0e28eda Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Relay) error

func WithContact

func WithContact(contact string) Option

func WithDescription

func WithDescription(description string) Option

func WithMaxCache

func WithMaxCache(max int) Option

func WithMaxEventSize

func WithMaxEventSize(max int) Option

func WithName

func WithName(name string) Option

func WithPubKey

func WithPubKey(pubKey string) Option

func WithSoftwareURL

func WithSoftwareURL(software string) Option

func WithStorage

func WithStorage(storage *postgresql.PostgresBackend) Option

type Relay

type Relay struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Relay

func (*Relay) AcceptEvent

func (r *Relay) AcceptEvent(ctx context.Context, evt *nostr.Event) bool

func (*Relay) GetNIP11InformationDocument

func (r *Relay) GetNIP11InformationDocument() nip11.RelayInformationDocument

func (*Relay) Init

func (r *Relay) Init() error

func (*Relay) Name

func (r *Relay) Name() string

func (*Relay) Storage

func (r *Relay) Storage(ctx context.Context) relayer.Storage

Jump to

Keyboard shortcuts

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