constants

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Active     Status = "Active"
	Inactive   Status = "Inactive"
	Stopped    Status = "Stopped"
	Running    Status = "Running"
	Suspended  Status = "Suspended"
	Blocked    Status = "Blocked"
	New        Status = "New"
	Retired    Status = "Retired"
	Processing Status = "Processing"
	Ready      Status = "Ready"

	SuperAdmin Role = "SuperAdmin"

	MigrationsDir  = "pkg/infrastructure/entgql/ent/migrate/migrations"
	MigrateDataDir = "pkg/infrastructure/entgql/ent/migrate/migratedata"

	CurrentUserContextValue    = "currentUser"
	DefaultPluginFolderPath    = "goplugin"
	DefaultRpcPluginFolderPath = "rpc"

	RepositoryContextValue          ContextKey = "repository"
	ServiceContextValue             ContextKey = "service"
	AdminRepositoryContextValue     ContextKey = "adminRepository"
	AdminServiceContextValue        ContextKey = "adminService"
	CentrifugeClientContextValue    ContextKey = "centrifugeClient"
	UserContextValue                ContextKey = "user"
	RoleContextValue                ContextKey = "role"
	IsInternalOperationContextValue ContextKey = "isInternalOperation"

	Local Environment = "local"
	Dev   Environment = "dev"
	Prod  Environment = "prod"
)

Variables

View Source
var (
	FalseVal                = false
	TrueVal                 = true
	Now                     = time.Now()
	SystemUsername          = "system"
	DefaultSystemKey        = "defaultSystemKey"
	GlobalDepartment        = "Global"
	RootConfig              = "root"
	DefaultRemoteFolderPath = "files"
	PrivateACL              = "private"
	AwsS3Domain             = "https://s3.amazonaws.com/"
	RpcPluginGoModContent   = heredoc.Docf(`
		module graphabc-impl
		go 1.18
		replace graphabc => ../../../../../
	`)
)

Functions

func WithInternalOperation

func WithInternalOperation(ctx context.Context) context.Context

WithInternalOperation creates a context that bypasses permission checks for internal operations Use this for backend operations like permission queries, internal user queries, etc.

Types

type ContextKey

type ContextKey string

type Environment

type Environment string

func (Environment) String

func (env Environment) String() string

type Role

type Role string

func (Role) String

func (r Role) String() string

type Status

type Status string

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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