Documentation ¶
Index ¶
- Constants
- Variables
- func SHA256(password, salt string) string
- type Card
- type CardQueryParameters
- type CardsResponse
- type Claims
- type Contact
- type Feedback
- type IdentityData
- type Message
- type Partner
- type PartnerQueryParameters
- type PartnerResponse
- type PasswordsContainer
- type ReportResponse
- type Response
- type Slide
- type SliderResponse
- type TokenPair
Constants ¶
View Source
const ( AccessCookieName = "access-cookie" RefreshCookieName = "refresh-cookie" )
Variables ¶
View Source
var ( ErrForeignViolation = errors.New("wrong foreign key") ErrUniqueRestriction = errors.New("violation of the database unique restriction") ErrNoRowAffected = errors.New("no one row was affected") ErrNotFound = errors.New("nothing was found") ErrCheckCaptcha = errors.New("captha doesn't confirm the checking") ErrMailSending = errors.New("error happaned while sendin email") ErrWrongBody = errors.New("wrong body") ErrInvalidSigningMethod = errors.New("invalid signing metod") ErrWrongTokenClaimType = errors.New("token claims are not of type *tokenClaims") ErrTimeout = errors.New("timeout") ErrEmptyField = errors.New("field shoud be not empty") ErrNotMatch = errors.New("the pasword doesn't match") ErrNoSession = errors.New("there is no such session") )
Functions ¶
Types ¶
type Card ¶
type Card struct { ID uuid.UUID `json:"id" db:"id" params:"id"` Title string `json:"title" db:"title"` Thumb string `json:"thumb" db:"thumb"` Alt string `json:"alt" db:"alt"` Description json.RawMessage `json:"description" db:"description"` Created time.Time `json:"created" db:"created"` Modified time.Time `json:"modified" db:"modified"` }
type CardQueryParameters ¶
type CardsResponse ¶
type Claims ¶
type Claims struct { jwt.StandardClaims UserID string }
type Feedback ¶
type IdentityData ¶
type PartnerQueryParameters ¶
type PartnerResponse ¶
type PasswordsContainer ¶
type PasswordsContainer struct { CurrentPassword string `json:"currentPassword"` NewPassword string `json:"newPassword"` NewPasswordConfirmed string `json:"newPasswordConfirmed"` }
func (PasswordsContainer) Validate ¶
func (p PasswordsContainer) Validate() error
type ReportResponse ¶
type Response ¶
func SetResponse ¶
type SliderResponse ¶
Click to show internal directories.
Click to hide internal directories.