achievements

package
v0.0.0-...-ac44e76 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionCompleted      = "completed"
	ActionCompletedItems = "completed_items"

	CollectionTopics  = "topics"
	CollectionLessons = "lessons"
	CollectionTasks   = "tasks"
)

Constants for string keys

Variables

This section is empty.

Functions

func CheckAllAchievements

func CheckAllAchievements(ctx context.Context, queries *sqlc.Queries, loaders *common.BatchLoaders) error

CheckAllAchievements checks if any achievement has been achieved

func CheckCompletedLessonAchivements

func CheckCompletedLessonAchivements(ctx context.Context, queries *sqlc.Queries, loaders *common.BatchLoaders, profileID uuid.UUID) ([]achievedResult, error)

func CheckNewAchievements

func CheckNewAchievements(ctx context.Context, queries *sqlc.Queries, loaders *common.BatchLoaders, action Action) error

CheckNewAchievements achieved since last check

Types

type Action

type Action struct {
	Collection string
	Action     string
}

Action defines what type of activity has happened that might trigger a new Achievement

Jump to

Keyboard shortcuts

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