Documentation ¶
Index ¶
- type ContentService
- func (srv *ContentService) DeleteContent(ctx context.Context, req *content.ContentIdRequest) (*empty.Empty, error)
- func (srv *ContentService) GetContent(ctx context.Context, rdr *content.ContentIdRequest) (*content.Content, error)
- func (srv *ContentService) GetContentBySlug(ctx context.Context, rdr *content.ContentRequest) (*content.Content, error)
- func (srv *ContentService) ListContents(ctx context.Context, req *content.ListParameters) (*content.ContentCollection, error)
- func (srv *ContentService) StoreContent(ctx context.Context, req *content.StoreContentRequest) (*content.Content, error)
- func (srv *ContentService) UpdateContent(ctx context.Context, req *content.UpdateContentRequest) (*content.Content, error)
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentService ¶
type ContentService struct { *aphgrpc.Service content.UnimplementedContentServiceServer // contains filtered or unexported fields }
func NewContentService ¶
func NewContentService(srvP *Params) (*ContentService, error)
func (*ContentService) DeleteContent ¶
func (srv *ContentService) DeleteContent( ctx context.Context, req *content.ContentIdRequest, ) (*empty.Empty, error)
func (*ContentService) GetContent ¶
func (srv *ContentService) GetContent( ctx context.Context, rdr *content.ContentIdRequest, ) (*content.Content, error)
func (*ContentService) GetContentBySlug ¶
func (srv *ContentService) GetContentBySlug( ctx context.Context, rdr *content.ContentRequest, ) (*content.Content, error)
func (*ContentService) ListContents ¶
func (srv *ContentService) ListContents( ctx context.Context, req *content.ListParameters, ) (*content.ContentCollection, error)
func (*ContentService) StoreContent ¶
func (srv *ContentService) StoreContent( ctx context.Context, req *content.StoreContentRequest, ) (*content.Content, error)
func (*ContentService) UpdateContent ¶
func (srv *ContentService) UpdateContent( ctx context.Context, req *content.UpdateContentRequest, ) (*content.Content, error)
type Params ¶
type Params struct { Repository repository.ContentRepository `validate:"required"` Publisher message.Publisher `validate:"required"` Options []aphgrpc.Option `validate:"required"` Group string `validate:"required"` }
ServiceParams are the attributes that are required for creating new ContentService.
Click to show internal directories.
Click to hide internal directories.