Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct {
ID int64 `json:"id"`
Title string `json:"title"`
CreatedAt time.Time `json:"createdAt"`
UserLogin string `json:"userLogin"`
Body *string `json:"body"`
}
Post is a struct representing one post
func (*Post) FromIOReader ¶
FromIOReader Creates a new post from a IOReader
func (*Post) FromJSONData ¶
FromJSONData Create a new post object from a json
func (*Post) ToJSONData ¶
ToJSONData return JSON representation of the object
type PostBody ¶
type PostBody struct {
Text string `json:"text"`
}
PostBody represents the body of a post, let this be just a string for now
Click to show internal directories.
Click to hide internal directories.