Documentation ¶
Index ¶
- Constants
- type SubscriptionOpts
- type SubscriptionUser
- func (v SubscriptionUser) MarshalEasyJSON(w *jwriter.Writer)
- func (v SubscriptionUser) MarshalJSON() ([]byte, error)
- func (u *SubscriptionUser) Sanitize(sanitizer *bluemonday.Policy)
- func (v *SubscriptionUser) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SubscriptionUser) UnmarshalJSON(data []byte) error
- type User
Constants ¶
View Source
const UserUnknown = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubscriptionOpts ¶
type SubscriptionUser ¶
type SubscriptionUser struct { ID int `json:"id"` Username string `json:"username"` Avatar string `json:"avatar"` HasSubscribeFromCurUser bool `json:"is_subscribed"` }
func (SubscriptionUser) MarshalEasyJSON ¶
func (v SubscriptionUser) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SubscriptionUser) MarshalJSON ¶
func (v SubscriptionUser) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SubscriptionUser) Sanitize ¶
func (u *SubscriptionUser) Sanitize(sanitizer *bluemonday.Policy)
func (*SubscriptionUser) UnmarshalEasyJSON ¶
func (v *SubscriptionUser) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SubscriptionUser) UnmarshalJSON ¶
func (v *SubscriptionUser) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type User ¶
type User struct { ID int `json:"id,omitempty" example:"123"` Username string `json:"username" example:"Green"` Name pgtype.Text `json:"name,omitempty" example:"Peter"` Surname pgtype.Text `json:"surname,omitempty" example:"Green"` Email string `json:"email,omitempty" example:"digital@gmail.com"` Avatar string `json:"avatar" example:"pinspire.online/avatars/avatar.jpg"` AboutMe pgtype.Text `json:"about_me,omitempty"` Password string `json:"password,omitempty" example:"pass123"` } // @name User
func (User) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (User) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*User) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*User) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.