Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrDoesNotExist = NewError("entity does not exist") ErrAlreadyExist = NewError("entity already exist") ErrInvalid = NewError("entity is invalid") ErrConflict = NewError("entity conflicts with other entity") ErrAccessDenied = NewError("access to entity denied") ErrValidation = NewError("entity validation failed") ErrBadForeign = NewError("entity have bad foreign relation") )
Functions ¶
Types ¶
type Error ¶
type Error struct {
Message string `json:"message"`
}
func (Error) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Error) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Error) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Error) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Errors ¶
type Errors []Error
func (Errors) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Errors) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Errors) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Errors) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Forum ¶
type Forum struct { ID int64 `json:"-"` Slug string `json:"slug"` Title string `json:"title"` User string `json:"user"` Posts int64 `json:"posts,omitempty"` Threads int64 `json:"threads,omitempty"` }
func (Forum) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Forum) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Forum) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Forum) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Forums ¶
type Forums []Forum
func (Forums) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Forums) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Forums) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Forums) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Post ¶
type Post struct { Author string `json:"author"` Message string `json:"message"` Created time.Time `json:"created,omitempty"` Forum string `json:"forum,omitempty"` ID int64 `json:"id,omitempty"` IsEdited bool `json:"isEdited,omitempty"` Parent int64 `json:"parent,omitempty"` Thread int32 `json:"thread,omitempty"` }
func (Post) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Post) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Post) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Post) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type PostFullInfo ¶
type PostFullInfo struct { Author *User `json:"author,omitempty"` Forum *Forum `json:"forum,omitempty"` Post *Post `json:"post,omitempty"` Thread *Thread `json:"thread,omitempty"` }
func (PostFullInfo) MarshalEasyJSON ¶
func (v PostFullInfo) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PostFullInfo) MarshalJSON ¶
func (v PostFullInfo) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PostFullInfo) UnmarshalEasyJSON ¶
func (v *PostFullInfo) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PostFullInfo) UnmarshalJSON ¶
func (v *PostFullInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PostUpdate ¶
type PostUpdate struct { Description string `json:"description,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 PostUpdates ¶
type PostUpdates []PostUpdate
func (PostUpdates) MarshalEasyJSON ¶
func (v PostUpdates) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PostUpdates) MarshalJSON ¶
func (v PostUpdates) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PostUpdates) UnmarshalEasyJSON ¶
func (v *PostUpdates) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PostUpdates) UnmarshalJSON ¶
func (v *PostUpdates) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Posts ¶
type Posts []Post
func (Posts) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Posts) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Posts) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Posts) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type PostsFulls ¶
type PostsFulls []PostFullInfo
func (PostsFulls) MarshalEasyJSON ¶
func (v PostsFulls) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PostsFulls) MarshalJSON ¶
func (v PostsFulls) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PostsFulls) UnmarshalEasyJSON ¶
func (v *PostsFulls) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PostsFulls) UnmarshalJSON ¶
func (v *PostsFulls) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Thread ¶
type Thread struct { Author string `json:"author"` Title string `json:"title"` Message string `json:"message"` ID int32 `json:"id,omitempty"` Forum string `json:"forum,omitempty"` Created time.Time `json:"created,omitempty"` Slug string `json:"slug,omitempty"` Votes int32 `json:"votes,omitempty"` }
func (Thread) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Thread) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Thread) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Thread) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Threads ¶
type Threads []Thread
func (Threads) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Threads) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Threads) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Threads) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type User ¶
type User struct { Email string `json:"email"` Fullname string `json:"fullname"` Nickname string `json:"nickname,omitempty"` About string `json:"about,omitempty"` }
func (User) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (User) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*User) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*User) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type UserUpdate ¶
type UserUpdate struct { About string `json:"about,omitempty"` Email string `json:"email,omitempty"` Fullname string `json:"fullname,omitempty"` }
func (UserUpdate) MarshalEasyJSON ¶
func (v UserUpdate) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (UserUpdate) MarshalJSON ¶
func (v UserUpdate) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*UserUpdate) UnmarshalEasyJSON ¶
func (v *UserUpdate) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*UserUpdate) UnmarshalJSON ¶
func (v *UserUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (UserUpdate) Validate ¶
func (userUpdate UserUpdate) Validate() error
type UserUpdates ¶
type UserUpdates []UserUpdate
func (UserUpdates) MarshalEasyJSON ¶
func (v UserUpdates) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (UserUpdates) MarshalJSON ¶
func (v UserUpdates) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*UserUpdates) UnmarshalEasyJSON ¶
func (v *UserUpdates) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*UserUpdates) UnmarshalJSON ¶
func (v *UserUpdates) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Users ¶
type Users []User
func (Users) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Users) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Users) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Users) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Vote ¶
func (Vote) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Vote) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Vote) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Vote) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Votes ¶
type Votes []Vote
func (Votes) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Votes) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Votes) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Votes) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface