Docs, docs, docs!
This commit is contained in:
parent
12a85ee804
commit
dcb67fba63
7 changed files with 38 additions and 2 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"srs.epita.fr/fic-server/libfic"
|
||||
)
|
||||
|
||||
// getExercices returns all exercice directories existing in a given theme, considering the given Importer.
|
||||
func getExercices(i Importer, theme fic.Theme) ([]string, error) {
|
||||
var exercices []string
|
||||
|
||||
|
@ -25,6 +26,7 @@ func getExercices(i Importer, theme fic.Theme) ([]string, error) {
|
|||
return exercices, nil
|
||||
}
|
||||
|
||||
// findResolutionMovie searchs a resolution movie across a given exercice path.
|
||||
func findResolutionMovie(i Importer, exPath string) (videoURI string, err error) {
|
||||
var files []string
|
||||
|
||||
|
@ -42,6 +44,7 @@ func findResolutionMovie(i Importer, exPath string) (videoURI string, err error)
|
|||
return
|
||||
}
|
||||
|
||||
// SyncExercices imports new or updates existing exercices, in a given theme.
|
||||
func SyncExercices(i Importer, theme fic.Theme) []string {
|
||||
var errs []string
|
||||
|
||||
|
@ -162,6 +165,7 @@ func SyncExercices(i Importer, theme fic.Theme) []string {
|
|||
return errs
|
||||
}
|
||||
|
||||
// ApiListRemoteExercices is an accessor letting foreign packages to access remote exercices list.
|
||||
func ApiListRemoteExercices(theme fic.Theme, _ []byte) (interface{}, error) {
|
||||
return getExercices(GlobalImporter, theme)
|
||||
}
|
||||
|
|
Reference in a new issue