24 lines
571 B
Go
24 lines
571 B
Go
package plugin
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// ReviewSubmitter allows plugins to submit community reviews programmatically
|
|
// without importing CMS proto types.
|
|
type ReviewSubmitter interface {
|
|
SubmitReview(ctx context.Context, params SubmitReviewParams) (reviewID string, err error)
|
|
}
|
|
|
|
// SubmitReviewParams contains the fields needed to submit a community review.
|
|
type SubmitReviewParams struct {
|
|
TableID uuid.UUID
|
|
RowID uuid.UUID
|
|
OverallRating int32
|
|
ReviewText string
|
|
Ratings map[string]any
|
|
Photos []string
|
|
}
|