permissions

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Layer: Database
	DbRead  Permission = 1 << 0 // 1
	DbWrite Permission = 1 << 1 // 2

	// Layer: API (Proto/Frontend)
	ApiRead  Permission = 1 << 2 // 4
	ApiWrite Permission = 1 << 3 // 8

	// Common Shortcuts (Aliases)
	Default   = DbRead | DbWrite | ApiRead | ApiWrite // 15 (Full CRUD)
	ReadOnly  = DbWrite | DbRead | ApiRead            // 7  (System fields like createdAt)
	WriteOnly = DbRead | DbWrite | ApiWrite           // 11 (Password during signup)
	Internal  = DbRead | DbWrite                      // 3  (Internal metadata, no Proto)
	Virtual   = ApiRead | ApiWrite                    // 12 (Exists only in proto, never stored in DB)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission uint32

Jump to

Keyboard shortcuts

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