Documentation ¶
Index ¶
- Variables
- type AddMxid
- type AddToLists
- type Comment
- type CommentConnection
- type CommentEdge
- type CommentEntry
- type CommentList
- type CreateEntry
- type CreateList
- type Entry
- type EntryArrayFilter
- type EntryConnection
- type EntryEdge
- type EntryFilter
- type EntrySort
- type HashCheckerConfig
- type HashCheckerConfigUpdate
- type HashCheckerMode
- type IDArrayFilter
- type IntFilter
- type List
- type ListArrayFilter
- type ListConnection
- type ListEdge
- type ListFilter
- type ListSort
- type ListSubscriptionUpdate
- type Login
- type PageInfo
- type Register
- type RemoveFromLists
- type RemoveMxid
- type Room
- type RoomConfigUpdate
- type RoomConnection
- type RoomEdge
- type RoomFilter
- type SortDirection
- type SortRule
- type StringArrayFilter
- type StringFilter
- type TimestampFilter
- type User
- type UserArrayFilter
- type UserConnection
- type UserEdge
- type UserFilter
- type UserRole
- type UserSort
Constants ¶
This section is empty.
Variables ¶
View Source
var AllHashCheckerMode = []HashCheckerMode{ HashCheckerModeNotice, HashCheckerModeDelete, HashCheckerModeMute, HashCheckerModeBan, }
View Source
var AllSortDirection = []SortDirection{ SortDirectionAsc, SortDirectionDesc, }
View Source
var AllUserRole = []UserRole{ UserRoleAdmin, UserRoleUser, UserRoleUnauthenticated, }
Functions ¶
This section is empty.
Types ¶
type AddToLists ¶
type Comment ¶
type Comment struct { Timestamp time.Time `json:"timestamp"` AuthorID *primitive.ObjectID Content string `json:"content"` }
func MakeComment ¶
type CommentConnection ¶
type CommentConnection struct { PageInfo *PageInfo `json:"pageInfo"` Edges []*CommentEdge `json:"edges"` }
type CommentEdge ¶
type CommentEntry ¶
type CommentList ¶
type CreateEntry ¶
type CreateList ¶
type Entry ¶
type EntryArrayFilter ¶
type EntryArrayFilter struct { ContainsAll []*EntryFilter `json:"containsAll"` ContainsOne []*EntryFilter `json:"containsOne"` Length *int `json:"length"` }
type EntryConnection ¶
type EntryFilter ¶
type EntryFilter struct { ID *string `json:"id"` HashValue *StringFilter `json:"hashValue"` Tags *StringArrayFilter `json:"tags"` AddedBy *string `json:"addedBy"` Timestamp *TimestampFilter `json:"timestamp"` PartOf *IDArrayFilter `json:"partOf"` }
type HashCheckerConfig ¶
type HashCheckerConfig struct { ChatNotice bool `json:"chatNotice"` HashCheckMode HashCheckerMode `json:"hashCheckMode"` SubscribedLists []string `json:"subscribedLists"` }
type HashCheckerConfigUpdate ¶
type HashCheckerConfigUpdate struct { ChatNotice *bool `json:"chatNotice"` HashCheckMode *HashCheckerMode `json:"hashCheckMode"` }
type HashCheckerMode ¶
type HashCheckerMode string
const ( HashCheckerModeNotice HashCheckerMode = "NOTICE" HashCheckerModeDelete HashCheckerMode = "DELETE" HashCheckerModeMute HashCheckerMode = "MUTE" HashCheckerModeBan HashCheckerMode = "BAN" )
func (HashCheckerMode) IsValid ¶
func (e HashCheckerMode) IsValid() bool
func (HashCheckerMode) MarshalGQL ¶
func (e HashCheckerMode) MarshalGQL(w io.Writer)
func (HashCheckerMode) String ¶
func (e HashCheckerMode) String() string
func (*HashCheckerMode) UnmarshalGQL ¶
func (e *HashCheckerMode) UnmarshalGQL(v interface{}) error
type IDArrayFilter ¶
type List ¶
type List struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` RawComments []*model.DBComment MaintainerIDs []*primitive.ObjectID CreatorID primitive.ObjectID }
func MakeList ¶
func MakeList(dbList *model.DBHashList) *List
type ListArrayFilter ¶
type ListArrayFilter struct { ContainsAll []*ListFilter `json:"containsAll"` ContainsOne []*ListFilter `json:"containsOne"` Length *int `json:"length"` }
type ListConnection ¶
type ListFilter ¶
type ListFilter struct { ID *string `json:"id"` Name *StringFilter `json:"name"` Tags *StringArrayFilter `json:"tags"` Maintainers *IDArrayFilter `json:"maintainers"` }
type ListSubscriptionUpdate ¶
type RemoveFromLists ¶
type RemoveMxid ¶
type RemoveMxid struct {
Mxid string `json:"mxid"`
}
type Room ¶
type Room struct { ID string `json:"id"` Active bool `json:"active"` Deactivated bool `json:"deactivated"` Name string `json:"name"` RoomID string `json:"roomId"` Debug bool `json:"debug"` AdminPowerLevel int `json:"adminPowerLevel"` HashCheckerConfig *HashCheckerConfig `json:"hashCheckerConfig"` }
func MakeRoom ¶
func MakeRoom(room *config.RoomConfig) *Room
type RoomConfigUpdate ¶
type RoomConfigUpdate struct { ID string `json:"id"` Deactivate *bool `json:"deactivate"` Debug *bool `json:"debug"` AdminPowerLevel *int `json:"adminPowerLevel"` HashChecker *HashCheckerConfigUpdate `json:"hashChecker"` }
type RoomConnection ¶
type RoomFilter ¶
type SortDirection ¶
type SortDirection string
const ( SortDirectionAsc SortDirection = "ASC" SortDirectionDesc SortDirection = "DESC" )
func (SortDirection) IsValid ¶
func (e SortDirection) IsValid() bool
func (SortDirection) MarshalGQL ¶
func (e SortDirection) MarshalGQL(w io.Writer)
func (SortDirection) String ¶
func (e SortDirection) String() string
func (*SortDirection) UnmarshalGQL ¶
func (e *SortDirection) UnmarshalGQL(v interface{}) error
type SortRule ¶
type SortRule struct {
Direction SortDirection `json:"direction"`
}
type StringArrayFilter ¶
type StringArrayFilter struct { ContainsAll []*string `json:"containsAll"` ElemMatch *StringFilter `json:"elemMatch"` Length *int `json:"length"` }
type StringFilter ¶
type TimestampFilter ¶
type User ¶
type UserArrayFilter ¶
type UserArrayFilter struct { ContainsAll []*UserFilter `json:"containsAll"` ContainsOne []*UserFilter `json:"containsOne"` Length *int `json:"length"` }
type UserConnection ¶
type UserFilter ¶
type UserFilter struct { ID *string `json:"id"` Username *StringFilter `json:"username"` MatrixLinks *StringArrayFilter `json:"matrixLinks"` PendingMatrixLinks *StringArrayFilter `json:"pendingMatrixLinks"` Admin *bool `json:"admin"` }
Click to show internal directories.
Click to hide internal directories.