Documentation ¶
Index ¶
- func MonitorResources(c cx)
- type List
- type Relay
- func (r *Relay) AcceptEvent(c cx, evt *event.T, hr *http.Request, origin st, authedPubkey by) (accept bo, notice st, afterSave func())
- func (r *Relay) AcceptReq(c cx, hr *http.Request, id by, ff *filters.T, authedPubkey by) (allowed *filters.T, ok bo)
- func (r *Relay) AuthEnabled() bo
- func (r *Relay) CheckOwnerLists(c cx)
- func (r *Relay) Init() (err er)
- func (r *Relay) Name() st
- func (r *Relay) NoLimiter(pubKey by) (ok bo)
- func (r *Relay) ServiceUrl(req *http.Request) (s st)
- func (r *Relay) Storage() store.I
- func (r *Relay) ZeroLists()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MonitorResources ¶
func MonitorResources(c cx)
Types ¶
type Relay ¶
type Relay struct { sync.Mutex *config.C Store store.I // Owners' pubkeys Owners []by // Followed are the pubkeys that are in the Owners' follow lists and have full // access permission. Followed List // OwnersFollowed are "guests" of the Followed and have full access but with // rate limiting enabled. OwnersFollowed List // Muted are on Owners' mute lists and do not have write access to the relay, // even if they would be in the OwnersFollowed list, they can only read. Muted List // OwnersFollowLists are the event IDs of owners follow lists, which must not be // deleted, only replaced. OwnersFollowLists []by // OwnersMuteLists are the event IDs of owners mute lists, which must not be // deleted, only replaced. OwnersMuteLists []by }
func (*Relay) AcceptEvent ¶
func (*Relay) AuthEnabled ¶
func (r *Relay) AuthEnabled() bo
func (*Relay) CheckOwnerLists ¶
func (r *Relay) CheckOwnerLists(c cx)
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.