learningstorage

package
v0.0.0-...-47bc475 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLearningStore

func NewLearningStore() (*learningStore, error)

Types

type LearningStore

type LearningStore interface {

	// Learning goal operations
	CreateGoal(userID int, title string, startDate time.Time, endDate time.Time) (int64, error)
	UpdateGoal(id int, userID int, title string, startDate time.Time, endDate time.Time) error
	DeleteGoal(id int, userID int) error
	GetAllGoalsByUserID(userID int) ([]learningmodel.LearningGoals, error)
	GetGoalByID(id int) (learningmodel.LearningGoals, error)

	// Learning entry operations
	CreateEntry(goalID int, user_id int, title string, description string) (int64, error)
	UpdateEntry(id int, userID int, title string, description string, status string) error
	DeleteEntry(id int, userID int) error
	GetAllEntriesByGoalID(goalID int) ([]learningmodel.LearningEntry, error)
	GetEntryByID(id int) (learningmodel.LearningEntry, error)

	// Learning file operations
	CreateFile(entryID int, userID int, fileName string, fileSize int64, fileType string, filePath string) (int64, error)
	UpdateFile(id int, userID int, fileName string, fileSize int64, fileType string, filePath string) error
	DeleteFile(id int, userID int) error
	GetAllFilesByEntryID(entryID int) ([]learningmodel.LearningFiles, error)
	GetFileByID(id int) (learningmodel.LearningFiles, error)
}

Jump to

Keyboard shortcuts

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