services

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserKey          = "user"
	SessionKey       = "session"
	AuthenticatedKey = "authenticated"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Services

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

func NewServices

func NewServices(
	basePath string,
	sessionSvc session.ServiceInterface,
	userSvc user.ServiceInterface,
	authSvc auth.ServiceInterface,
	appSvc app.Service,
	orgSvc organization.CompositeOrganizationService,
	rbacSvc rbac.ServiceInterface,
	apikeySvc *apikey.Service,
	formsSvc *forms.Service,
	auditSvc *audit.Service,
	webhookSvc *webhook.Service,
	envSvc environment.EnvironmentService,
) *Services

func (*Services) APIKeyService

func (s *Services) APIKeyService() *apikey.Service

func (*Services) AppContextMiddleware

func (s *Services) AppContextMiddleware(next router.PageHandler) router.PageHandler

AppContextMiddleware injects app context into ForgeUI page context AND enriches the Go context with app ID and environment ID for service layer access.

func (*Services) AppService

func (s *Services) AppService() app.Service

func (*Services) AuditService

func (s *Services) AuditService() *audit.Service

func (*Services) AuthMiddleware

func (s *Services) AuthMiddleware(next router.PageHandler) router.PageHandler

func (*Services) AuthService

func (s *Services) AuthService() auth.ServiceInterface

func (*Services) AuthlessMiddleware

func (s *Services) AuthlessMiddleware(next router.PageHandler) router.PageHandler

func (*Services) CheckExistingPageSession

func (s *Services) CheckExistingPageSession(c *router.PageContext) (*user.User, *session.Session, error)

func (*Services) EnvironmentService

func (s *Services) EnvironmentService() environment.EnvironmentService

func (*Services) FormsService

func (s *Services) FormsService() *forms.Service

func (*Services) GenerateCSRFToken

func (s *Services) GenerateCSRFToken() string

GenerateCSRFToken generateCSRFToken generates a simple CSRF token.

func (*Services) IsFirstUser

func (s *Services) IsFirstUser(ctx context.Context) (bool, error)

isFirstUser checks if there are any users in the system IsFirstUser is a global check that bypasses organization context for the first system user.

func (*Services) OrganizationService

func (s *Services) OrganizationService() organization.CompositeOrganizationService

func (*Services) RBACService

func (s *Services) RBACService() rbac.ServiceInterface

func (*Services) SessionService

func (s *Services) SessionService() session.ServiceInterface

func (*Services) UserService

func (s *Services) UserService() user.ServiceInterface

func (*Services) WebhookService

func (s *Services) WebhookService() *webhook.Service

Jump to

Keyboard shortcuts

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