Documentation ¶
Index ¶
- func AddCommentEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func CommentsEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func CreateEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func DeleteCommentEndpoint(a realworld.ArticleService) endpoint.Endpoint
- func DeleteEndpoint(a realworld.ArticleService) endpoint.Endpoint
- func FavoriteEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func FeedEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func GetEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func ListEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func TagsEndpoint(a realworld.ArticleService) endpoint.Endpoint
- func UnfavoriteEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- func UpdateEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
- type AddCommentRequest
- type Article
- type Author
- type Comment
- type CommentResponse
- type CommentsRequest
- type CommentsResponse
- type CreateRequest
- type DeleteCommentRequest
- type DeleteRequest
- type DeleteResponse
- type FavoriteRequest
- type GetRequest
- type ListRequest
- type ListResponse
- type Response
- type Service
- func (s Service) AddComment(c realworld.Comment) (*realworld.Comment, error)
- func (s Service) Comments(a realworld.Article) ([]*realworld.Comment, error)
- func (s Service) Create(a realworld.Article) (*realworld.Article, error)
- func (s Service) Delete(a realworld.Article) error
- func (s Service) DeleteComment(c realworld.Comment) error
- func (s Service) Favorite(a realworld.Article, u realworld.User) (*realworld.Article, error)
- func (s Service) Feed(req realworld.FeedRequest) ([]*realworld.Article, int, error)
- func (s Service) Get(a realworld.Article) (*realworld.Article, error)
- func (s Service) List(req realworld.ListRequest) ([]*realworld.Article, int, error)
- func (s Service) Tags() ([]*realworld.Tag, error)
- func (s Service) Unfavorite(a realworld.Article, u realworld.User) (*realworld.Article, error)
- func (s Service) Update(slug string, a realworld.Article) (*realworld.Article, error)
- type TagsRequest
- type TagsResponse
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommentEndpoint ¶
func AddCommentEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func CommentsEndpoint ¶
func CommentsEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func CreateEndpoint ¶
func CreateEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func DeleteCommentEndpoint ¶
func DeleteCommentEndpoint(a realworld.ArticleService) endpoint.Endpoint
func DeleteEndpoint ¶
func DeleteEndpoint(a realworld.ArticleService) endpoint.Endpoint
func FavoriteEndpoint ¶
func FavoriteEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func FeedEndpoint ¶
func FeedEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func GetEndpoint ¶
func GetEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func ListEndpoint ¶
func ListEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func TagsEndpoint ¶
func TagsEndpoint(a realworld.ArticleService) endpoint.Endpoint
func UnfavoriteEndpoint ¶
func UnfavoriteEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
func UpdateEndpoint ¶
func UpdateEndpoint(a realworld.ArticleService, u realworld.UserService) endpoint.Endpoint
Types ¶
type AddCommentRequest ¶
type CommentResponse ¶
func NewCommentResponse ¶
func NewCommentResponse(c *realworld.Comment, u *realworld.User, userSrv realworld.UserService, err error) CommentResponse
func (CommentResponse) Failed ¶
func (r CommentResponse) Failed() error
type CommentsRequest ¶
type CommentsResponse ¶
func NewCommentsResponse ¶
func NewCommentsResponse( cc []*realworld.Comment, u *realworld.User, userSrv realworld.UserService, err error, ) CommentsResponse
type CreateRequest ¶
type DeleteCommentRequest ¶
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse struct {
Err error
}
type FavoriteRequest ¶
type GetRequest ¶
type ListRequest ¶
type ListResponse ¶
func NewListResponse ¶
func NewListResponse( articles []*realworld.Article, count int, u *realworld.User, userSrv realworld.UserService, err error, ) ListResponse
func (ListResponse) Failed ¶
func (r ListResponse) Failed() error
type Response ¶
func NewResponse ¶
type Service ¶
type Service struct {
Repo realworld.ArticleRepo
}
func (Service) AddComment ¶
func (Service) Unfavorite ¶
type TagsRequest ¶
type TagsRequest struct{}
type TagsResponse ¶
func (TagsResponse) Failed ¶
func (r TagsResponse) Failed() error
Click to show internal directories.
Click to hide internal directories.