Documentation ¶
Index ¶
- func WriteJsonResponse(rw http.ResponseWriter, status int, body interface{})
- func WriteJsonResponseWithStatus(rw http.ResponseWriter, body WithStatus)
- type AuthFlow
- type AuthFlows
- type CreateRoomResponse
- type Endpoint
- func NewAuthEndpoint(userService interfaces.UserService, tokenService interfaces.TokenService) Endpoint
- func NewEventsEndpoint(userService interfaces.UserService, tokenService interfaces.TokenService, ...) Endpoint
- func NewPresenceEndpoint(users interfaces.UserService, tokens interfaces.TokenService, ...) Endpoint
- func NewProfileEndpoint(users interfaces.UserService, tokens interfaces.TokenService, ...) Endpoint
- func NewRoomsEndpoint(userService interfaces.UserService, tokenService interfaces.TokenService, ...) Endpoint
- type JsonBodyHandler
- type JsonHandler
- type LoginType
- type OkStatus
- type WithStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteJsonResponse ¶
func WriteJsonResponse(rw http.ResponseWriter, status int, body interface{})
func WriteJsonResponseWithStatus ¶
func WriteJsonResponseWithStatus(rw http.ResponseWriter, body WithStatus)
Types ¶
type CreateRoomResponse ¶
type Endpoint ¶
type Endpoint interface {
Register(mux *httprouter.Router)
}
func NewAuthEndpoint ¶
func NewAuthEndpoint( userService interfaces.UserService, tokenService interfaces.TokenService, ) Endpoint
func NewEventsEndpoint ¶
func NewEventsEndpoint( userService interfaces.UserService, tokenService interfaces.TokenService, eventService interfaces.EventService, syncService interfaces.SyncService, ) Endpoint
func NewPresenceEndpoint ¶
func NewPresenceEndpoint( users interfaces.UserService, tokens interfaces.TokenService, presences interfaces.PresenceService, ) Endpoint
func NewProfileEndpoint ¶
func NewProfileEndpoint( users interfaces.UserService, tokens interfaces.TokenService, profiles interfaces.ProfileService, ) Endpoint
func NewRoomsEndpoint ¶
func NewRoomsEndpoint( userService interfaces.UserService, tokenService interfaces.TokenService, roomService interfaces.RoomService, syncService interfaces.SyncService, eventService interfaces.EventService, ) Endpoint
type JsonBodyHandler ¶
type JsonBodyHandler func(req *http.Request, params httprouter.Params, body interface{}) interface{}
type JsonHandler ¶
type JsonHandler func(req *http.Request, params httprouter.Params) interface{}
type LoginType ¶
type LoginType string
const ( LoginTypePassword LoginType = "m.login.password" LoginTypeEmail = "m.login.email.identity" )
type WithStatus ¶
type WithStatus interface {
Status() int
}
Click to show internal directories.
Click to hide internal directories.