Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindOneResp ¶
type FindOneResp struct { Title string `json:"title"` Content []SessionContentDto `json:"content"` Editable bool `json:"editable"` Tg bool `json:"tg"` ID uuid.UUID `json:"id"` }
FindOneResp модель для ответа на запрос получения сессии по id.
type ListResp ¶
type ListResp struct {
Sessions []SessionDto `json:"sessions"`
}
ListResp модель для ответа на запрос списка сессий.
type NewSessionResp ¶
NewSessionResp модель для ответа на запрос создания сессии.
type RenameReq ¶
type RenameReq struct { Title string `json:"title" validate:"required"` ID uuid.UUID `json:"id" validate:"required"` }
RenameReq модель для запроса на переименование сессии.
type SessionContentDao ¶
type SessionContentDao struct { Response model.ResponseDao `db:"response"` Query model.QueryDao `db:"query"` }
SessionContentDao модель сообщений и запросов в сессии.
type SessionContentDto ¶
type SessionContentDto struct { Response model.ResponseDto `json:"response"` Query model.QueryDto `json:"query"` }
SessionContentDto модель для передачи контента сессии внутри сервиса.
type SessionDao ¶
type SessionDao struct { CreatedAt time.Time `db:"created_at"` Username string `db:"username"` Title string `db:"title"` IsDeleted bool `db:"is_deleted"` Tg bool `db:"tg"` TgID int64 `db:"tg_id"` ID uuid.UUID `db:"id"` }
SessionDao модель для хранения сессии в базе данных.
func (SessionDao) ToDto ¶
func (s SessionDao) ToDto() SessionDto
ToDto конвертирует SessionDao в SessionDto.
Click to show internal directories.
Click to hide internal directories.