service

package
v0.0.0-...-4ef57ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2024 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL