Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + const ErrorCodeInternalServerError + const ErrorCodeInvalidRequest + const ErrorCodeValidationFailed + func NewAppError(code string, message string) error + func NewAppErrorWithCause(code string, message string, cause error) error + func Run(applicationconfig *applicationconfig.ApplicationConfig) error + type AppError struct + func (a *AppError) Error() string + type ErrorResponse struct + Code string + Message string + type LoginHandler struct + func NewLoginHandler(authService auth.Service, githubService github.Service, ...) *LoginHandler + func (l *LoginHandler) GithubLogin(c *gin.Context) + func (l *LoginHandler) GithubOAuth2Callback(c *gin.Context) + func (l *LoginHandler) TokenPayload(c *gin.Context) + type Middleware struct + func NewMiddleware(authService auth.Service) *Middleware + func (m *Middleware) AuthorizeToken() gin.HandlerFunc + type NoteHandler struct + func NewNoteHandler(githubService github.Service, userService user.Service) *NoteHandler + func (n *NoteHandler) DeleteNote(c *gin.Context) + func (n *NoteHandler) GetAllNotes(c *gin.Context) + func (n *NoteHandler) GetNote(c *gin.Context) + func (n *NoteHandler) GetNotesTree(c *gin.Context) + func (n *NoteHandler) SaveNote(c *gin.Context) + func (n *NoteHandler) SearchNotes(c *gin.Context) + type NoteRequestPayload struct + Content string + SHA string + type NoteResponsePayload struct + Content string + IsDir bool + Path string + SHA string + Size int + type NoteSearchResponsePayload struct + Notes []NoteResponsePayload + Total int + type PreferenceHandler struct + func NewPreferenceHandler(preferenceService preference.Service, githubService github.Service, ...) *PreferenceHandler + func (p *PreferenceHandler) AutoSetupRepo(c *gin.Context) + func (p *PreferenceHandler) GetRepos(c *gin.Context) + func (p *PreferenceHandler) SaveDefaultRepo(c *gin.Context) + type RepoPayload struct + DefaultBranch string + Name string + Visibility string + func (r RepoPayload) Validate() error + type UserHandler struct + func NewUserHandler(userService user.Service) *UserHandler + func (u *UserHandler) Profile(c *gin.Context) + type UserResponsePayload struct + AvatarURL string + DefaultRepo *RepoPayload + DisabledAt *time.Time + Email string + Location string + Name string