handlers

package
v0.0.0-...-acda5ee Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvancedSettingsPage

func AdvancedSettingsPage() web.HandlerFunc

AdvancedSettingsPage is the advanced settings page

func BlockUser

func BlockUser() web.HandlerFunc

BlockUser is used to block an existing user from using Templates

func ChangeUserEmail

func ChangeUserEmail() web.HandlerFunc

ChangeUserEmail register the intent of changing user email

func ChangeUserRole

func ChangeUserRole() web.HandlerFunc

ChangeUserRole changes given user role

func CheckAvailability

func CheckAvailability() web.HandlerFunc

CheckAvailability checks if given domain is available to be used

func CloseGitHubIssue

func CloseGitHubIssue() web.HandlerFunc

func CompleteSignInProfile

func CompleteSignInProfile() web.HandlerFunc

CompleteSignInProfile handles the action to update user profile

func CreateTenant

func CreateTenant() web.HandlerFunc

CreateTenant creates a new tenant

func CreateWebhook

func CreateWebhook() web.HandlerFunc

func DeleteGitHubConfig

func DeleteGitHubConfig() web.HandlerFunc

func DeleteUser

func DeleteUser() web.HandlerFunc

DeleteUser erases current user personal data and sign them out

func DeleteWebhook

func DeleteWebhook() web.HandlerFunc

func ExportBackupZip

func ExportBackupZip() web.HandlerFunc

ExportBackupZip returns a Zip file with all content

func ExportPostsToCSV

func ExportPostsToCSV() web.HandlerFunc

ExportPostsToCSV returns a CSV with all posts

func Favicon

func Favicon() web.HandlerFunc

Favicon returns the Templates favicon by given size

func GeneralSettingsPage

func GeneralSettingsPage() web.HandlerFunc

GeneralSettingsPage is the general settings page

func GenerateCheckoutLink() web.HandlerFunc

GenerateCheckoutLink generates a Paddle-hosted checkout link for the service subscription

func GetGitHubConfig

func GetGitHubConfig() web.HandlerFunc

func GetOAuthConfig

func GetOAuthConfig() web.HandlerFunc

GetOAuthConfig returns OAuth config based on given provider

func GetWebhookProps

func GetWebhookProps() web.HandlerFunc

func Gravatar

func Gravatar() web.HandlerFunc

Gravatar returns a gravatar picture of fallsback to letter avatar based on name

func Health

func Health() web.HandlerFunc

Health always returns OK

func Index

func Index() web.HandlerFunc

Index is the default home page

func LegalPage

func LegalPage(title, file string) web.HandlerFunc

LegalPage returns a legal page with content from a file

func LetterAvatar

func LetterAvatar() web.HandlerFunc

LetterAvatar returns a letter gravatar picture based on given name

func LogError

func LogError() web.HandlerFunc

LogError logs an error coming from the UI

func ManageAuthentication

func ManageAuthentication() web.HandlerFunc

ManageAuthentication is the page used by administrators to change site authentication settings

func ManageBilling

func ManageBilling() web.HandlerFunc

ManageBilling is the page used by administrators for billing settings

func ManageGitHub

func ManageGitHub() web.HandlerFunc

func ManageMembers

func ManageMembers() web.HandlerFunc

ManageMembers is the page used by administrators to change member's role

func ManageTags

func ManageTags() web.HandlerFunc

ManageTags is the home page for managing tags

func ManageWebhooks

func ManageWebhooks() web.HandlerFunc

ManageWebhooks is the page used by administrators to configure webhooks

func NotInvitedPage

func NotInvitedPage() web.HandlerFunc

NotInvitedPage renders the not invited page

func Notifications

func Notifications() web.HandlerFunc

Notifications is the home for unread and recent notifications

func OAuthAvatar

func OAuthAvatar() web.HandlerFunc

func OAuthCallback

func OAuthCallback() web.HandlerFunc

OAuthCallback handles the redirect back from the OAuth provider This callback can run on either Tenant or Login address If the request is for a sign in, we redirect the user to the tenant address If the request is for a sign up, we exchange the OAuth code and get the user profile

func OAuthEcho

func OAuthEcho() web.HandlerFunc

OAuthEcho exchanges OAuth Code for a user profile and return directly to the UI, without storing it

func OAuthToken

func OAuthToken() web.HandlerFunc

OAuthToken exchanges OAuth Code for a user profile The user profile is then used to either get an existing user on Templates or creating a new one Once Templates user is retrieved/created, an authentication cookie is store in user's browser

