Documentation
¶
Overview ¶
Package controllers contains all the controllers that are used to controll various routes
Index ¶
- type Auth
- type Links
- func (l *Links) CheckKey(c *fiber.Ctx) error
- func (l *Links) DeleteLink(c *fiber.Ctx) error
- func (l *Links) DeleteLinks(c *fiber.Ctx) error
- func (l *Links) GetLinks(c *fiber.Ctx) error
- func (l *Links) New(c *fiber.Ctx) error
- func (l *Links) Update(c *fiber.Ctx) error
- func (l *Links) UpdateKey(c *fiber.Ctx) error
- func (l *Links) UpdateURL(c *fiber.Ctx) error
- type OAuth
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { H *initializers.H Env *config.Env }
Auth is a struct containing the Auth controllers
func (*Auth) RefreshToken ¶
RefreshToken is a function that is used to refresh the access token by providing the refresh token
type Links ¶
type Links struct { H *initializers.H Env *config.Env }
Links contains all the operations that are related to links
func (*Links) CheckKey ¶
CheckKey is a function that is used to check wether a given key is used previously in the database
func (*Links) DeleteLink ¶
DeleteLink is a function to delete a link with a given key
func (*Links) DeleteLinks ¶
DeleteLinks is a function that is used to delete all the links that belong to the user
type OAuth ¶
type OAuth struct { H *initializers.H Env *config.Env }
OAuth contains oauth releated controllers
func (*OAuth) GithubOAuthCalback ¶
GithubOAuthCalback is a function that is used by Github to provide a unique code for the user who just tried to login
func (*OAuth) RedirectToGitHubOAuthFlow ¶
RedirectToGitHubOAuthFlow redirect the user to the Github reidrect URL to login with Github
type User ¶
type User struct { H *initializers.H Env *config.Env }
User contains all the user related controllers
func (*User) CheckUsername ¶
CheckUsername is a function to check wether the username is availale or not
func (*User) UpdateEmail ¶
UpdateEmail is a function that is used to update the email of the user
func (*User) UpdateName ¶
UpdateName is a function to update the name of the user
func (*User) UpdateUsername ¶
UpdateUsername is a function to change the username of the username to another valid username