Documentation ¶
Index ¶
- Variables
- type Group
- func (group Group) GetRoleByName(name string) *Role
- func (group *Group) MergeInAdminsEvent(evt *nostr.Event) error
- func (group *Group) MergeInMembersEvent(evt *nostr.Event) error
- func (group *Group) MergeInMetadataEvent(evt *nostr.Event) error
- func (group Group) String() string
- func (group Group) ToAdminsEvent() *nostr.Event
- func (group Group) ToMembersEvent() *nostr.Event
- func (group Group) ToMetadataEvent() *nostr.Event
- func (group Group) ToRolesEvent() *nostr.Event
- type GroupAddress
- type KindRange
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var MetadataEventKinds = KindRange{
nostr.KindSimpleGroupMetadata,
nostr.KindSimpleGroupAdmins,
nostr.KindSimpleGroupMembers,
nostr.KindSimpleGroupRoles,
}
View Source
var ModerationEventKinds = KindRange{
nostr.KindSimpleGroupPutUser,
nostr.KindSimpleGroupRemoveUser,
nostr.KindSimpleGroupEditMetadata,
nostr.KindSimpleGroupDeleteEvent,
nostr.KindSimpleGroupCreateGroup,
nostr.KindSimpleGroupDeleteGroup,
nostr.KindSimpleGroupCreateInvite,
}
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct { Address GroupAddress Name string Picture string About string Members map[string][]*Role Private bool Closed bool Roles []*Role LastMetadataUpdate nostr.Timestamp LastAdminsUpdate nostr.Timestamp LastMembersUpdate nostr.Timestamp LastRolesUpdate nostr.Timestamp }
func NewGroupFromMetadataEvent ¶ added in v0.33.0
func (Group) GetRoleByName ¶ added in v0.42.1
func (*Group) MergeInAdminsEvent ¶
func (*Group) MergeInMembersEvent ¶
func (*Group) MergeInMetadataEvent ¶
func (Group) ToAdminsEvent ¶
func (group Group) ToAdminsEvent() *nostr.Event
func (Group) ToMembersEvent ¶
func (group Group) ToMembersEvent() *nostr.Event
func (Group) ToMetadataEvent ¶
func (group Group) ToMetadataEvent() *nostr.Event
func (Group) ToRolesEvent ¶ added in v0.42.1
func (group Group) ToRolesEvent() *nostr.Event
type GroupAddress ¶ added in v0.31.0
func ParseGroupAddress ¶ added in v0.31.0
func ParseGroupAddress(raw string) (GroupAddress, error)
func (GroupAddress) Equals ¶ added in v0.31.0
func (gid GroupAddress) Equals(gid2 GroupAddress) bool
func (GroupAddress) IsValid ¶ added in v0.31.0
func (gid GroupAddress) IsValid() bool
func (GroupAddress) String ¶ added in v0.31.0
func (gid GroupAddress) String() string
Click to show internal directories.
Click to hide internal directories.