models

package
v0.0.0-...-e732540 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorConflict = errors.New("Conflict")
	ErrorNotFound = errors.New("NotFound")
	ErrorInternal = errors.New("InternalError")
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

func (Error) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Error) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Error) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Error) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Forum

type Forum struct {
	ID      int    `json:"-"`
	Title   string `json:"title"`
	User    string `json:"user"`
	Slug    string `json:"slug"`
	Posts   int    `json:"posts,omitempty"`
	Threads int    `json:"threads,omitempty"`
}

func (Forum) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Forum) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Forum) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Forum) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Post

type Post struct {
	ID       int              `json:"id,omitempty"`
	Parent   int              `json:"parent,omitempty"`
	Author   string           `json:"author"`
	Message  string           `json:"message"`
	IsEdited bool             `json:"isEdited,omitempty"`
	Forum    string           `json:"forum,omitempty"`
	Thread   int              `json:"thread,omitempty"`
	Created  time.Time        `json:"created,omitempty"`
	Path     pgtype.Int8Array `json:"path,omitempty"`
}

type PostFull

type PostFull struct {
	Thread *Thread `json:"thread,omitempty"`
	Forum  *Forum  `json:"forum,omitempty"`
	Author *User   `json:"author,omitempty"`
	Post   Post    `json:"post,omitempty"`
}

func (PostFull) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PostFull) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PostFull) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PostFull) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PostUpdate

type PostUpdate struct {
	ID      int    `json:"id,omitempty"`
	Message string `json:"message,omitempty"`
}

func (PostUpdate) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PostUpdate) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PostUpdate) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PostUpdate) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PostsList

type PostsList []Post

func (PostsList) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PostsList) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PostsList) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PostsList) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Status

type Status struct {
	UsersCount   int64 `json:"user"`
	ForumsCount  int64 `json:"forum"`
	ThreadsCount int64 `json:"thread"`
	PostsCount   int64 `json:"post"`
}

func (Status) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Status) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Status) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Status) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Thread

type Thread struct {
	ID      int       `json:"id,omitempty"`
	Title   string    `json:"title"`
	Author  string    `json:"author"`
	Forum   string    `json:"forum"`
	Message string    `json:"message"`
	Votes   int       `json:"votes,omitempty"`
	Slug    string    `json:"slug,omitempty"`
	Created time.Time `json:"created,omitempty"`
}

func (Thread) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Thread) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Thread) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Thread) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type User

type User struct {
	ID       int    `json:"-"`
	Nickname string `json:"nickname,omitempty"`
	Fullname string `json:"fullname"`
	About    string `json:"about,omitempty"`
	Email    string `json:"email"`
}

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

type Vote

type Vote struct {
	Nickname string `json:"nickname"`
	Voice    int    `json:"voice"`
	Thread   int    `json:"-"`
}

func (Vote) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Vote) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Vote) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Vote) UnmarshalJSON

func (v *Vote) 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