models

package
v0.0.0-...-c7b0411 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conflict      = errors.New("conflict")
	InternalError = errors.New("InternalError")
	NotFound      = errors.New("NotFound")
)

Functions

This section is empty.

Types

type ErrorResponse

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

func (ErrorResponse) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ErrorResponse) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ErrorResponse) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ErrorResponse) UnmarshalJSON

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

type Info struct {
	Users   int64 `json:"user"`
	Forums  int64 `json:"forum"`
	Threads int64 `json:"thread"`
	Posts   int64 `json:"post"`
}

func (Info) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Info) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Info) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Info) UnmarshalJSON

func (v *Info) 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.Int4Array `json:"path,omitempty"`
}

func (Post) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Post) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Post) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Post) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PostDetailed

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

func (PostDetailed) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PostDetailed) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PostDetailed) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PostDetailed) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type RequestParameters

type RequestParameters struct {
	Desc     bool   `json:"desc"`
	Limit    int    `json:"limit"`
	Since    string `json:"since"`
	Sort     string `json:"sort"`
	SinceInt int    `json:"sinceInt"`
}

func (RequestParameters) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestParameters) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*RequestParameters) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestParameters) UnmarshalJSON

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