Documentation ¶
Index ¶
- func GetValidator() *validator.Validate
- type Auth
- func (s *Auth) Login(w http.ResponseWriter, r *http.Request)
- func (s *Auth) Logout(w http.ResponseWriter, r *http.Request)
- func (s *Auth) Register(w http.ResponseWriter, r *http.Request)
- func (s *Auth) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
- func (s *Auth) RegisterPublicRouter(router *mux.Router)
- func (s *Auth) User(w http.ResponseWriter, r *http.Request)
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthLogoutRequest
- type AuthLogoutResponse
- type AuthRegisterRequest
- type AuthRegisterResponse
- type AuthUserRequest
- type AuthUserResponse
- type CreateEventRequest
- type CreateEventResponse
- type CreateEventTypeRequest
- type CreateEventTypeResponse
- type EditEventTypeRequest
- type EditEventTypeResponse
- type Event
- func (s *Event) CreateEvent(w http.ResponseWriter, r *http.Request)
- func (s *Event) CreateEventType(w http.ResponseWriter, r *http.Request)
- func (s *Event) EditEventType(w http.ResponseWriter, r *http.Request)
- func (s *Event) FeedEvents(w http.ResponseWriter, r *http.Request)
- func (s *Event) ListEvent(w http.ResponseWriter, r *http.Request)
- func (s *Event) ListEventType(w http.ResponseWriter, r *http.Request)
- func (s *Event) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
- type FeedEventsRequest
- type FeedEventsResponse
- type Friend
- func (s *Friend) FriendList(w http.ResponseWriter, r *http.Request)
- func (s *Friend) InviteAccept(w http.ResponseWriter, r *http.Request)
- func (s *Friend) InviteFriend(w http.ResponseWriter, r *http.Request)
- func (s *Friend) InviteList(w http.ResponseWriter, r *http.Request)
- func (s *Friend) InviteReject(w http.ResponseWriter, r *http.Request)
- func (s *Friend) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
- type FriendListRequest
- type FriendListResponse
- type InviteAcceptRequest
- type InviteAcceptResponse
- type InviteFriendRequest
- type InviteFriendResponse
- type InviteListRequest
- type InviteListResponse
- type InviteRejectRequest
- type InviteRejectResponse
- type ListEventRequest
- type ListEventResponse
- type ListEventTypeRequest
- type ListEventTypeResponse
- type SwaggerRequest
- type SwaggerResponse
- type System
- type User
- func (s *User) Get(w http.ResponseWriter, r *http.Request)
- func (s *User) Password(w http.ResponseWriter, r *http.Request)
- func (s *User) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
- func (s *User) UpdateImage(w http.ResponseWriter, r *http.Request)
- func (s *User) UpdateProfile(w http.ResponseWriter, r *http.Request)
- type UserGetRequest
- type UserGetResponse
- type UserPasswordRequest
- type UserPasswordResponse
- type UserUpdateImageRequest
- type UserUpdateImageResponse
- type UserUpdateProfileRequest
- type UserUpdateProfileResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidator ¶
func GetValidator() *validator.Validate
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) Login ¶
func (s *Auth) Login(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/auth/login Auth AuthLoginRequest
Login form ¶
Responses: 200: AuthLoginResponse
func (*Auth) Logout ¶
func (s *Auth) Logout(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/auth/logout Auth AuthLogoutRequest
Close the current session ¶
Responses: 200: AuthLogoutResponse
func (*Auth) Register ¶
func (s *Auth) Register(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/auth/register Auth AuthRegisterRequest
Registration form ¶
Responses: 200: AuthRegisterResponse
func (*Auth) RegisterPrivateRouter ¶
func (s *Auth) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
func (*Auth) RegisterPublicRouter ¶
type AuthLoginRequest ¶
swagger:parameters AuthLoginRequest
type AuthLoginResponse ¶
swagger:response AuthLoginResponse
type AuthRegisterRequest ¶
type AuthRegisterRequest struct { // In: body Body struct { dto.RegisterDTO } }
swagger:parameters AuthRegisterRequest
type AuthRegisterResponse ¶
swagger:response AuthRegisterResponse
type AuthUserResponse ¶
swagger:response AuthUserResponse
type CreateEventRequest ¶
type CreateEventRequest struct { // In: body Body struct { dto.CreateEventDTO } }
swagger:parameters CreateEventRequest
type CreateEventResponse ¶
swagger:response CreateEventResponse
type CreateEventTypeRequest ¶
type CreateEventTypeRequest struct { // In: body Body struct { dto.CreateEventTypeDTO } }
swagger:parameters CreateEventTypeRequest
type CreateEventTypeResponse ¶
type CreateEventTypeResponse struct { // In: body Body struct { Data *entity.EventType `json:"data"` } }
swagger:response CreateEventTypeResponse
type EditEventTypeRequest ¶
type EditEventTypeRequest struct { // In: path ID int32 `json:"id"` // In: body Body struct { dto.EditEventTypeDTO } }
swagger:parameters EditEventTypeRequest
type EditEventTypeResponse ¶
type EditEventTypeResponse struct { // In: body Body struct { Data *entity.EventType `json:"data"` } }
swagger:response EditEventTypeResponse
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) CreateEvent ¶
func (s *Event) CreateEvent(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/events Event CreateEventRequest
Create an event ¶
Responses: 200: CreateEventResponse
func (*Event) CreateEventType ¶
func (s *Event) CreateEventType(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/events/types EventType CreateEventTypeRequest
Create an event type ¶
Responses: 200: CreateEventTypeResponse
func (*Event) EditEventType ¶
func (s *Event) EditEventType(w http.ResponseWriter, r *http.Request)
swagger:route PUT /api/v1/events/types/{id} EventType EditEventTypeRequest
Editing the event type ¶
Responses: 200: EditEventTypeResponse
func (*Event) FeedEvents ¶
func (s *Event) FeedEvents(w http.ResponseWriter, r *http.Request)
swagger:route GET /api/v1/events/feed Event FeedEventsRequest
Getting a list of friend events ¶
Responses: 200: FeedEventsResponse
func (*Event) ListEvent ¶
func (s *Event) ListEvent(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/events/list Event ListEventRequest
Getting a list of events ¶
Responses: 200: ListEventResponse
func (*Event) ListEventType ¶
func (s *Event) ListEventType(w http.ResponseWriter, r *http.Request)
swagger:route GET /api/v1/events/types EventType ListEventTypeRequest
Getting a list of all types of events ¶
Responses: 200: ListEventTypeResponse
func (*Event) RegisterPrivateRouter ¶
func (s *Event) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
type FeedEventsResponse ¶
type FeedEventsResponse struct { // In: body Body struct { Data []*dto.FeedResponseDTO `json:"data"` Meta *utils.Meta `json:"meta"` } }
swagger:response FeedEventsResponse
type Friend ¶
type Friend struct {
// contains filtered or unexported fields
}
func (*Friend) FriendList ¶
func (s *Friend) FriendList(w http.ResponseWriter, r *http.Request)
swagger:route GET /api/v1/friends Friend FriendListRequest
Get a list of friends ¶
Responses: 200: FriendListResponse
func (*Friend) InviteAccept ¶
func (s *Friend) InviteAccept(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/friends/invites/{id} Friend InviteAcceptRequest
Accept a friend request ¶
Responses: 200: InviteAcceptResponse
func (*Friend) InviteFriend ¶
func (s *Friend) InviteFriend(w http.ResponseWriter, r *http.Request)
swagger:route POST /api/v1/friends/invites Friend InviteFriendRequest
Invite user to friends ¶
Responses: 200: InviteFriendResponse
func (*Friend) InviteList ¶
func (s *Friend) InviteList(w http.ResponseWriter, r *http.Request)
swagger:route GET /api/v1/friends/invites Friend InviteListRequest
Get a list of pending invitations ¶
Responses: 200: InviteListResponse
func (*Friend) InviteReject ¶
func (s *Friend) InviteReject(w http.ResponseWriter, r *http.Request)
swagger:route DELETE /api/v1/friends/invites/{id} Friend InviteRejectRequest
Reject a friend request ¶
Responses: 200: InviteRejectResponse
func (*Friend) RegisterPrivateRouter ¶
func (s *Friend) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
type FriendListResponse ¶
type FriendListResponse struct { // In: body Body struct { Data []*entity.User `json:"data"` Meta *utils.Meta `json:"meta"` } }
swagger:response FriendListResponse
type InviteAcceptRequest ¶
type InviteAcceptRequest struct { // In:path ID int32 `json:"id"` }
swagger:parameters InviteAcceptRequest
type InviteAcceptResponse ¶
type InviteAcceptResponse struct { }
swagger:response InviteAcceptResponse
type InviteFriendRequest ¶
type InviteFriendRequest struct { // In: body Body struct { dto.InviteFriendDTO } }
swagger:parameters InviteFriendRequest
type InviteFriendResponse ¶
type InviteFriendResponse struct { }
swagger:response InviteFriendResponse
type InviteListResponse ¶
type InviteListResponse struct { // In: body Body struct { Data []*dto.InviteListResponseDTO `json:"data"` Meta *utils.Meta `json:"meta"` } }
swagger:response InviteListResponse
type InviteRejectRequest ¶
type InviteRejectRequest struct { // In:path ID int32 `json:"id"` }
swagger:parameters InviteRejectRequest
type InviteRejectResponse ¶
type InviteRejectResponse struct { }
swagger:response InviteRejectResponse
type ListEventRequest ¶
type ListEventRequest struct { // In: body Body struct { dto.ListEventDTO } }
swagger:parameters ListEventRequest
type ListEventResponse ¶
type ListEventResponse struct { // In: body Body struct { Data []*entity.Event `json:"data"` Meta *utils.Meta `json:"meta"` } }
swagger:response ListEventResponse
type ListEventTypeRequest ¶
type ListEventTypeRequest struct { }
swagger:parameters ListEventTypeRequest
type ListEventTypeResponse ¶
type ListEventTypeResponse struct { // In: body Body struct { Data []*entity.EventType `json:"data"` Meta *utils.Meta `json:"meta"` } }
swagger:response ListEventTypeResponse
type SwaggerResponse ¶
type SwaggerResponse struct { // In: body Body []byte }
swagger:response SwaggerResponse
type System ¶
type System struct {
// contains filtered or unexported fields
}
func (*System) RegisterPublicRouter ¶
func (s *System) RegisterPublicRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) Get ¶
func (s *User) Get(w http.ResponseWriter, r *http.Request)
swagger:route GET /api/v1/user/{id} User UserGetRequest
Getting information about a user by ID ¶
Responses: 200: UserGetResponse
func (*User) Password ¶
func (s *User) Password(w http.ResponseWriter, r *http.Request)
swagger:route PUT /api/v1/user/password User UserPasswordRequest
Updating the password for a user ¶
Responses: 200: UserPasswordResponse
func (*User) RegisterPrivateRouter ¶
func (s *User) RegisterPrivateRouter(router *mux.Router, middleware ...mux.MiddlewareFunc)
func (*User) UpdateImage ¶
func (s *User) UpdateImage(w http.ResponseWriter, r *http.Request)
swagger:route PUT /api/v1/user/image User UserUpdateImageRequest
Updating user profile image ¶
Responses: 200: UserUpdateImageResponse
func (*User) UpdateProfile ¶
func (s *User) UpdateProfile(w http.ResponseWriter, r *http.Request)
swagger:route PUT /api/v1/user/profile User UserUpdateProfileRequest
Updating user information ¶
Responses: 200: UserUpdateProfileResponse
type UserGetRequest ¶
type UserGetRequest struct { // In: path ID int32 `json:"id"` }
swagger:parameters UserGetRequest
type UserGetResponse ¶
swagger:response UserGetResponse
type UserPasswordRequest ¶
type UserPasswordRequest struct { // In: body Body struct { dto.UpdatePasswordDTO } }
swagger:parameters UserPasswordRequest
type UserPasswordResponse ¶
type UserPasswordResponse struct { }
swagger:response UserPasswordResponse
type UserUpdateImageRequest ¶
type UserUpdateImageRequest struct { // In: body Body struct { dto.UpdateProfileImageDTO } }
swagger:parameters UserUpdateImageRequest
type UserUpdateImageResponse ¶
swagger:response UserUpdateImageResponse
type UserUpdateProfileRequest ¶
type UserUpdateProfileRequest struct { // In: body Body struct { dto.UpdateProfileDTO } }
swagger:parameters UserUpdateProfileRequest
type UserUpdateProfileResponse ¶
type UserUpdateProfileResponse struct { // In: body Body struct { Data *entity.User `json:"data"` } }
swagger:response UserUpdateProfileResponse