models

package
v0.0.0-...-e3cadf0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package models provides entities for the social services

Index

Constants

View Source
const (
	Invite              = "invite_data"
	SharedFromGroup     = "shared_from_group_data"
	SharedFromFollowing = "shared_from_following_data"
	FollowingSubscribed = "following_subscribed_data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptInviteRequest

type AcceptInviteRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`

	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

AcceptInviteRequest is a struct that defines the request body for accepting an invite to group.

type AcceptInviteResponse

type AcceptInviteResponse struct{}

AcceptInviteResponse is a struct that defines the request body for sending an invite to group.

type ChangeGroupNameRequest

type ChangeGroupNameRequest struct {
	CreatorId UserId  `json:"creator_id"`
	GroupId   GroupId `json:"group_id"`
	Name      string  `json:"name"`
}

type ChangeGroupNameResponse

type ChangeGroupNameResponse struct{}

type CheckIfSharedWithFollowersRequest

type CheckIfSharedWithFollowersRequest struct {
	UserId UserId `json:"user_id"`
	DeckId DeckId `json:"deck_id"`
}

type CheckIfSharedWithFollowersResponse

type CheckIfSharedWithFollowersResponse struct {
	Ok bool `json:"ok"`
}

type CreateGroupRequest

type CreateGroupRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`

	// Name is the new group's name
	//
	// required: true
	// example: Eduard
	Name string `json:"name"`
}

CreateGroupRequest is a struct that defines the request body for creating a new group.

type CreateGroupResponse

type CreateGroupResponse struct {
	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

CreateGroupResponse is a struct that defines the request body for creating a new group.

type DeckId

type DeckId = int

type Decks

type Decks = models.Decks

type DeepCopyDeckRequest

type DeepCopyDeckRequest struct {
	// CopierId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	CopierId UserId `json:"copier_id"`

	// DeckId is an ID of the deck to copy.
	//
	// required: true
	// example: 189
	DeckId DeckId `json:"deck_id"`
}

DeepCopyDeckRequest is a struct that defines the request body for deep copying a deck (with all its contents recursively copied).

type DeepCopyDeckResponse

type DeepCopyDeckResponse struct {
	// DeckId is an ID of the newly copied deck.
	//
	// required: true
	// example: 189
	DeckId DeckId `json:"deck_id"`
}

DeepCopyDeckResponse is a struct that defines the request body for deep copying a deck (with all its contents recursively copied).

type DeleteGroupDeckRequest

type DeleteGroupDeckRequest struct {
	UserId  UserId  `json:"user_id"`
	GroupId GroupId `json:"group_id"`
	DeckId  DeckId  `json:"deck_id"`
}

type DeleteGroupDeckResponse

type DeleteGroupDeckResponse struct{}

type DeleteGroupRequest

type DeleteGroupRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`

	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

DeleteGroupRequest is a struct that defines the request body for deleting a group.

type DeleteGroupResponse

type DeleteGroupResponse struct{}

DeleteGroupResponse is a struct that defines the request body for creating a new group.

type FeedPostType

type FeedPostType string

type FeedRequest

type FeedRequest struct {
	UserId UserId `json:"user_id"`
}

FeedRequest is a struct that defines the request body for getting a user's feed. swagger:model feedRequest

type FeedResponse

type FeedResponse struct {
	Feed []Post `json:"feed"`
}

type FollowRequest

type FollowRequest struct {
	// FollowerId is an ID of the user following the author.
	//
	// required: true
	// example: 189
	FollowerId UserId `json:"follower_id"`

	// AuthorId is an ID of the supplier of content.
	//
	// required: true
	// example: 189
	AuthorId UserId `json:"author_id"`
}

FollowRequest contains an id of the user that following to author

type FollowResponse

type FollowResponse struct{}

FollowResponse contains ids and names of the followings.

type FollowersRequest

type FollowersRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`
}

FollowersRequest contains an id of the user to get their followers.

type FollowersResponse

type FollowersResponse struct {
	UserInfo []models.UserInfo `json:"user_info"`
}

FollowersResponse contains ids and names of the followers.

