Documentation
¶
Index ¶
- Variables
- func CheckAccess(ctx *fiber.Ctx, logger *zap.SugaredLogger, ...) error
- func CreateNewPad(ds db.DataStore) *pad.Pad
- func GetTxtFromAText(retrievedPad *pad.Pad, atext apool.AText) (*string, error)
- func HandlePadOpen(c *fiber.Ctx, uiAssets embed.FS, retrievedSettings *settings.Settings) error
- func NormalizeAuthzLevel(level interface{}) (*string, error)
- func SplitRemoveLastRune(s string) []string
- func UserCanModify(padId *string, req *webaccess.SocketClientRequest, ...) bool
- type ClientType
- type GlobalPadCache
- type GrantedAccess
- type IdRequest
- type LineModel
- type List
- type Manager
- func (m *Manager) DoesPadExist(padID string) (*bool, error)
- func (m *Manager) GetPad(padID string, text *string, authorId *string) (*pad.Pad, error)
- func (m *Manager) IsValidPadId(padID string) bool
- func (m *Manager) RemovePad(padID string) error
- func (m *Manager) SanitizePadId(padID string) (*string, error)
- func (m *Manager) UnloadPad(id string)
- type ReadOnlyManager
- func (r *ReadOnlyManager) GetIds(id *string) (*IdRequest, error)
- func (r *ReadOnlyManager) GetPadId(readonlyId string) (*string, error)
- func (r *ReadOnlyManager) GetReadOnlyId(pad string) string
- func (r *ReadOnlyManager) IsReadOnlyID(id *string) bool
- func (r *ReadOnlyManager) RemoveReadOnlyPad(readonlyId, padId string) error
- type SecurityManager
- type SessionManager
- type UserSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailableFonts = []string{
"Quicksand",
"Roboto",
"Alegreya",
"PlayfairDisplay",
"Montserrat",
"OpenDyslexic",
"RobotoMono",
}
Functions ¶
func CheckAccess ¶
func CheckAccess(ctx *fiber.Ctx, logger *zap.SugaredLogger, retrievedSettings *settings.Settings, readOnlyManager *ReadOnlyManager) error
func GetTxtFromAText ¶ added in v0.0.2
func HandlePadOpen ¶
func NormalizeAuthzLevel ¶
func SplitRemoveLastRune ¶ added in v0.0.2
func UserCanModify ¶
func UserCanModify(padId *string, req *webaccess.SocketClientRequest, readOnlyManager ReadOnlyManager) bool
Types ¶
type ClientType ¶
type ClientType interface {
}
type GlobalPadCache ¶
type GlobalPadCache struct {
// contains filtered or unexported fields
}
func (*GlobalPadCache) DeletePad ¶
func (g *GlobalPadCache) DeletePad(padID string)
type GrantedAccess ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) IsValidPadId ¶
type ReadOnlyManager ¶
func NewReadOnlyManager ¶
func NewReadOnlyManager(db db.DataStore) *ReadOnlyManager
func (*ReadOnlyManager) GetPadId ¶ added in v0.0.2
func (r *ReadOnlyManager) GetPadId(readonlyId string) (*string, error)
func (*ReadOnlyManager) GetReadOnlyId ¶
func (r *ReadOnlyManager) GetReadOnlyId(pad string) string
func (*ReadOnlyManager) IsReadOnlyID ¶ added in v0.0.2
func (r *ReadOnlyManager) IsReadOnlyID(id *string) bool
func (*ReadOnlyManager) RemoveReadOnlyPad ¶
func (r *ReadOnlyManager) RemoveReadOnlyPad(readonlyId, padId string) error
type SecurityManager ¶
type SecurityManager struct {
ReadOnlyManager *ReadOnlyManager
PadManager *Manager
AuthorManager *author.Manager
SessionManager *SessionManager
}
func NewSecurityManager ¶
func (*SecurityManager) CheckAccess ¶
func (s *SecurityManager) CheckAccess(padId *string, sessionCookie *string, token *string, userSettings *webaccess.SocketClientRequest) (*GrantedAccess, error)
func (*SecurityManager) HasPadAccess ¶ added in v0.0.2
func (s *SecurityManager) HasPadAccess(ctx *fiber.Ctx) bool
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(db db.DataStore) *SessionManager
Click to show internal directories.
Click to hide internal directories.