Documentation ¶
Index ¶
- type ActivationToken
- type ActivationTokenRequestDTO
- type AuthorDTO
- type ChangePasswordDTO
- type GeneralFeedDTO
- type GeneralFeedPaginationDTO
- type Hashtag
- type Location
- type LocationDTO
- type Post
- type PostCreateRequestDTO
- type PostResponseDTO
- type Subscription
- type SubscriptionPaginationDTO
- type SubscriptionPostRequestDTO
- type SubscriptionPostResponseDTO
- type SubscriptionResponseDTO
- type User
- type UserActivationRequestDTO
- type UserCreateRequestDTO
- type UserFeedDTO
- type UserFeedPaginationDTO
- type UserFeedRecordDTO
- type UserInformationUpdateDTO
- type UserLoginRequestDTO
- type UserLoginResponseDTO
- type UserProfileResponseDTO
- type UserRefreshTokenRequestDTO
- type UserResponseDTO
- type UserSearchPaginationDTO
- type UserSearchRecordDTO
- type UserSearchResponseDTO
- type UserSubscriptionRecordDTO
- type UserSubscriptionSearchRecordDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationToken ¶
type ActivationTokenRequestDTO ¶
type ActivationTokenRequestDTO struct {
Token string `json:"token" binding:"required"`
}
type ChangePasswordDTO ¶
type GeneralFeedDTO ¶
type GeneralFeedDTO struct { Records []PostResponseDTO `json:"records"` Pagination *GeneralFeedPaginationDTO `json:"pagination"` }
type LocationDTO ¶
type Post ¶
type Post struct { Id uuid.UUID `gorm:"column:id;primary_key"` Username string `gorm:"column:username"` User User `gorm:"foreignKey:username;references:username"` Content string `gorm:"column:content;type:varchar(256);null"` ImageUrl string `gorm:"column:image_url;type:varchar(128);null"` CreatedAt time.Time `gorm:"column:created_at;not_null"` LocationId *uuid.UUID `gorm:"column:location_id;null"` Location Location `gorm:"foreignKey:location_id;references:id"` }
type PostCreateRequestDTO ¶
type PostCreateRequestDTO struct { Content string `json:"content" binding:"required"` Location *LocationDTO `json:"location" ` }
type PostResponseDTO ¶
type Subscription ¶
type Subscription struct { Id uuid.UUID `gorm:"column:id;primary_key"` SubscriptionDate time.Time `gorm:"column:subscription_date;not null"` FollowerUsername string `gorm:"column:follower;type:varchar(20)"` Follower User `gorm:"foreignKey:username;references:follower"` // Person who follows FollowingUsername string `gorm:"column:following;type:varchar(20)"` // Person who is being followed Following User `gorm:"foreignKey:username;references:following"` }
type SubscriptionPostRequestDTO ¶
type SubscriptionPostRequestDTO struct {
Following string `json:"following" binding:"required"`
}
type SubscriptionResponseDTO ¶
type SubscriptionResponseDTO struct { Records []UserSubscriptionRecordDTO `json:"records"` Pagination *SubscriptionPaginationDTO `json:"pagination"` }
type User ¶
type User struct { Username string `gorm:"primary_key;type:varchar(20);not_null;unique"` Nickname string `gorm:"type:varchar(25)"` Email string `gorm:"type:varchar(128);not_null;unique"` PasswordHash string `gorm:"type:varchar(80);not_null"` CreatedAt time.Time `gorm:"column:created_at;not_null"` Activated bool `gorm:"not_null"` ProfilePictureUrl string `gorm:"type:varchar(128);null"` Status string `gorm:"type:varchar(128)"` }
type UserActivationRequestDTO ¶
type UserActivationRequestDTO struct {
Token string `json:"token" binding:"required"`
}
type UserCreateRequestDTO ¶
type UserFeedDTO ¶
type UserFeedDTO struct { Records []UserFeedRecordDTO `json:"records"` Pagination *UserFeedPaginationDTO `json:"pagination"` }
type UserFeedPaginationDTO ¶
type UserFeedRecordDTO ¶
type UserFeedRecordDTO struct { PostId string `json:"postId"` CreationDate time.Time `json:"creationDate"` Content string `json:"content"` Location *LocationDTO `json:"location"` }
type UserLoginRequestDTO ¶
type UserLoginResponseDTO ¶
type UserProfileResponseDTO ¶
type UserProfileResponseDTO struct { Username string `json:"username"` Nickname string `json:"nickname"` Status string `json:"status"` ProfilePictureUrl string `json:"profilePictureUrl"` Follower int64 `json:"follower"` Following int64 `json:"following"` Posts int64 `json:"posts"` SubscriptionId *string `json:"subscriptionId"` }
type UserRefreshTokenRequestDTO ¶
type UserRefreshTokenRequestDTO struct {
RefreshToken string `json:"refreshToken" binding:"required"`
}
type UserResponseDTO ¶
type UserSearchPaginationDTO ¶
type UserSearchRecordDTO ¶
type UserSearchResponseDTO ¶
type UserSearchResponseDTO struct { Records []UserSearchRecordDTO `json:"records"` Pagination *UserSearchPaginationDTO `json:"pagination"` }
type UserSubscriptionRecordDTO ¶
type UserSubscriptionRecordDTO struct { FollowerId *uuid.UUID `gorm:"column:follower_id" json:"followerId"` // SubscriptionID, wenn Nutzer mir folgt - ggf. null FollowingId *uuid.UUID `gorm:"column:following_id" json:"followingId"` // SubscriptionID, wenn ich Nutzer folge - ggf. null Username string `gorm:"column:username" json:"username"` // Der Benutzername des Followers/Following Nickname string `gorm:"column:nickname" json:"nickname"` // Der Spitzname des Followers/Following ProfilePictureUrl string `gorm:"column:profile_picture_url" json:"profilePictureUrl"` // Die URL des Profilbildes des Followers/Following }
Click to show internal directories.
Click to hide internal directories.