type FollowingSubscribedData

type FollowingSubscribedData struct {
	// FollowerId is a unique identifier of the follower.
	//
	// example: 1
	FollowerId UserId `json:"follower_id"`

	// FollowerName is a name of the follower.
	//
	// example: John Doe
	FollowerName string `json:"follower_name"`

	// AuthorId is a unique identifier of the author.
	//
	// example: 1
	AuthorId UserId `json:"author_id"`

	// AuthorName is a name of the author.
	//
	// example: Dima Krasnov
	AuthorName string `json:"author_name"`
}

type FollowingsRequest

type FollowingsRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`
}

FollowingsRequest contains an id of the user to get their followings.

type FollowingsResponse

type FollowingsResponse struct {
	UserInfo []models.UserInfo `json:"user_info"`
}

FollowingsResponse contains ids and names of the followings.

type GetCreatedGroupsByUserIdRequest

type GetCreatedGroupsByUserIdRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`
}

GetCreatedGroupsByUserIdRequest is a struct that defines the request body for loading groups the user is a creator of.

type GetCreatedGroupsByUserIdResponse

type GetCreatedGroupsByUserIdResponse struct {
	// Groups is a map from group id to group config.
	//
	// required: true
	Groups []GroupConfig `json:"groups"`
}

GetCreatedGroupsByUserIdResponse is a struct that defines the response body for loading groups the user is a creator of.

type GetDecksByGroupIdRequest

