models

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Privacy     string `json:"privacy"`
	UserId      int    `json:"user_id"`
}

func (Board) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Board) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Board) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Board) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Chat

type Chat struct {
	ID        int       `json:"id"`
	User1ID   int       `json:"user1_id"`
	User2ID   int       `json:"user2_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func (Chat) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Chat) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Chat) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Chat) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Comment

type Comment struct {
	ID        int       `json:"id"`
	AuthorID  int       `json:"author_id"`
	PinID     int       `json:"pin_id"`
	Text      string    `json:"text"`
	CreatedAt time.Time `json:"created_at"`
}

func (Comment) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Comment) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Comment) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Comment) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Image

type Image struct {
	ID    string
	Bytes []byte
}

type Like

type Like struct {
	PinId     int       `json:"pin_id"`
	AuthorId  int       `json:"author_id"`
	CreatedAt time.Time `json:"created_at"`
}

func (Like) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Like) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Like) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Like) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Message

type Message struct {
	ID        int       `json:"id"`
	AuthorID  int       `json:"author_id"`
	ChatID    int       `json:"chat_id"`
	Text      string    `json:"text"`
	CreatedAt time.Time `json:"created_at"`
}

func (Message) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Message) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Message) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Message) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type NewCommentNotification

type NewCommentNotification struct {
	PinID    int    `json:"pin_id"`
	AuthorID int    `json:"author_id"`
	Text     string `json:"text"`
}

func (NewCommentNotification) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewCommentNotification) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*NewCommentNotification) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewCommentNotification) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type NewFollowerNotification

type NewFollowerNotification struct {
	FollowerID int `json:"follower_id"`
}

func (NewFollowerNotification) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewFollowerNotification) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*NewFollowerNotification) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewFollowerNotification) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type NewLikeNotification

type NewLikeNotification struct {
	PinID    int `json:"pin_id"`
	AuthorID int `json:"author_id"`
}

func (NewLikeNotification) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewLikeNotification) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*NewLikeNotification) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewLikeNotification) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type NewPinNotification

type NewPinNotification struct {
	PinID int `json:"pin_id"`
}

func (NewPinNotification) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewPinNotification) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*NewPinNotification) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewPinNotification) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Notification

type Notification struct {
	ID        int         `json:"id"`
	UserID    int         `json:"user_id"`
	IsRead    bool        `json:"is_read"`
	CreatedAt time.Time   `json:"created_at"`
	Type      string      `json:"type"`
	Data      interface{} `json:"data"`
}

func (Notification) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Notification) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Notification) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Notification) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Pin

type Pin struct {
	Id               int    `json:"id"`
	Title            string `json:"title"`
	Description      string `json:"description"`
	MediaSource      string `json:"media_source"`
	MediaSourceColor string `json:"media_source_color"`
	NumLikes         int    `json:"n_likes"`
	Liked            bool   `json:"liked"`
	Author           int    `json:"author_id"`
}

func (Pin) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Pin) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Pin) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Pin) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Profile

type Profile struct {
	Id           int    `json:"id"`
	Username     string `json:"username"`
	Name         string `json:"name"`
	ProfileImage string `json:"profile_image"`
	WebsiteUrl   string `json:"website_url"`
}

func (Profile) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Profile) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Profile) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Profile) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SearchRes

type SearchRes struct {
	Pins   []Pin     `json:"pins"`
	Boards []Board   `json:"boards"`
	Users  []Profile `json:"users"`
}

func (SearchRes) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SearchRes) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SearchRes) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SearchRes) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Session

type Session struct {
	UserId    int    `json:"id"`
	UserEmail string `json:"email"`
}

func (Session) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Session) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Session) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Session) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type User

type User struct {
	Id             int    `json:"id"`
	Username       string `json:"username"`
	Email          string `json:"email"`
	HashedPassword string `json:"-"`
	Name           string `json:"name"`
	ProfileImage   string `json:"profile_image"`
	WebsiteUrl     string `json:"website_url"`
	AccountType    string `json:"account_type"`
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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