diff options
author | Wim <wim@42.be> | 2017-02-20 00:49:27 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-02-20 00:50:37 +0100 |
commit | c5cfbc22972c397805c8385840d6cfd0de307c87 (patch) | |
tree | 336b2676a878092cb421ca17590db40c5da86a23 /vendor/github.com/matrix-org/gomatrix/requests.go | |
parent | cd0a2beb11efb4f03fa9fab38b93391b346864e9 (diff) | |
download | matterbridge-msglm-c5cfbc22972c397805c8385840d6cfd0de307c87.tar.gz matterbridge-msglm-c5cfbc22972c397805c8385840d6cfd0de307c87.tar.bz2 matterbridge-msglm-c5cfbc22972c397805c8385840d6cfd0de307c87.zip |
Add matrix support
Diffstat (limited to 'vendor/github.com/matrix-org/gomatrix/requests.go')
-rw-r--r-- | vendor/github.com/matrix-org/gomatrix/requests.go | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/vendor/github.com/matrix-org/gomatrix/requests.go b/vendor/github.com/matrix-org/gomatrix/requests.go new file mode 100644 index 00000000..c1ba27b9 --- /dev/null +++ b/vendor/github.com/matrix-org/gomatrix/requests.go @@ -0,0 +1,72 @@ +package gomatrix + +// ReqRegister is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register +type ReqRegister struct { + Username string `json:"username,omitempty"` + BindEmail bool `json:"bind_email,omitempty"` + Password string `json:"password,omitempty"` + DeviceID string `json:"device_id,omitempty"` + InitialDeviceDisplayName string `json:"initial_device_display_name"` + Auth interface{} `json:"auth,omitempty"` +} + +// ReqLogin is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-login +type ReqLogin struct { + Type string `json:"type"` + Password string `json:"password,omitempty"` + Medium string `json:"medium,omitempty"` + User string `json:"user,omitempty"` + Address string `json:"address,omitempty"` + Token string `json:"token,omitempty"` + DeviceID string `json:"device_id,omitempty"` + InitialDeviceDisplayName string `json:"initial_device_display_name,omitempty"` +} + +// ReqCreateRoom is the JSON request for https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom +type ReqCreateRoom struct { + Visibility string `json:"visibility,omitempty"` + RoomAliasName string `json:"room_alias_name,omitempty"` + Name string `json:"name,omitempty"` + Topic string `json:"topic,omitempty"` + Invite []string `json:"invite,omitempty"` + Invite3PID []ReqInvite3PID `json:"invite_3pid,omitempty"` + CreationContent map[string]interface{} `json:"creation_content,omitempty"` + InitialState []Event `json:"initial_state,omitempty"` + Preset string `json:"preset,omitempty"` + IsDirect bool `json:"is_direct,omitempty"` +} + +// ReqRedact is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-redact-eventid-txnid +type ReqRedact struct { + Reason string `json:"reason,omitempty"` +} + +// ReqInvite3PID is the JSON request for https://matrix.org/docs/spec/client_server/r0.2.0.html#id57 +// It is also a JSON object used in https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom +type ReqInvite3PID struct { + IDServer string `json:"id_server"` + Medium string `json:"medium"` + Address string `json:"address"` +} + +// ReqInviteUser is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-rooms-roomid-invite +type ReqInviteUser struct { + UserID string `json:"user_id"` +} + +// ReqKickUser is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-rooms-roomid-kick +type ReqKickUser struct { + Reason string `json:"reason,omitempty"` + UserID string `json:"user_id"` +} + +// ReqBanUser is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-rooms-roomid-ban +type ReqBanUser struct { + Reason string `json:"reason,omitempty"` + UserID string `json:"user_id"` +} + +// ReqUnbanUser is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-rooms-roomid-unban +type ReqUnbanUser struct { + UserID string `json:"user_id"` +} |