realy

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Unlicense Imports: 53 Imported by: 0

README

Nostr Relay Framework -- use it to implement your own custom relay.

There is an example/reference implementation at basic.

GoDoc

Documentation

Index

Constants

View Source
const (
	ChallengeHRP = "nchal"

	ChallengeLength = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

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

type Server

type Server struct {
	Ctx    cx
	Cancel context.F

	Addr st
	// contains filtered or unexported fields
}

func NewServer

func NewServer(sp ServerParams, opts ...options.O) (*Server, er)

func (*Server) AuthFail added in v1.2.21

func (s *Server) AuthFail(w http.ResponseWriter)

func (*Server) HTTPAuth added in v1.2.21

func (s *Server) HTTPAuth(r *http.Request) (authed bo)

func (*Server) HandleAdmin added in v1.0.16

func (s *Server) HandleAdmin(w http.ResponseWriter, r *http.Request)

func (*Server) HandleNIP11

func (s *Server) HandleNIP11(w http.ResponseWriter, r *http.Request)

func (*Server) HandleWebsocket

func (s *Server) HandleWebsocket(w http.ResponseWriter, r *http.Request)

func (*Server) Router

func (s *Server) Router() *http.ServeMux

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Start

func (s *Server) Start(host st, port int, started ...chan bo) er

type ServerParams added in v1.2.19

type ServerParams struct {
	Ctx                  cx
	Cancel               context.F
	Rl                   relay.I
	DbPath               st
	MaxLimit             no
	AdminUser, AdminPass st
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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