model

package
v0.0.0-...-350df58 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RatingEventTypePut    = "put"
	RatingEventTypeDelete = "delete"
)

Rating event types.

View Source
const (
	RecordTypeMovie = RecordType("movie")
)

Existing record types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rating

type Rating struct {
	RecordID   string      `json:"recordId"`
	RecordType string      `json:"recordType"`
	UserID     UserID      `json:"userId"`
	Value      RatingValue `json:"value"`
}

Rating define an individual rating created by a user for some record.

type RatingEvent

type RatingEvent struct {
	RecordID   string          `json:"recordId"`
	RecordType string          `json:"recordType"`
	UserID     UserID          `json:"userId"`
	Value      RatingValue     `json:"value"`
	EventType  RatingEventType `json:"eventType"`
}

RatingEvent defines an event containing rating information.

type RatingEventType

type RatingEventType string

RatingEventType defines the type of a rating event.

type RatingValue

type RatingValue int

RatingValue defines a value of a rating record.

type RecordID

type RecordID string

RecordID defines a record id. Together with RecordType identifies unique records across all types.

type RecordType

type RecordType string

RecordType defines a record type. Together with RecordID identifies unique records across all types.

type UserID

type UserID string

UserID defines a user id.

Jump to

Keyboard shortcuts

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