Documentation ¶
Index ¶
- Constants
- func Body(event matrix.Event) (interface{}, error)
- func RegisterEventBody(eventKind EventKind, eventType string, contentType reflect.Type)
- func RegisterMultiEventBody(eventKind EventKind, eventType string, validator Validator, ...)
- type EncryptedFile
- type EventKind
- type FileInfo
- type GuestAccess
- type HistoryVisibility
- type ImageInfo
- type JoinRule
- type MDirect
- type MFullyRead
- type MIgnoredUsersList
- type MPresence
- type MReceipt
- type MRoomAliases
- type MRoomCanonicalAlias
- type MRoomCreate
- type MRoomGuestAccess
- type MRoomHistoryVisibility
- type MRoomJoinRules
- type MRoomMember
- type MRoomMessage
- type MRoomMessageAudio
- type MRoomMessageEmote
- type MRoomMessageFile
- type MRoomMessageImage
- type MRoomMessageLocation
- type MRoomMessageNotice
- type MRoomMessageServerNotice
- type MRoomMessageText
- type MRoomMessageVideo
- type MRoomPowerLevels
- type MRoomTombstone
- type MSticker
- type MTag
- type MTyping
- type Presence
- type ServerNoticeType
- type ThumbnailInfo
- type UnknownTypeError
- type Validator
Constants ¶
View Source
const ( Public string = "public" Knock string = "knock" Invite string = "invite" Private string = "private" )
View Source
const ( Invited HistoryVisibility = "invited" Joined = "joined" WorldReadable = "world_readable" )
Variables ¶
This section is empty.
Functions ¶
func RegisterEventBody ¶
Types ¶
type EncryptedFile ¶
type EncryptedFile struct { }
type FileInfo ¶
type FileInfo struct { Mimetype string `json:"mimetype" mapstructure:"mimetype"` Size int `json:"size" mapstructure:"size"` ThumbnailURL string `json:"thumbnial_url" mapstructure:"thumbnail_url"` ThumbnailFile EncryptedFile `json:"thumbnail_file" mapstructure:"thumbnail_file"` ThumbnailInfo ThumbnailInfo `json:"thumbnail_info" mapstructure:"thumbnail_info"` }
type GuestAccess ¶
type GuestAccess string
const ( CanJoin GuestAccess = "can_join" Forbidden = "forbidden" )
type HistoryVisibility ¶
type HistoryVisibility string
type ImageInfo ¶
type ImageInfo struct { H int `json:"h" mapstructure:"h"` W int `json:"w" mapstructure:"w"` Mimetype string `json:"mimetype" mapstructure:"mimetype"` Size int `json:"size" mapstructure:"size"` ThumbnailURL string `json:"thumbnial_url" mapstructure:"thumbnail_url"` ThumbnailFile EncryptedFile `json:"thumbnail_file" mapstructure:"thumbnail_file"` ThumbnailInfo ThumbnailInfo `json:"thumbnail_info" mapstructure:"thumbnail_info"` }
type MFullyRead ¶
type MFullyRead struct {
EventID string `json:"event_id" mapstructure:"event_id"`
}
type MIgnoredUsersList ¶
type MIgnoredUsersList struct {
IgnoredUsers map[string]struct{} `json:"ignored_users" mapstructure:"ignored_users"`
}
type MPresence ¶
type MPresence struct { AvatarURL string `json:"avatar_url" mapstructure:"avatar_url"` Displayname string `json:"displayname" mapstructure:"displayname"` LastActiveAgo int `json:"last_active_ago" mapstructure:"last_active_ago"` Presence Presence `json:"presence" mapstructure:"presence"` CurrentlyActive bool `json:"currently_active" mapstructure:"currently_active"` StatusMsg string `json:"status_msg" mapstructure:"status_msg"` }
type MRoomAliases ¶
type MRoomAliases struct {
Aliases []string `json:"aliases" mapstructure:"aliases"`
}
type MRoomCanonicalAlias ¶
type MRoomCanonicalAlias struct {
Alias string `json:"alias" mapstructure:"alias"`
}
type MRoomCreate ¶
type MRoomCreate struct { Creator string `json:"creator" mapstructure:"creator"` Federate *bool `json:"m.federate" mapstructure:"m.federate"` RoomVersion *string `json:"room_version" mapstructure:"room_version"` Predecessor struct { RoomID string `json:"room_id" mapstructure:"room_id"` EventID string `json:"event_id" mapstructure:"event_id"` } `json:"predecessor" mapstructure:"predecessor"` }
type MRoomGuestAccess ¶
type MRoomGuestAccess struct {
GuestAccess GuestAccess `json:"guest_access" mapstructure:"guest_access"`
}
type MRoomHistoryVisibility ¶
type MRoomHistoryVisibility struct {
HistoryVisibility HistoryVisibility `json:"history_visibility" mapstructure:"history_visibility"`
}
type MRoomJoinRules ¶
type MRoomJoinRules struct {
JoinRule JoinRule `json:"join_rule" mapstructure:"join_rule"`
}
type MRoomMember ¶
type MRoomMember struct { AvatarURL *string `json:"avatar_url" mapstructure:"avatar_url"` Displayname *string `json:"displayname" mapstructure:"displayname"` Membership matrix.MembershipState `json:"membership" mapstructure:"membership"` IsDirect *bool `json:"is_direct" mapstructure:"is_direct"` ThirdPartyInvite *struct { DisplayName string `json:"display_name" mapstructure:"display_name"` Signed struct { MxID string `json:"mxid" mapstructure:"mxid"` Signatures interface{} `json:"signatures" mapstructure:"signatures"` Token string `json:"token" mapstructure:"token"` } `json:"signed" mapstructure:"signed"` } `json:"third_party_invite" mapstructure:"third_party_invite"` }
type MRoomMessage ¶
type MRoomMessageAudio ¶
type MRoomMessageAudio struct { MRoomMessage `mapstructure:",squash"` Info struct { Duration int `json:"duration" mapstructure:"duration"` Mimetype string `json:"mimetype" mapstructure:"mimetype"` Size int `json:"size" mapstructure:"size"` } URL string `json:"url" mapstructure:"url"` File EncryptedFile `json:"file" mapstructure:"file"` }
type MRoomMessageEmote ¶
type MRoomMessageEmote struct { MRoomMessage `mapstructure:",squash"` Format string `json:"format" mapstructure:"format"` FormattedBody string `json:"formatted_body"` }
type MRoomMessageFile ¶
type MRoomMessageFile struct { MRoomMessage `mapstructure:",squash"` Filename string `json:"filename" mapstructure:"filename"` Info FileInfo `json:"info" mapstructure:"info"` URL string `json:"url" mapstructure:"url"` File EncryptedFile `json:"file" mapstructure:"file"` }
type MRoomMessageImage ¶
type MRoomMessageImage struct { MRoomMessage `mapstructure:",squash"` Info ImageInfo `json:"info" mapstructure:"info"` URL string `json:"url" mapstructure:"url"` File EncryptedFile `json:"file" mapstructure:"file"` }
type MRoomMessageLocation ¶
type MRoomMessageLocation struct { MRoomMessage `mapstructure:",squash"` GeoURI string `json:"geo_uri" mapstructure:"geo_uri"` Info struct { ThumbnailURL string `json:"thumbnail_url" mapstructure:"thumbnail_url"` ThumbnailFile EncryptedFile `json:"thumbnail_file" mapstructure:"thumbnail_file"` ThumbnailInfo ThumbnailInfo `json:"thumbnail_info" mapstructure:"thumbnail_info"` } }
type MRoomMessageNotice ¶
type MRoomMessageNotice struct { MRoomMessage `mapstructure:",squash"` Format string `json:"format" mapstructure:"format"` FormattedBody string `json:"formatted_body"` }
type MRoomMessageServerNotice ¶
type MRoomMessageServerNotice struct { MRoomMessage ServerNoticeType ServerNoticeType `json:"server_notice_type" mapstructure:"server_notice_type"` AdminContact string `json:"admin_contact" mapstructure:"limit_type"` LimitType string `json:"limit_type" mapstructure:"limit_type"` }
type MRoomMessageText ¶
type MRoomMessageText struct { MRoomMessage `mapstructure:",squash"` Format string `json:"format" mapstructure:"format"` FormattedBody string `json:"formatted_body"` }
type MRoomMessageVideo ¶
type MRoomMessageVideo struct { MRoomMessage `mapstructure:",squash"` URL string `json:"url" mapstructure:"url"` File EncryptedFile `json:"file" mapstructure:"file"` Info struct { Duration int `json:"duration" mapstructure:"duration"` H int `json:"h" mapstructure:"h"` W int `json:"w" mapstructure:"w"` Mimetype string `json:"mimetype" mapstructure:"mimetype"` Size int `json:"size" mapstructure:"size"` ThumbnailURL string `json:"thumbnial_url" mapstructure:"thumbnail_url"` ThumbnailFile EncryptedFile `json:"thumbnail_file" mapstructure:"thumbnail_file"` ThumbnailInfo ThumbnailInfo `json:"thumbnail_info" mapstructure:"thumbnail_info"` } `json:"info" mapstructure:"info"` }
type MRoomPowerLevels ¶
type MRoomPowerLevels struct { Ban int `json:"ban" mapstructure:"ban"` Events map[string]int `json:"events" mapstructure:"events"` EventsDefault int `json:"events_default" mapstructure:"events_default"` Invite int `json:"invite" mapstructure:"invite"` Kick int `json:"kick" mapstructure:"kick"` Redact int `json:"redact" mapstructure:"redact"` StateDefault int `json:"state_default" mapstructure:"state_default"` Users map[string]int `json:"users" mapstructure:"users"` UsersDefault int `json:"users_default" mapstructure:"users_default"` Notifications int `json:"notifications" mapstructure:"notifications"` }
type MRoomTombstone ¶
type ServerNoticeType ¶
type ServerNoticeType string
const ( UsageLimitReached ServerNoticeType = "m.server_notice.usage_limit_reached" MonthlyActiveUser = "monthly_active_user" )
type ThumbnailInfo ¶
type UnknownTypeError ¶
type UnknownTypeError struct {
Type string
}
func (UnknownTypeError) Error ¶
func (e UnknownTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.