Documentation
¶
Index ¶
- Constants
- func ApplyCacheBuster(content string, extensions []string) string
- func CacheReader(path string) (string, error)
- func CompareHashAndPassword(hash, password string) error
- func CreateFakeUsers(a string)
- func CreateSuperuser()
- func FileCacheInit(baseDir string, baseUrl string, apiUrl string, cache *map[string][]byte) error
- func GenerateTokenHex(nBytes int) (string, error)
- func HashPassword(password string) (string, error)
- func IsValidEmail(email string) bool
- func RespondWithJSON(w http.ResponseWriter, payload interface{})
- func Root(w http.ResponseWriter, r *http.Request)
- func RunGoose(cmd string)
- func SetUp() (*pgxpool.Pool, func())
- func SetupGroupsAndPermissions()
- type App
- type ErrorResponse
- type Info
- type InfoKey
- type ToastResponse
Constants ¶
View Source
const HandleOrganizationPermission = "handleorganization"
View Source
const OrganizationAdminGroup = "organizationadmin"
Variables ¶
This section is empty.
Functions ¶
func ApplyCacheBuster ¶
Replaces file paths in the content with paths that include a cache buster string.
func CacheReader ¶
cacheReader processes a file path by removing characters after '--' and ensuring it has an appropriate extension.
func CompareHashAndPassword ¶
func CreateFakeUsers ¶
func CreateFakeUsers(a string)
func CreateSuperuser ¶
func CreateSuperuser()
func FileCacheInit ¶
func GenerateTokenHex ¶
func HashPassword ¶
func IsValidEmail ¶
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, payload interface{})
func SetupGroupsAndPermissions ¶
func SetupGroupsAndPermissions()
This does setup your groups and permissions, so that you do not have to enter the admin dashboard. It is purely additive. It will not delete anything. Use this to make sure that your permissions are added to the database.
Types ¶
type App ¶
func (*App) AuthMiddleware ¶
This makes sure that only logged in users can access the route. If you enter a group or permission only users with one of them will be able to use this route. It adds the user to the context as well.
type ErrorResponse ¶
type ToastResponse ¶
Click to show internal directories.
Click to hide internal directories.