generated from Yandex-Practicum/go-musthave-shortener-tpl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from MowlCoder/iter25
Iter25
- Loading branch information
Showing
28 changed files
with
2,910 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
package domain | ||
|
||
// ShortenedURL is model of shortened url. Use model to store data in storages. | ||
type ShortenedURL struct { | ||
ShortURL string `json:"short_url"` | ||
OriginalURL string `json:"original_url"` | ||
UserID string `json:"user_id"` | ||
ID int `json:"id"` | ||
IsDeleted bool `json:"is_deleted"` | ||
} | ||
|
||
// SaveShortURLDto contains info about short url saving to pass around layers. | ||
type SaveShortURLDto struct { | ||
OriginalURL string `json:"original_url"` | ||
ShortURL string `json:"short_url"` | ||
UserID string `json:"user_id"` | ||
} | ||
|
||
// InternalStats contains internal stats about system state | ||
type InternalStats struct { | ||
URLs int `json:"urls"` | ||
Users int `json:"users"` | ||
} | ||
|
||
type ShortBatchURL struct { | ||
CorrelationID string `json:"correlation_id"` | ||
OriginalURL string `json:"original_url"` | ||
ShortURL string `json:"short_url"` | ||
} |
Oops, something went wrong.