Documentation ¶
Index ¶
- type Post
- type PostImpl
- func (p *PostImpl) Create(ctx context.Context, newPost *Post) (*Post, *http.Response, error)
- func (p *PostImpl) Delete(ctx context.Context, id int) (*http.Response, error)
- func (p *PostImpl) Get(ctx context.Context, id int) (*Post, *http.Response, error)
- func (p *PostImpl) List(ctx context.Context) ([]Post, *http.Response, error)
- type PostService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct { UserID int `json:"userId"` ID int `json:"id"` Title string `json:"title"` Body string `json:"body"` }
Post a post entry
type PostImpl ¶
type PostImpl struct {
// contains filtered or unexported fields
}
PostImpl implements the PostService interface
type PostService ¶
type PostService interface { Get(context.Context, int) (*Post, *http.Response, error) List(context.Context) ([]Post, *http.Response, error) Create(context.Context, *Post) (*Post, *http.Response, error) Delete(context.Context, int) (*http.Response, error) }
PostService interface defines service methods
Click to show internal directories.
Click to hide internal directories.