type GetDecksByGroupIdRequest struct {
	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

GetDecksByGroupIdRequest is a struct that defines the request body for loading decks of a group.

type GetDecksByGroupIdResponse

type GetDecksByGroupIdResponse struct {
	// Decks is a list of decks.
	//
	// required: true
	Decks []cardmodels.DeckConfig `json:"decks"`
}

GetDecksByGroupIdResponse is a struct that defines the request body for loading decks of a group.

type GetFollowersNotJoinedGroupRequest

type GetFollowersNotJoinedGroupRequest struct {
	CreatorId UserId  `json:"creator_id"`
	GroupId   GroupId `json:"group_id"`
}

type GetFollowersNotJoinedGroupResponse

type GetFollowersNotJoinedGroupResponse struct {
	Followers []GroupsFollowed `json:"followers"`
}

type GetGroupByGroupIdRequest

type GetGroupByGroupIdRequest struct {
	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

GetGroupByGroupIdRequest is a struct that defines the request body for loading a config of the group.

type GetGroupByGroupIdResponse

type GetGroupByGroupIdResponse struct {
	// GroupConfig is a struct containing the info about a group.
	//
	// required: true
	GroupConfig GroupConfig `json:"group_config"`
}

GetGroupByGroupIdResponse is a struct that defines the request body for loading members of a group.

type GetGroupsByUserIdRequest

type GetGroupsByUserIdRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`
}

GetGroupsByUserIdRequest is a struct that defines the request body for loading groups the user is a member of.

type GetGroupsByUserIdResponse

type GetGroupsByUserIdResponse struct {
	// Groups is a map from group id to group config.
	//
	// required: true
	Groups []GroupConfig `json:"groups"`
}

GetGroupsByUserIdResponse is a struct that defines the request body for loading groups the user is a member of.

type GetGroupsDeckSharedRequest

type GetGroupsDeckSharedRequest struct {
	CreatorId UserId `json:"creator_id"`
	DeckId    DeckId `json:"deck_id"`
}

type GetGroupsDeckSharedResponse

type GetGroupsDeckSharedResponse struct {
	Groups []GroupsShared `json:"groups"`
}

type GetInvitesByGroupIdRequest

type GetInvitesByGroupIdRequest struct {
	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

GetInvitesByGroupIdRequest is a struct that defines the request body for loading invites to a group.

type GetInvitesByGroupIdResponse

type GetInvitesByGroupIdResponse struct {
	// Invites is a map from user id to invite information.
	//
	// required: true
	Invites map[UserId]InviteInfo `json:"invites_from_group"`
}

GetInvitesByGroupIdResponse is a struct that defines the request body for loading invites to a group.

type GetInvitesByUserIdRequest

type GetInvitesByUserIdRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`
}

GetInvitesByUserIdRequest is a struct that defines the request body for loading invites to a user.

type GetInvitesByUserIdResponse

type GetInvitesByUserIdResponse struct {
	// Invites is a map from group id to invite information.
	//
	// required: true
	Invites map[GroupId]InviteInfo `json:"invites_to_user"`
}

GetInvitesByUserIdResponse is a struct that defines the request body for loading invites to a user.

type GetParticipantsByGroupIdRequest

type GetParticipantsByGroupIdRequest struct {
	GroupId GroupId `json:"group_id"`
}

type GetParticipantsByGroupIdResponse

type GetParticipantsByGroupIdResponse struct {
	Participants []UserInfo `json:"participants"`
}

type GetUsersByGroupIdRequest

type GetUsersByGroupIdRequest struct {
	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

GetUsersByGroupIdRequest is a struct that defines the request body for loading members of a group.

type GetUsersByGroupIdResponse

type GetUsersByGroupIdResponse struct {
	// Members is a map from user id to member info.
	//
	// required: true
	Members Members `json:"members"`
}

GetUsersByGroupIdResponse is a struct that defines the request body for loading members of a group.

type GroupConfig

type GroupConfig struct {
	// GroupId is a unique identifier of the group.
	//
	// required: true
	// example: 1
	GroupId GroupId `json:"group_id"`

	// CreatorId means that a user created the group and is authorized to share posts within it.
	//
	// required: true
	// example: 12
	CreatorId UserId `json:"creator_id"`

	// Name is a name of the group which the user assigned to it.
	//
	// required: true
	// example: vodka lovers
	Name string `json:"name"`

	// Timestamp when the group was created
	//
	// required: true
	// example: 2020-01-01T00:00:00Z
	TimeCreated time.Time `json:"time_created"`
}

GroupConfig contains information about a particular group.

type GroupId

type GroupId = int

type Groups

type Groups map[GroupId]GroupConfig

Groups is a map of groups which config can be obtained by id.

type GroupsFollowed

type GroupsFollowed struct {
	GroupId      GroupId `json:"group_id"`
	FollowerId   UserId  `json:"follower_id"`
	FollowerName string  `json:"follower_name"`
}

type GroupsShared

type GroupsShared struct {
	DeckId    DeckId  `json:"deck_id"`
	GroupId   GroupId `json:"group_id"`
	GroupName string  `json:"group_name"`
	Shared    bool    `json:"shared"`
}

type InviteData

type InviteData struct {
	// InviteeId is a unique identifier of the user that received the invitation.
	//
	// example: 1
	InviteeId UserId `json:"invitee_id"`

	// InviteeName is a name of the user that received the invitation.
	//
	// example: John Doe
	InviteeName string `json:"invitee_name"`

	// GroupId is a unique identifier of the group.
	//
	// example: 1
	GroupId GroupId `json:"group_id"`

	// GroupName is a name of the group.
	//
	// example: vodka lovers
	GroupName string `json:"group_name"`
}

type InviteInfo

type InviteInfo struct {
	GroupId GroupId `json:"group_id"`

	// Id of the user that received the invitation
	InvitedId UserId `json:"user_id"`

	// Timestamp when the invite was sent
	TimeInvited time.Time `json:"time_invited"`
}

InviteInfo contains information about a particular user that got invite into the group.

type MemberInfo

type MemberInfo struct {
	MemberId UserId `json:"member_id"`

	// Timestamp when the member joined the group
	TimeJoined time.Time `json:"time_joined"`
}

MemberInfo contains information about a particular group member.

type Members

type Members map[UserId]MemberInfo

Members is a map of members of a group.

type Post

type Post struct {
	// PostId is a unique identifier of the post.
	//
	// example: "invite_data"
	Type FeedPostType `json:"type"`

	// InviteData contains information about the invitation.
	InviteData *InviteData `json:"invite_data"`

	// SharedFromGroupData contains information about the shared deck from the group.
	SharedFromGroupData *SharedFromGroupData `json:"shared_from_group_data"`

	// SharedFromFollowingData contains information about the shared deck from the following.
	SharedFromFollowingData *SharedFromFollowingData `json:"shared_from_following_data"`

	// FollowingSubscribedData contains information about the following subscription.
	FollowingSubscribedData *FollowingSubscribedData `json:"following_subscribed_data"`
}

type QuitGroupRequest

type QuitGroupRequest struct {
	UserId  UserId  `json:"user_id"`
	GroupId GroupId `json:"group_id"`
}

type QuitGroupResponse

type QuitGroupResponse struct{}

type SearchGroupByNameRequest

type SearchGroupByNameRequest struct{} // GET

type SearchGroupByNameResponse

type SearchGroupByNameResponse struct {
	Groups []GroupConfig `json:"groups"`
}

type SearchUserResponse

type SearchUserResponse struct {
	Users []UserInfo `json:"users"`
}

SearchUserResponse is a struct that defines the response body for searching users by name.

type SendInviteRequest

type SendInviteRequest struct {
	// CreatorId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	CreatorId UserId `json:"creator_id"`

	// CreatorId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	InviteeId UserId `json:"invitee_id"`

	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

SendInviteRequest is a struct that defines the request body for sending an invite to group.

type SendInviteResponse

type SendInviteResponse struct{}

SendInviteResponse is a struct that defines the request body for sending an invite to group.

type ShareAllGroupDecksRequest

type ShareAllGroupDecksRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`

	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 189
	GroupId GroupId `json:"group_id"`
}

ShareAllGroupDecksRequest is a struct that defines the request body for sharing all the group decks to a new user.

type ShareAllGroupDecksResponse

type ShareAllGroupDecksResponse struct{}

ShareAllGroupDecksResponse is a struct that defines the request body for sharing all the group decks to a new user.

type ShareGroupDeckRequest

type ShareGroupDeckRequest struct {
	// UserId is an ID of the user in a storage.
	//
	// required: true
	// example: 189
	UserId UserId `json:"user_id"`

	// GroupId is an ID of a group in the storage.
	//
	// required: true
	// example: 222
	GroupId GroupId `json:"group_id"`

	// DeckId is an ID of a deck in the storage.
	//
	// required: true
	// example: 3
	DeckId DeckId `json:"deck_id"`
}

ShareGroupDeckRequest contains values for sharing decks.

swagger:model shareGroupDeckRequest

type ShareGroupDeckResponse

type ShareGroupDeckResponse struct{}

type ShareWithFollowersRequest

type ShareWithFollowersRequest struct {
	UserId UserId `json:"user_id"`
	DeckId DeckId `json:"deck_id"`
}

type SharedFromFollowingData

type SharedFromFollowingData struct {
	// AuthorId is a unique identifier of the author.
	//
	// example: 1
	AuthorId UserId `json:"author_id"`

	// AuthorName is a name of the author.
	//
	// example: John Doe
	AuthorName string `json:"author_name"`

	// DeckId is a unique identifier of the deck.
	//
	// example: 1
	DeckId DeckId `json:"deck_id"`

	// DeckName is a name of the deck.
	//
	// example: russian curse words
	DeckName string `json:"deck_name"`
}

type SharedFromGroupData

type SharedFromGroupData struct {
	// GroupId is a unique identifier of the group.
	//
	// example: 1
	GroupId GroupId `json:"group_id"`

	// GroupName is a name of the group.
	//
	// example: vodka lovers
	GroupName string `json:"group_name"`

	// DeckId is a unique identifier of the deck.
	//
	// example: 1
	DeckId DeckId `json:"deck_id"`

	// DeckName is a name of the deck.
	//
	// example: Bangladesh famous words
	DeckName string `json:"deck_name"`
}

type SwaggerCreateGroupBadRequestResponse

type SwaggerCreateGroupBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response createGroupBadRequestResponse SwaggerCreateGroupBadRequestResponse is a struct that defines the response body for the CreateGroup endpoint.

type SwaggerCreateGroupInternalServerErrorResponse

type SwaggerCreateGroupInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response createGroupInternalServerErrorResponse SwaggerCreateGroupInternalServerErrorResponse is a struct that defines the response body for the CreateGroup endpoint.

type SwaggerCreateGroupOkResponse

type SwaggerCreateGroupOkResponse struct {
	// in: body
	Body CreateGroupResponse
}

swagger:response createGroupOkResponse SwaggerCreateGroupOkResponse is a struct that defines the response body for the CreateGroup endpoint.

type SwaggerFeedBadRequestResponse

type SwaggerFeedBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response feedBadRequestResponse SwaggerFeedBadRequestResponse is a struct that defines the response body for the Feed endpoint.

type SwaggerFeedInternalServerErrorResponse

type SwaggerFeedInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response feedInternalServerErrorResponse SwaggerFeedInternalServerErrorResponse is a struct that defines the response body for the Feed endpoint.

type SwaggerFeedOkResponse

type SwaggerFeedOkResponse struct {
	// in: body
	Body FeedResponse
}

swagger:response feedOkResponse SwaggerFeedOkResponse is a struct that defines the response body for the Feed endpoint.

type SwaggerFollowBadRequestResponse

type SwaggerFollowBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response followBadRequestResponse SwaggerFollowBadRequestResponse is a struct that defines the response body for the Follow endpoint.

type SwaggerFollowInternalServerErrorResponse

type SwaggerFollowInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response followInternalServerErrorResponse SwaggerFollowInternalServerErrorResponse is a struct that defines the response body for the Follow endpoint.

type SwaggerFollowNoContentResponse

type SwaggerFollowNoContentResponse struct{}

swagger:response followNoContentResponse SwaggerFollowNoContentResponse is a struct that defines the response body for the Follow endpoint.

type SwaggerFollowingsBadRequestResponse

type SwaggerFollowingsBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getFollowingsBadRequestResponse SwaggerGetFollowingsBadRequestResponse is a struct that defines the response body for the Followings endpoint.

type SwaggerFollowingsInternalServerErrorResponse

type SwaggerFollowingsInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getFollowingsInternalServerErrorResponse SwaggerGetFollowingsInternalServerErrorResponse is a struct that defines the response body for the Followings endpoint.

type SwaggerFollowingsOkResponse

type SwaggerFollowingsOkResponse struct {
	// in: body
	Body FollowingsResponse
}

swagger:response getFollowingsOkResponse SwaggerGetFollowingsOkResponse is a struct that defines the response body for the Followings endpoint.

type SwaggerGetDecksByGroupIdBadRequestResponse

type SwaggerGetDecksByGroupIdBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getDecksByGroupIdBadRequestResponse SwaggerGetDecksByGroupIdBadRequestResponse is a struct that defines the response body for the GetDecksByGroupId endpoint.

type SwaggerGetDecksByGroupIdInternalServerErrorResponse

type SwaggerGetDecksByGroupIdInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getDecksByGroupIdInternalServerErrorResponse SwaggerGetDecksByGroupIdInternalServerErrorResponse is a struct that defines the response body for the GetDecksByGroupId endpoint.

type SwaggerGetDecksByGroupIdOkResponse

type SwaggerGetDecksByGroupIdOkResponse struct {
	// in: body
	Body GetDecksByGroupIdResponse
}

swagger:response getDecksByGroupIdOkResponse SwaggerGetDecksByGroupIdOkResponse is a struct that defines the response body for the GetDecksByGroupId endpoint.

type SwaggerGetFollowersBadRequestResponse

type SwaggerGetFollowersBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getFollowersBadRequestResponse SwaggerGetFollowersBadRequestResponse is a struct that defines the response body for the getFollowers endpoint. Returns a bad request error.

type SwaggerGetFollowersInternalServerErrorResponse

type SwaggerGetFollowersInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getFollowersInternalServerErrorResponse SwaggerGetFollowersInternalServerErrorResponse is a struct that defines the response body for the getFollowers endpoint. Returns an internal server error.

type SwaggerGetFollowersOkResponse

type SwaggerGetFollowersOkResponse struct {
	// in: body
	Body FollowersResponse
}

swagger:response getFollowersOkResponse SwaggerGetFollowersOkResponse is a struct that defines the response body for the getFollowers endpoint.

type SwaggerGetGroupsByUserIdBadRequestResponse

type SwaggerGetGroupsByUserIdBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getGroupsByUserIdBadRequestResponse SwaggerGetGroupsByUserIdBadRequestResponse is a struct that defines the response body for the GetGroupsByUserId endpoint.

type SwaggerGetGroupsByUserIdInternalServerErrorResponse

type SwaggerGetGroupsByUserIdInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response getGroupsByUserIdInternalServerErrorResponse SwaggerGetGroupsByUserIdInternalServerErrorResponse is a struct that defines the response body for the GetGroupsByUserId endpoint.

type SwaggerGetGroupsByUserIdOkResponse

type SwaggerGetGroupsByUserIdOkResponse struct {
	// in: body
	Body GetGroupsByUserIdResponse
}

swagger:response getGroupsByUserIdOkResponse SwaggerGetGroupsByUserIdOkResponse is a struct that defines the response body for the GetGroupsByUserId endpoint.

type SwaggerSearchUserInternalServerErrorResponse

type SwaggerSearchUserInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response searchUserInternalServerErrorResponse SwaggerSearchUserInternalServerErrorResponse is a struct that defines the response body for the SearchUser endpoint.

type SwaggerSearchUserOkResponse

type SwaggerSearchUserOkResponse struct {
	// in: body
	Body SearchUserResponse
}

swagger:response searchUserOkResponse SwaggerSearchUserOkResponse is a struct that defines the response body for the SearchUser endpoint.

type SwaggerShareGroupDeckBadRequestResponse

type SwaggerShareGroupDeckBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response shareGroupDeckBadRequestResponse SwaggerShareGroupDeckBadRequestResponse is a struct that defines the response body for the ShareGroupDeck endpoint.

type SwaggerShareGroupDeckInternalServerErrorResponse

type SwaggerShareGroupDeckInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response shareGroupDeckInternalServerErrorResponse SwaggerShareGroupDeckInternalServerErrorResponse is a struct that defines the response body for the ShareGroupDeck endpoint.

type SwaggerShareGroupDeckNoContentResponse

type SwaggerShareGroupDeckNoContentResponse struct{}

swagger:response shareGroupDeckNoContentResponse SwaggerShareGroupDeckNoContentResponse is a struct that defines the response body for the ShareGroupDeck endpoint.

type SwaggerUnfollowBadRequestResponse

type SwaggerUnfollowBadRequestResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response unfollowBadRequestResponse SwaggerUnfollowBadRequestResponse is a struct that defines the response body for the Unfollow endpoint.

type SwaggerUnfollowInternalServerErrorResponse

type SwaggerUnfollowInternalServerErrorResponse struct {
	// in: body
	Body ioutil.GenericError
}

swagger:response unfollowInternalServerErrorResponse SwaggerUnfollowInternalServerErrorResponse is a struct that defines the response body for the Unfollow endpoint.

type SwaggerUnfollowNoContentResponse

type SwaggerUnfollowNoContentResponse struct{}

swagger:response unfollowNoContentResponse SwaggerUnfollowNoContentResponse is a struct that defines the response body for the Unfollow endpoint.

type UnfollowRequest

type UnfollowRequest struct {
	// FollowerId is an ID of the follower.
	//
	// required: true
	// example: 189
	FollowerId UserId `json:"follower_id"`

	// AuthorId is an ID of the supplier of content.
	//
	// required: true
	// example: 183
	AuthorId UserId `json:"author_id"`
}

UnfollowRequest contains an id of the user that unfollowing from the author

type UnfollowResponse

type UnfollowResponse struct{}

UnfollowResponse contains ids and names of the followings.

type UserId

type UserId = models.UserId

type UserInfo

type UserInfo struct {
	ID       int
	Username string
	Email    string
}

UserInfo is a struct that defines the user info model.

func (*UserInfo) Scan

func (u *UserInfo) Scan(v any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL