commend

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

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorsLoadingComments = errors.New("Error loading comment by CommentId")
	ErrorNotImplemented   = errors.New("The method is not implemented as of now")
)

Functions

This section is empty.

Types

type Commend

type Commend struct {
	CommendId string
	PostId    string
	Body      string
	Author    string
}

type CommentStore

type CommentStore interface {
	GetComment(context.Context, string) (Commend, error)
}

type Service

type Service struct {
	CommentStore CommentStore
}

func NewService

func NewService(commentStore CommentStore) *Service

func (*Service) CreateComments

func (s *Service) CreateComments(ctx context.Context, cmt Commend) error

func (*Service) DeleteComments

func (s *Service) DeleteComments(ctx context.Context, CommendId string) (Commend, error)

func (*Service) GetComment

func (s *Service) GetComment(ctx context.Context, CommendId string) (Commend, error)

func (*Service) UpdateComments

func (s *Service) UpdateComments(ctx context.Context, cmt Commend) error

Jump to

Keyboard shortcuts

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