models

package
v0.0.0-...-c50c15a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

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 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 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 SortParams

type SortParams struct {
	Limit string
	Since string
	Desc  string
	Sort  string
}

easyjson:skip

type Status

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

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