Documentation
¶
Index ¶
- type AddLanguageResponse
- type AddSnippetToFavouritesInput
- type AddTagResponse
- type AddTagToSnippetInput
- type CreateSnippetResponse
- type DeleteListResponse
- type Language
- type List
- type PaginationParams
- type RemoveSnippetFromFavouritesInput
- type RemoveTagFromSnippetInput
- type Server
- type SignInInput
- type SignInResponse
- type Snippet
- type Tag
- type UpdateListInput
- type UpdateSnippetInput
- type UpdateTagInput
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddLanguageResponse ¶
type AddLanguageResponse struct {
ID *int `json:"id"`
}
AddLanguageResponse model
type AddSnippetToFavouritesInput ¶
type AddSnippetToFavouritesInput struct {
ID *int `json:"id"`
}
AddSnippetToFavouritesInput model
type AddTagToSnippetInput ¶
type AddTagToSnippetInput struct {
TagID *int `json:"tag_id"`
}
AddTagToSnippetInput model
type CreateSnippetResponse ¶
type CreateSnippetResponse struct {
ID *int `json:"id"`
}
CreateSnippetRespnse model
type DeleteListResponse ¶
type DeleteListResponse struct {
ID *int `json:"id"`
}
DeleteListResponse model
type Language ¶
type Language struct { ID int `json:"id" db:"id"` Name string `json:"name" db:"name" binding:"required"` }
Language model
type List ¶
type List struct { ID int `json:"id" db:"id"` Name string `json:"name" db:"name" binding:"required"` }
List of snippets model
type PaginationParams ¶
type RemoveSnippetFromFavouritesInput ¶
type RemoveSnippetFromFavouritesInput struct {
ID *int `json:"id"`
}
RemoveSnippetFromFavouritesInput model
type RemoveTagFromSnippetInput ¶
type RemoveTagFromSnippetInput struct {
TagID *int `json:"tag_id"`
}
RemoveTagFromSnippetInput model
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server - http server
type SignInInput ¶
type SignInInput struct { Username string `json:"username" binding:"required"` Password string `json:"password" binding:"required"` }
SignInInput model
type SignInResponse ¶
type SignInResponse struct {
Token *string `json:"token"`
}
SignInResponse model
type Snippet ¶
type Snippet struct { ID int `json:"id" db:"id"` ListID int `json:"list_id" db:"list_id"` Name string `json:"name" db:"name" binding:"required"` LanguageID int `json:"language_id" db:"language_id" binding:"required"` Description string `json:"description" db:"description" binding:"required"` Content string `json:"content" db:"content" binding:"required"` }
Snippet model
type Tag ¶
type Tag struct { ID int `json:"id" db:"id"` Name string `json:"name" db:"name" binding:"required"` }
Tag model
type UpdateListInput ¶
type UpdateListInput struct {
Name *string `json:"name"`
}
UpdateListInput model
func (UpdateListInput) Validate ¶
func (i UpdateListInput) Validate() error
Validate - list input validation
type UpdateSnippetInput ¶
type UpdateSnippetInput struct { Name *string `json:"name"` ListID *int `json:"list_id"` LanguageID *int `json:"language_id"` Description *string `json:"description"` Content *string `json:"content"` }
UpdateSnippetInput model
func (UpdateSnippetInput) Validate ¶
func (i UpdateSnippetInput) Validate() error
Validate - snippet input validation
type UpdateTagInput ¶
type UpdateTagInput struct {
Name *string `json:"name"`
}
UpdateTagInput model
func (UpdateTagInput) Validate ¶
func (i UpdateTagInput) Validate() error
Validate - tag input validation
Click to show internal directories.
Click to hide internal directories.