Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/cbrom/Go-LMS
/ functions
Functions
256 in github.com/cbrom/Go-LMS
⨍
Functions
256
◇
Types & classes
55
↓ 114 callers
Method
GetID
GetID returns Id of the model
pkg/utils/utils.go:25
↓ 76 callers
Method
Delete
Delete deletes user by id
cmd/models/user.model.go:131
↓ 51 callers
Method
SetID
SetID sets Id of the model
pkg/utils/utils.go:30
↓ 50 callers
Method
FetchByID
FetchByID fetches User by id
cmd/models/user.model.go:87
↓ 16 callers
Method
UpdateOne
UpdateOne updates a given user
cmd/models/user.model.go:122
↓ 15 callers
Function
CreateCourse
CreateCourse creates a course mock for testing
cmd/models/util_test.go:55
↓ 15 callers
Method
SoftDelete
SoftDelete set's deleted at date
cmd/models/user.model.go:140
↓ 9 callers
Function
CreateLevel
CreateLevel creates a level mock for testing
cmd/models/util_test.go:75
↓ 8 callers
Function
CreateTargetGroup
CreateTargetGroup creates a level target group mock for testing
cmd/models/util_test.go:152
↓ 7 callers
Method
Create
** CRUD functions */ Create creates a new user record
cmd/models/user.model.go:72
↓ 7 callers
Function
CreateTarget
(targetGroup models.TargetGroup)
cmd/models/util_test.go:168
↓ 7 callers
Function
CreateUser
CreateUser creates a user mock for testing
cmd/models/util_test.go:34
↓ 6 callers
Method
GetCourse
** Relationship functions */ GetCourse returns the associated course of the level
cmd/models/level.model.go:42
↓ 5 callers
Function
AssignAuthor
AssignAuthor assignes a user to a course
cmd/models/util_test.go:91
↓ 5 callers
Function
parse
parse will reflect over the provided struct value and build a collection of all possible config arguments.
pkg/flag/flag.go:87
↓ 4 callers
Function
CreateCertificate
CreateCertificate creates a certificate mock for testing
cmd/models/util_test.go:104
↓ 4 callers
Function
CreateQuiz
(target models.Target)
cmd/models/util_test.go:242
↓ 3 callers
Function
CreateQuizQuestion
(quiz models.Quiz)
cmd/models/util_test.go:254
↓ 3 callers
Function
CreateStudentCourse
CreateStudentCourse creates a student and assigns it a course for testing
cmd/models/util_test.go:138
↓ 3 callers
Function
CreateTargetVersion
(target models.Target)
cmd/models/util_test.go:188
↓ 3 callers
Method
GenerateToken
GenerateToken generates a new token based on provided claims
pkg/auth/auth.go:92
↓ 3 callers
Function
Initialize
Initialize gets the config and returns a database pointer
pkg/database/database.go:13
↓ 3 callers
Function
LoadConfig
LoadConfig read env vars
configs/db.config.go:36
↓ 3 callers
Function
Migrate
Migrate migrates gorm models
migrations/migration.go:10
↓ 3 callers
Function
SetRepoDB
SetRepoDB global db handler
cmd/models/repository.go:15
↓ 3 callers
Function
apply
apply reads the command line arguments and applies any overrides to the provided struct value.
pkg/flag/flag.go:152
↓ 2 callers
Function
CreateAnswerOption
(quizQuestion models.QuizQuestion)
cmd/models/util_test.go:267
↓ 2 callers
Function
CreateContentBlock
(targetVersion models.TargetVersion)
cmd/models/util_test.go:200
↓ 2 callers
Function
CreateEvaluationCriteria
(course models.Course)
cmd/models/util_test.go:220
↓ 2 callers
Method
GetCertificates
** * Relationship functions */ GetCertificates returns course certificates
cmd/models/course.model.go:49
↓ 2 callers
Method
GetTarget
** * Relationship functions */ GetTarget returns the quiz target
cmd/models/quiz.model.go:38
↓ 2 callers
Method
GetUser
GetUser returns the Course Author of this relationship
cmd/models/course_author.model.go:44
↓ 2 callers
Function
KeyGen
KeyGen creates an x509 private key for signing auth tokens.
pkg/auth/key_gen.go:17
↓ 2 callers
Function
NewAuthenticator
NewAuthenticator returns a new authenticator params: - storage - storage type (file or memory for now)
pkg/auth/auth.go:62
↓ 2 callers
Function
NewAuthenticatorFile
NewAuthenticatorFile is a help function that inits a new Authenticator using the file storage.
pkg/auth/storage_file.go:47
↓ 2 callers
Method
ParseClaims
ParseClaims decodes token to a claims struct
pkg/auth/auth.go:108
↓ 2 callers
Function
Process
Process compares the specified command line arguments against the provided struct value and updates the fields that are identified.
pkg/flag/flag.go:18
↓ 2 callers
Function
display
display provides a pretty print display of the command line arguments.
pkg/flag/flag.go:41
↓ 2 callers
Function
update
update applies the value provided on the command line to the struct.
pkg/flag/flag.go:213
↓ 1 callers
Function
ApplyResolvers
ApplyResolvers applies root queries to graphql server
cmd/graphql/resolvers/resolvers.go:21
↓ 1 callers
Function
ApplyRoutes
ApplyRoutes applies router to gin engine
cmd/api/handlers/routes.go:23
↓ 1 callers
Function
CloseDB
CloseDB closes handler db
cmd/models/repository.go:20
↓ 1 callers
Function
ConnectToTestDatabase
ConnectToTestDatabase connects to a test db (defined in .env)
cmd/models/util_test.go:22
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new course record
cmd/models/course.model.go:78
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new quiz question record
cmd/models/quiz_question.model.go:66
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new level record
cmd/models/level.model.go:56
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new answer options record
cmd/models/answer_option.model.go:48
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new certificate record
cmd/models/issued_certificate.model.go:47
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new target group record
cmd/models/target_group.model.go:55
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new course author record
cmd/models/course_author.model.go:58
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new certificate record
cmd/models/certificate.model.go:61
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new quiz record
cmd/models/quiz.model.go:52
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new target record
cmd/models/target.model.go:71
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new target version record
cmd/models/target_version.model.go:52
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new course student record
cmd/models/student_course.model.go:52
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new content block record
cmd/models/content_block.model.go:50
↓ 1 callers
Method
Create
** CRUD functions */ Create creates a new evaluation criteria record
cmd/models/evaluation_criteria.model.go:51
↓ 1 callers
Function
CreateIssuedCertificate
CreateIssuedCertificate creates an issued certificate mock
cmd/models/util_test.go:125
↓ 1 callers
Method
Current
Current returns the most recently generated private key.
pkg/auth/storage.go:16
↓ 1 callers
Method
Delete
Delete deletes course by id
cmd/models/course.model.go:112
↓ 1 callers
Method
Delete
Delete deletes quiz question by id
cmd/models/quiz_question.model.go:100
↓ 1 callers
Method
Delete
Delete deletes level by id
cmd/models/level.model.go:90
↓ 1 callers
Method
Delete
Delete deletes answer options by id
cmd/models/answer_option.model.go:82
↓ 1 callers
Method
Delete
Delete deletes certificate by id
cmd/models/issued_certificate.model.go:81
↓ 1 callers
Method
Delete
Delete deletes target group by id
cmd/models/target_group.model.go:89
↓ 1 callers
Method
Delete
Delete deletes course author by id
cmd/models/course_author.model.go:92
↓ 1 callers
Method
Delete
Delete deletes certificate by id
cmd/models/certificate.model.go:95
↓ 1 callers
Method
Delete
Delete deletes quiz by id
cmd/models/quiz.model.go:86
↓ 1 callers
Method
Delete
Delete deletes target by id
cmd/models/target.model.go:105
↓ 1 callers
Method
Delete
Delete deletes target version by id
cmd/models/target_version.model.go:86
↓ 1 callers
Method
Delete
Delete deletes course student by id
cmd/models/student_course.model.go:86
↓ 1 callers
Method
Delete
Delete deletes content block by id
cmd/models/content_block.model.go:84
↓ 1 callers
Method
Delete
Delete deletes evaluation criteria by id
cmd/models/evaluation_criteria.model.go:85
↓ 1 callers
Method
Error
()
pkg/utils/utils.go:67
↓ 1 callers
Method
FetchByEmail
FetchByEmail fetches User by email
cmd/models/user.model.go:100
↓ 1 callers
Method
GetAnswer
GetAnswer returns the answer of a question
cmd/models/quiz_question.model.go:46
↓ 1 callers
Method
GetAnswerOptions
** Relationship functions */ GetAnswerOptions returns answer options of a question
cmd/models/quiz_question.model.go:41
↓ 1 callers
Method
GetAuthoredCourses
** Relationship functions */ GetAuthoredCourses returns a list of authored courses
cmd/models/user.model.go:58
↓ 1 callers
Method
GetAuthors
GetAuthors returns course authors
cmd/models/course.model.go:54
↓ 1 callers
Method
GetCertificate
** * Relationship functions */ GetCertificate returns the certificate
cmd/models/issued_certificate.model.go:38
↓ 1 callers
Method
GetContentBlocks
GetContentBlocks returns content blocks of this version
cmd/models/target_version.model.go:43
↓ 1 callers
Method
GetCourses
GetCourses returns a list of courses from a list of authored courses
cmd/models/user.model.go:63
↓ 1 callers
Method
GetEvaluationCriterias
GetEvaluationCriterias returns course evaluation criterias
cmd/models/course.model.go:59
↓ 1 callers
Method
GetIssuer
GetIssuer returns course author from certificate
cmd/models/certificate.model.go:52
↓ 1 callers
Method
GetLevel
** * Relationship functions */ GetLevel returns the level of the target group
cmd/models/target_group.model.go:41
↓ 1 callers
Method
GetLevels
GetLevels returns course levels
cmd/models/course.model.go:64
↓ 1 callers
Method
GetQuestion
** Relationship functions */ GetQuestion returns the QuizQuestion of this answer
cmd/models/answer_option.model.go:39
↓ 1 callers
Method
GetQuiz
GetQuiz returns the quiz of this question
cmd/models/quiz_question.model.go:57
↓ 1 callers
Method
GetQuizQuestions
GetQuizQuestions returns a list of quiz questions of this quiz
cmd/models/quiz.model.go:43
↓ 1 callers
Method
GetQuizzes
GetQuizzes returns a list of quizzes
cmd/models/target.model.go:62
↓ 1 callers
Method
GetStudents
GetStudents returns course students
cmd/models/course.model.go:69
↓ 1 callers
Method
GetTargetGroup
** * Relationship functions */ GetTargetGroup returns target group
cmd/models/target.model.go:52
↓ 1 callers
Method
GetTargetGroups
GetTargetGroups returns the target groups of a level
cmd/models/level.model.go:47
↓ 1 callers
Method
GetTargets
GetTargets returns the list of targets
cmd/models/target_group.model.go:46
↓ 1 callers
Function
GetTimeFromStamp
GetTimeFromStamp changes timestamp string to *time.Time
cmd/graphql/resolvers/user.resolver.go:31
↓ 1 callers
Method
GetVersions
GetVersions returns a list of target versions
cmd/models/target.model.go:57
↓ 1 callers
Function
InjectDB
InjectDB injects database to gin server
pkg/database/database.go:21
↓ 1 callers
Function
JWTAuthMiddleware
JWTAuthMiddleware gets token from header and sets claims and auth key in the context
pkg/middlewares/auth.go:12
↓ 1 callers
Method
Keys
Keys returns a map of private keys by kID.
pkg/auth/storage.go:14
↓ 1 callers
Function
NewKeyFunc
NewKeyFunc is a multiple implementation of KeyFunc that supports a map of keys
pkg/auth/auth.go:20
next →
1–100 of 256, ranked by callers