server

package
v0.0.0-...-add3e8a Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

type NostrWellKnown

type NostrWellKnown struct {
	Names map[string]string
}

type Option

type Option func(s *Server) error

func WithDomain

func WithDomain(domain string) Option

func WithHandler

func WithHandler(handler http.Handler) Option

func WithHost

func WithHost(host string) Option

func WithPort

func WithPort(port int) Option

func WithRegisterStore

func WithRegisterStore(store *didstorage.RegisterStore) Option

func WithStore

func WithStore(store Store) Option

type PayInfo

type PayInfo struct {
	PaymentHash string `json:"payment_hash"`
	Amount      int    `json:"amount"`
}

type PaymentBroker

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

func NewBroker

func NewBroker() *PaymentBroker

func (*PaymentBroker) BroadcastPayment

func (b *PaymentBroker) BroadcastPayment(id string)

func (*PaymentBroker) Start

func (b *PaymentBroker) Start()

func (*PaymentBroker) WaitForPayment

func (b *PaymentBroker) WaitForPayment(w http.ResponseWriter, r *http.Request)

type RegisterRequest

type RegisterRequest struct {
	ID       string                `json:"id"`
	Keys     []didstorage.KeyInput `json:"keys"`
	Services []did.Service         `json:"services"`
}

type Server

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

func New

func New(opts ...Option) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

type Store

type Store interface {
	Register(doc *did.Document) error
	Resolve(id string) (*did.Document, error)
	Delete(id string) error
}

func NewStore

func NewStore(domain, storageDir, bucket string) (Store, error)

Jump to

Keyboard shortcuts

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