user

package
v0.0.0-...-38b1c69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const UserUnknown = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type SubscriptionOpts

type SubscriptionOpts struct {
	UserID int
	Count  int
	LastID int
	Filter string
}

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

func (v User) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (User) MarshalJSON

func (v User) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*User) UnmarshalEasyJSON

func (v *User) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*User) UnmarshalJSON

func (v *User) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL