Documentation
¶
Overview ¶
Package entity определяет основные сущности для бизнес-логики (сервиса), сопоставления базы данных и объектов ответа HTTP, если они подходят.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Slug `json:"correlation_id" example:"1674872720465761244B_5"` // Строковый идентификатор URL `json:"original_url" example:"https://example.com/go/to/home.html"` // URL для сокращения }
Batch -.
type List ¶
type List struct { ShortURL URL `json:"short_url" example:"1674872720465761244B_5"` // Строковый идентификатор URL `json:"original_url" example:"https://example.com/go/to/home.html"` // URL для сокращения }
List -.
type ShortenResponse ¶
type ShortenResponse struct { Slug `json:"correlation_id" example:"1674872720465761244B_5"` // Строковый идентификатор URL `json:"short_url" example:"https://example.com/correlation_id"` // URL для сокращения }
ShortenResponse -.
type Shorturl ¶
type Shorturl struct { Slug `json:"slug,omitempty" example:"1674872720465761244B_5"` // Строковый идентификатор URL `json:"url,omitempty" example:"https://example.com/go/to/home.html"` // URL для сокращения *config.Config `json:"-"` UserID `json:"user_id,omitempty"` Del bool `json:"del"` }
Shorturl хранит параметры URL.
type ShorturlResponse ¶
type ShorturlResponse struct {
URL `json:"result"` // URL для сокращения
}
ShorturlResponse -.
type Static ¶
type Static struct { CountURLs `json:"urls,omitempty"` // кол-во сокращённых URL в сервисе CountUsers `json:"users,omitempty"` // кол-во пользователей в сервисе }
Static -.
Click to show internal directories.
Click to hide internal directories.