comments

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	CommentsSVC   string
	ModerationSVC string
	HttpClient    *client.HttpClient
}

func NewClient

func NewClient(commentsService, moderationService string) *Client

func (*Client) AddComment

func (c *Client) AddComment(ctx context.Context, comment storage.Comment) (api.CommentCreatedResponse, error)

func (*Client) GetComments

func (c *Client) GetComments(ctx context.Context, articleID int) ([]storage.Comment, error)

func (*Client) Moderate

func (c *Client) Moderate(ctx context.Context, comment storage.Comment) bool

Forward comment to moderation service. Return false either if moderation fails or any error occured in process.

Jump to

Keyboard shortcuts

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