Documentation ¶
Index ¶
- func MonitorResources(c context.T)
- type B
- type Ctx
- type E
- type N
- type Relay
- func (r *Relay) AcceptEvent(c context.T, evt *event.T, hr *http.Request, origin S, authedPubkey B) (accept bool, notice S, afterSave func())
- func (r *Relay) AcceptReq(c Ctx, hr *http.Request, id B, ff *filters.T, authedPubkey B) (allowed *filters.T, ok bool)
- func (r *Relay) AuthEnabled() bool
- func (r *Relay) CheckOwnerLists(c context.T)
- func (r *Relay) Init() (err E)
- func (r *Relay) Name() S
- func (r *Relay) ServiceUrl(req *http.Request) (s S)
- func (r *Relay) Storage(c context.T) store.I
- type S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MonitorResources ¶
Types ¶
type Relay ¶
type Relay struct { sync.Mutex *config.C Store store.I // Owners' pubkeys Owners []B Followed, OwnersFollowed, Muted map[S]struct{} // OwnersFollowLists are the event IDs of owners follow lists, which must not be deleted, only // replaced. OwnersFollowLists []B // OwnersMuteLists are the event IDs of owners mute lists, which must not be deleted, only // replaced. OwnersMuteLists []B }
func (*Relay) AcceptEvent ¶
func (*Relay) AuthEnabled ¶
func (*Relay) CheckOwnerLists ¶
CheckOwnerLists regenerates the owner follow and mute lists if they are empty.
It also adds the followed npubs of the follows.
func (*Relay) ServiceUrl ¶
ServiceUrl returns the address of the relay to send back in auth responses. If auth is disabled this returns an empty string.
Click to show internal directories.
Click to hide internal directories.