Documentation ¶
Index ¶
- Variables
- type Authentication
- type Balance
- type Card
- type CardList
- type CardResponse
- type CountURLs
- type CountUsers
- type Data
- type File
- type Group
- type GroupList
- type GroupResponse
- type List
- type Pass
- type Prove
- type Proves
- type Slug
- type Solution
- type SolutionData
- type SolutionList
- type Task
- type TaskList
- type TaskResponse
- type Text
- type URL
- type User
- type UserID
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct { *config.Config `json:"-"` ID string `json:"id"` Login string `json:"login" validate:"required"` Password string `json:"password,omitempty"` EncryptPassword string `json:"-"` Surname string `json:"surname"` Name string `json:"name"` Patronymic string `json:"patronymic"` Email string `json:"email"` GroupID string `json:"group_id"` }
func (*Authentication) BeforeCreate ¶
func (a *Authentication) BeforeCreate() error
func (*Authentication) ComparePassword ¶
func (a *Authentication) ComparePassword(password string) bool
func (*Authentication) Sanitize ¶
func (a *Authentication) Sanitize()
Sanitize очищает поля, для того чтоб они не возвращались в ответе
func (*Authentication) Validate ¶
func (a *Authentication) Validate() error
type Card ¶
type Card struct { Number string `json:"number" validate:"required"` MetaData string `json:"meta_data,omitempty"` UserID string `json:"user_id,omitempty"` }
type CardList ¶
type CardList []CardResponse
type CardResponse ¶
type Group ¶
type GroupResponse ¶
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 Pass ¶
type Pass struct { Login string `json:"login" validate:"required"` Password string `json:"password" validate:"required"` MetaData string `json:"meta_data,omitempty"` UserID string `json:"user_id,omitempty"` }
type Prove ¶
type Prove struct { *config.Config `json:"-"` Slug `json:"slug,omitempty" example:"1674872720465761244B_5"` URL `json:"url,omitempty" example:"https://example.com/go/to/home.html"` UserID `json:"user_id,omitempty"` Del bool `json:"del"` }
Prove -.
type Solution ¶
type Solution struct { SolutionID string `json:"solution_id,omitempty"` Description string `json:"description" validate:"required"` TaskID string `json:"task_id,omitempty"` Solution string `json:"solution" validate:"required"` UserID string `json:"user_id,omitempty"` UploadedAt string `json:"created,omitempty"` }
type SolutionData ¶
type SolutionList ¶
type SolutionList []Solution
type Task ¶
type TaskResponse ¶
type Text ¶
type Text struct { Text string `json:"text" validate:"required"` MetaData string `json:"meta_data,omitempty"` UserID string `json:"user_id,omitempty"` }
Click to show internal directories.
Click to hide internal directories.