func OpenGitHubIssue

func OpenGitHubIssue() web.HandlerFunc

func Page

func Page(title, description, page string) web.HandlerFunc

Page returns a page without properties

func PostDetails

func PostDetails() web.HandlerFunc

PostDetails shows details of given Post by id

func PreviewWebhook

func PreviewWebhook() web.HandlerFunc

func ReOpenGitHubIssue

func ReOpenGitHubIssue() web.HandlerFunc

func ReadAllNotifications

func ReadAllNotifications() web.HandlerFunc

ReadAllNotifications marks all unread notifications as read

func ReadNotification

func ReadNotification() web.HandlerFunc

ReadNotification marks it as read and redirect to its content

func RegenerateAPIKey

func RegenerateAPIKey() web.HandlerFunc

RegenerateAPIKey regenerates current user's API Key

func RobotsTXT

func RobotsTXT() web.HandlerFunc

RobotsTXT return content of robots.txt file

func SaveOAuthConfig

func SaveOAuthConfig() web.HandlerFunc

SaveOAuthConfig is used to create/edit OAuth configurations

func SignInByEmail

func SignInByEmail() web.HandlerFunc

SignInByEmail sends a new email with verification key

func SignInByOAuth

func SignInByOAuth() web.HandlerFunc

SignInByOAuth is responsible for redirecting the user to the OAuth authorization URL for given provider A cookie is stored in user's browser with a random identifier that is later used to verify the authenticity of the request

func SignInPage

func SignInPage() web.HandlerFunc

SignInPage renders the sign in page

func SignOut

func SignOut() web.HandlerFunc

SignOut remove auth cookies

func SignUp

func SignUp() web.HandlerFunc

SignUp is the entry point for installation / signup

func Sitemap

func Sitemap() web.HandlerFunc

Sitemap returns the sitemap.xml of current site

func TestWebhook

func TestWebhook() web.HandlerFunc

func TotalUnreadNotifications

func TotalUnreadNotifications() web.HandlerFunc

TotalUnreadNotifications returns the total number of unread notifications

func UnblockUser

func UnblockUser() web.HandlerFunc

UnblockUser is used to unblock an existing user so they can use Templates again

func UpdateAdvancedSettings

func UpdateAdvancedSettings() web.HandlerFunc

UpdateAdvancedSettings update current tenant' advanced settings

func UpdateEmailAuthAllowed

func UpdateEmailAuthAllowed() web.HandlerFunc

UpdateEmailAuthAllowed update current tenant's allow email auth settings

func UpdateGitHubConfig

func UpdateGitHubConfig() web.HandlerFunc

func UpdateGitHubIntegration

func UpdateGitHubIntegration() web.HandlerFunc

func UpdatePrivacy

func UpdatePrivacy() web.HandlerFunc

UpdatePrivacy update current tenant's privacy settings

func UpdateSettings

func UpdateSettings() web.HandlerFunc

UpdateSettings update current tenant' settings

func UpdateUserSettings

func UpdateUserSettings() web.HandlerFunc

UpdateUserSettings updates current user settings

func UpdateWebhook

func UpdateWebhook() web.HandlerFunc

func UserSettings

func UserSettings() web.HandlerFunc

UserSettings is the current user's profile settings page

func VerifyChangeEmailKey

func VerifyChangeEmailKey() web.HandlerFunc

VerifyChangeEmailKey checks if key is correct and update user's email

func VerifySignInKey

func VerifySignInKey(kind enum.EmailVerificationKind) web.HandlerFunc

VerifySignInKey checks if verify key is correct and sign in user

func VerifySignUpKey

func VerifySignUpKey() web.HandlerFunc

VerifySignUpKey checks if verify key is correct, activate the tenant and sign in user

func ViewUploadedImage

func ViewUploadedImage() web.HandlerFunc

ViewUploadedImage returns any uploaded image by given ID and size

Types

type CloseGitHubIssuePayload

type CloseGitHubIssuePayload struct {
	State string `json:"state"`
}

type GitHubIssuePayload

type GitHubIssuePayload struct {
	Title string `json:"title"`
	Body  string `json:"body"`
}

type GitHubIssueResponse

type GitHubIssueResponse struct {
	Number int `json:"number"`
}

type NewLogError

type NewLogError struct {
	Message string `json:"message"`
	Data    any    `json:"data"`
}

NewLogError is the input model for UI errors

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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