Documentation
¶
Index ¶
- func GetGroupIDFromEvent(event *nostr.Event) string
- type Group
- type Options
- type State
- func (s *State) AdminsQueryHandler(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (s *State) ApplyModerationAction(ctx context.Context, event *nostr.Event)
- func (s *State) GetGroupFromEvent(event *nostr.Event) *Group
- func (s *State) MembersQueryHandler(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (s *State) MetadataQueryHandler(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (s *State) NewGroup(id string) *Group
- func (s *State) NormalEventQuery(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (s *State) PreventWritingOfEventsJustDeleted(ctx context.Context, event *nostr.Event) (reject bool, msg string)
- func (s *State) ReactToJoinRequest(ctx context.Context, event *nostr.Event)
- func (s *State) RequireHTagForExistingGroup(ctx context.Context, event *nostr.Event) (reject bool, msg string)
- func (s *State) RequireKindAndSingleGroupIDOrSpecificEventReference(ctx context.Context, filter nostr.Filter) (reject bool, msg string)
- func (s *State) RequireModerationEventsToBeRecent(ctx context.Context, event *nostr.Event) (reject bool, msg string)
- func (s *State) RestrictInvalidModerationActions(ctx context.Context, event *nostr.Event) (reject bool, msg string)
- func (s *State) RestrictWritesBasedOnGroupRules(ctx context.Context, event *nostr.Event) (reject bool, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGroupIDFromEvent ¶
func GetGroupIDFromEvent(event *nostr.Event) string
Types ¶
type State ¶
type State struct { Domain string Groups *xsync.MapOf[string, *Group] DB eventstore.Store Relay interface { BroadcastEvent(*nostr.Event) AddEvent(context.Context, *nostr.Event) (skipBroadcast bool, writeError error) } GetAuthed func(context.Context) string // contains filtered or unexported fields }
func (*State) AdminsQueryHandler ¶ added in v0.3.0
func (*State) ApplyModerationAction ¶ added in v0.3.0
func (*State) GetGroupFromEvent ¶
func (*State) MembersQueryHandler ¶ added in v0.3.0
func (*State) MetadataQueryHandler ¶ added in v0.3.0
func (*State) NormalEventQuery ¶ added in v0.3.0
func (*State) PreventWritingOfEventsJustDeleted ¶ added in v0.3.0
func (*State) ReactToJoinRequest ¶ added in v0.3.0
func (*State) RequireHTagForExistingGroup ¶ added in v0.3.0
func (*State) RequireKindAndSingleGroupIDOrSpecificEventReference ¶ added in v0.3.0
func (*State) RequireModerationEventsToBeRecent ¶ added in v0.3.0
func (*State) RestrictInvalidModerationActions ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.