ui

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AdminRole = "Admin"

AdminRole is admin

View Source
const WebUsage = "web"

WebUsage used for the uid

Variables

This section is empty.

Functions

func IsAdmin added in v0.0.8

func IsAdmin(c *gin.Context) bool

IsAdmin checks if admin

Types

type ReactAppWrapper

type ReactAppWrapper struct {
	// contains filtered or unexported fields
}

ReactAppWrapper encapsulates an app

func New

func New(cfg *config.Config,
	userStorer storage.UserStorer,
	codeConnector codeGenerator,
	h *hub.Hub,
	docHandler documentHandler,
	blobHandler blobHandler) *ReactAppWrapper

New Create a React app

func (ReactAppWrapper) Open

func (w ReactAppWrapper) Open(filepath string) (http.File, error)

Open opens a file from the fs (virtual)

func (*ReactAppWrapper) RegisterRoutes

func (app *ReactAppWrapper) RegisterRoutes(router *gin.Engine)

RegisterRoutes the apps routes

type WebUserClaims added in v0.0.5

type WebUserClaims struct {
	UserID    string `json:"UserID"`
	BrowserID string `json:"BrowserID"`
	Email     string
	Scopes    string `json:"scopes,omitempty"`
	Roles     []string
	jwt.StandardClaims
}

WebUserClaims the claims

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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