Documentation
¶
Overview ¶
Package classification of ChatroomMembersRequest API
Documentation for ChatroomMembersRequest API
Schemes: http BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - application/json
swagger:meta
Package classification of ChatroomRequest API ¶
Documentation for ChatroomRequest API
Schemes: http BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- Variables
- type AppError
- type ChatroomMembers
- func (p *ChatroomMembers) AddMember(c *gin.Context)
- func (p *ChatroomMembers) AddOrGetMemberByID(c *gin.Context)
- func (p *ChatroomMembers) GetMembersByChatroomID(c *gin.Context)
- func (p *ChatroomMembers) GetMembersByUserID(c *gin.Context)
- func (p *ChatroomMembers) ListAll(c *gin.Context)
- func (p *ChatroomMembers) Update(c *gin.Context)
- func (p *ChatroomMembers) UpdateLastViewedAt(c *gin.Context)
- type Chatrooms
- type GenericError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidChatroomPath = fmt.Errorf("Invalid Path, path should be /Chatrooms/[id]")
ErrInvalidChatroomPath is an error message when the ChatroomRequest path is not valid
Functions ¶
This section is empty.
Types ¶
type AppError ¶
type AppError struct {
StatusCode int `json:"status_code"`
Message string `json:"message,omitempty"`
ID string `json:"id,omitempty"`
RequestID string `json:"request_id,omitempty"`
}
AppError is a generic error message returned by a server Generic error message returned as a string swagger:response errorResponse
type ChatroomMembers ¶
type ChatroomMembers struct {
ChatroomMemberDB *data.ChatroomMembersDB
// contains filtered or unexported fields
}
ChatroomMembers handler for getting and updating ChatroomMembers
func NewChatroomMembers ¶
func NewChatroomMembers(l hclog.Logger, pdb *data.ChatroomMembersDB) *ChatroomMembers
NewChatroomMembers returns a new ChatroomMembers handler with the given logger
func (*ChatroomMembers) AddMember ¶
func (p *ChatroomMembers) AddMember(c *gin.Context)
swagger:route POST /chatroomMembers{chatroomid} chatroomMembers createChatroomMembers AddMember a new chatroomMember
responses:
200: chatroomMemberResponse 422: errorValidation 501: errorResponse
AddMember handles POST requests to add new chatroomMembers
func (*ChatroomMembers) AddOrGetMemberByID ¶
func (p *ChatroomMembers) AddOrGetMemberByID(c *gin.Context)
func (*ChatroomMembers) GetMembersByChatroomID ¶
func (p *ChatroomMembers) GetMembersByChatroomID(c *gin.Context)
GetMembersByChatroomID handles GET requests
func (*ChatroomMembers) GetMembersByUserID ¶
func (p *ChatroomMembers) GetMembersByUserID(c *gin.Context)
GetMembersByChatroomID handles GET requests
func (*ChatroomMembers) ListAll ¶
func (p *ChatroomMembers) ListAll(c *gin.Context)
GetChatroomsAll handles GET requests and returns all current ChatroomMembers
func (*ChatroomMembers) Update ¶
func (p *ChatroomMembers) Update(c *gin.Context)
Update handles PUT requests to update chatroomMembers
func (*ChatroomMembers) UpdateLastViewedAt ¶
func (p *ChatroomMembers) UpdateLastViewedAt(c *gin.Context)
Update handles PUT requests to update chatroomMembers
type Chatrooms ¶
type Chatrooms struct {
ChatroomDB *data.ChatroomsDB
// contains filtered or unexported fields
}
Chatrooms handler for getting and updating Chatrooms
func NewChatrooms ¶
func NewChatrooms(l hclog.Logger, pdb *data.ChatroomsDB) *Chatrooms
NewChatrooms returns a new Chatrooms handler with the given logger
func (*Chatrooms) Create ¶
swagger:route POST /chatrooms chatrooms createChatroom Create a new chatroom
responses:
200: chatroomResponse 422: errorValidation 501: errorResponse
Create handles POST requests to add new chatrooms
func (*Chatrooms) GetChatroomByID ¶
GetChatroomByID handles GET requests
func (*Chatrooms) GetChatroomsAll ¶
GetChatroomsAll handles GET requests and returns all current Chatrooms
type GenericError ¶
type GenericError struct {
Message string `json:"message"`
}
GenericError is a generic error message returned by a server
type ValidationError ¶
type ValidationError struct {
Messages []string `json:"messages"`
}
ValidationError is a collection of validation error messages