review

package
v1.19.25 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, reviewID, userID primitive.ObjectID, forceUserID bool) error

func DeleteAll

func DeleteAll(ctx context.Context, userID primitive.ObjectID) error

func ProduceModeration

func ProduceModeration(ctx context.Context, review *parser.ReviewItem) error

func SetOK

func SetOK(ctx context.Context, reviewID primitive.ObjectID) error

Types

type Review

type Review struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	CompanyID primitive.ObjectID `bson:"c,omitempty"`
	UserID    primitive.ObjectID `bson:"u,omitempty"`
	Text      string             `bson:"t,omitempty"`
	Positive  bool               `bson:"p,omitempty"`
	Status    status             `bson:"s,omitempty"`
}

func Create

func Create(
	ctx context.Context,
	companyID,
	userID primitive.ObjectID,
	text string,
	positive bool,
) (
	Review,
	error,
)

func Get

func Get(ctx context.Context, companyID primitive.ObjectID, skip, limit int64) ([]Review, error)

Jump to

Keyboard shortcuts

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