listserver

package
v0.0.0-...-51444de Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Subject string
}

type Response

type Response struct {
	Subject string                               `json:"subject"`
	Results map[string]ResponseFromSingleAccount `json:"results"`

	Listitems map[string]string `json:"listitems,omitempty"` // Deprecated
	Rev       string            `json:"rev,omitempty"`       // Deprecated
	Cid       string            `json:"cid,omitempty"`       // Deprecated
}

type ResponseFromSingleAccount

type ResponseFromSingleAccount struct {
	Listitems map[string]string `json:"listitems"`
	Rev       string            `json:"rev"`
	Cid       string            `json:"cid"`
}

type Server

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

Server keeps track of all `app.bsky.graph.listitem`s for a given account, and responds to membership queries over HTTP.

To ensure that you're not missing any records, you need to connect to firehose *before* calling Sync().

func New

func New(client *xrpc.Client, did ...string) *Server

func (*Server) List

func (s *Server) List(uri string) (didset.QueryableDIDSet, error)

func (*Server) ServeHTTP

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

func (*Server) Sync

func (s *Server) Sync(ctx context.Context) error

func (*Server) UpdateFromFirehose

func (s *Server) UpdateFromFirehose() firehose.Hook

Jump to

Keyboard shortcuts

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