handlers

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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppHandler

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

AppHandler exposes HTTP endpoints for app (platform tenant) management.

func NewAppHandler

func NewAppHandler(s *app.ServiceImpl, rlsvc *rl.Service, sess session.ServiceInterface, rbacsvc *rbac.Service, roles *repo.UserRoleRepository, roleRepo *repo.RoleRepository, policyRepo *repo.PolicyRepository, enforce bool) *AppHandler

func (*AppHandler) AddTeamMember

func (h *AppHandler) AddTeamMember(c forge.Context) error

AddTeamMember adds a member to a team.

func (*AppHandler) AssignUserRole

func (h *AppHandler) AssignUserRole(c forge.Context) error

AssignUserRole assigns a role to a user within an organization.

func (*AppHandler) CreateApp added in v0.0.15

func (h *AppHandler) CreateApp(c forge.Context) error

CreateApp creates a new app.

func (*AppHandler) CreateInvitation

func (h *AppHandler) CreateInvitation(c forge.Context) error

CreateInvitation creates an invitation.

func (*AppHandler) CreateMember

func (h *AppHandler) CreateMember(c forge.Context) error

CreateMember adds a new member to an organization.

func (*AppHandler) CreatePolicy

func (h *AppHandler) CreatePolicy(c forge.Context) error

CreatePolicy creates a new RBAC policy expression.

func (*AppHandler) CreateRole

func (h *AppHandler) CreateRole(c forge.Context) error

CreateRole creates a role, optionally scoped to an organization.

func (*AppHandler) CreateTeam

func (h *AppHandler) CreateTeam(c forge.Context) error

CreateTeam creates a new team.

func (*AppHandler) DeleteApp added in v0.0.15

func (h *AppHandler) DeleteApp(c forge.Context) error

DeleteApp deletes an app.

func (*AppHandler) DeleteAppByID added in v0.0.15

func (h *AppHandler) DeleteAppByID(c forge.Context) error

DeleteAppByID deletes an app using path param appId.

func (*AppHandler) DeleteAppCookieConfig added in v0.0.2

func (h *AppHandler) DeleteAppCookieConfig(c forge.Context) error

DeleteAppCookieConfig removes the cookie configuration override for a specific app DELETE /apps/:appId/cookie-config.

func (*AppHandler) DeleteMember

func (h *AppHandler) DeleteMember(c forge.Context) error

DeleteMember deletes a member.

func (*AppHandler) DeletePolicy

func (h *AppHandler) DeletePolicy(c forge.Context) error

DeletePolicy deletes a policy by ID.

func (*AppHandler) DeleteTeam

func (h *AppHandler) DeleteTeam(c forge.Context) error

DeleteTeam deletes a team.

func (*AppHandler) GetAppByID added in v0.0.15

func (h *AppHandler) GetAppByID(c forge.Context) error

GetAppByID fetches a single app via path param.

func (*AppHandler) GetAppCookieConfig added in v0.0.2

func (h *AppHandler) GetAppCookieConfig(c forge.Context) error

GetAppCookieConfig retrieves the cookie configuration for a specific app GET /apps/:appId/cookie-config.

func (*AppHandler) GetApps added in v0.0.15

func (h *AppHandler) GetApps(c forge.Context) error

GetApps supports fetching a single app by id or slug, or listing.

func (*AppHandler) GetMembers

func (h *AppHandler) GetMembers(c forge.Context) error

GetMembers lists members or fetches a single member.

func (*AppHandler) GetPolicies

func (h *AppHandler) GetPolicies(c forge.Context) error

GetPolicies lists stored RBAC policy expressions.

func (*AppHandler) GetRoles

func (h *AppHandler) GetRoles(c forge.Context) error

GetRoles lists roles, optionally filtered by organization.

func (*AppHandler) GetTeamMembers

func (h *AppHandler) GetTeamMembers(c forge.Context) error

GetTeamMembers lists members of a team.

func (*AppHandler) GetTeams

func (h *AppHandler) GetTeams(c forge.Context) error

GetTeams lists teams in an organization.

func (*AppHandler) GetUserRoles

func (h *AppHandler) GetUserRoles(c forge.Context) error

GetUserRoles lists roles assigned to a user, optionally filtered by organization.

func (*AppHandler) RemoveTeamMember

func (h *AppHandler) RemoveTeamMember(c forge.Context) error

RemoveTeamMember removes a member from a team.

func (*AppHandler) RemoveUserRole

func (h *AppHandler) RemoveUserRole(c forge.Context) error

RemoveUserRole removes a role assignment from a user within an organization.

func (*AppHandler) UpdateApp added in v0.0.15

func (h *AppHandler) UpdateApp(c forge.Context) error

UpdateApp updates an app.

func (*AppHandler) UpdateAppByID added in v0.0.15

func (h *AppHandler) UpdateAppByID(c forge.Context) error

UpdateAppByID updates an app using path param appId.

func (*AppHandler) UpdateAppCookieConfig added in v0.0.2

func (h *AppHandler) UpdateAppCookieConfig(c forge.Context) error

UpdateAppCookieConfig updates the cookie configuration for a specific app PUT /apps/:appId/cookie-config.

func (*AppHandler) UpdateMember

func (h *AppHandler) UpdateMember(c forge.Context) error

UpdateMember updates a member.

func (*AppHandler) UpdatePolicy

func (h *AppHandler) UpdatePolicy(c forge.Context) error

UpdatePolicy updates an existing RBAC policy expression by ID.

func (*AppHandler) UpdateTeam

func (h *AppHandler) UpdateTeam(c forge.Context) error

UpdateTeam updates a team.

type AuditHandler

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

AuditHandler exposes endpoints to query audit events.

func NewAuditHandler

func NewAuditHandler(service *audit.Service) *AuditHandler

NewAuditHandler creates a new audit handler.

func (*AuditHandler) GetAggregations added in v0.0.15

func (h *AuditHandler) GetAggregations(c forge.Context) error

GetAggregations returns all aggregations in one call GET /audit/aggregations.

func (*AuditHandler) GetDistinctActions added in v0.0.15

func (h *AuditHandler) GetDistinctActions(c forge.Context) error

GetDistinctActions returns distinct actions with counts GET /audit/actions.

func (*AuditHandler) GetDistinctApps added in v0.0.15

func (h *AuditHandler) GetDistinctApps(c forge.Context) error

GetDistinctApps returns distinct apps with counts GET /audit/apps.

func (*AuditHandler) GetDistinctIPs added in v0.0.15

func (h *AuditHandler) GetDistinctIPs(c forge.Context) error

GetDistinctIPs returns distinct IP addresses with counts GET /audit/ips.

func (*AuditHandler) GetDistinctOrganizations added in v0.0.15

func (h *AuditHandler) GetDistinctOrganizations(c forge.Context) error

GetDistinctOrganizations returns distinct organizations with counts GET /audit/organizations.

func (*AuditHandler) GetDistinctResources added in v0.0.15

func (h *AuditHandler) GetDistinctResources(c forge.Context) error

GetDistinctResources returns distinct resources with counts GET /audit/resources.

func (*AuditHandler) GetDistinctSources added in v0.0.15

func (h *AuditHandler) GetDistinctSources(c forge.Context) error

GetDistinctSources returns distinct sources with counts GET /audit/sources.

func (*AuditHandler) GetDistinctUsers added in v0.0.15

func (h *AuditHandler) GetDistinctUsers(c forge.Context) error

GetDistinctUsers returns distinct users with counts GET /audit/users.

func (*AuditHandler) ListEvents

func (h *AuditHandler) ListEvents(c forge.Context) error

ListEvents returns audit events with pagination and optional filters Query params: q, environmentId, userId, userIds, action, actions, actionPattern, resource, resources, resourcePattern,

ipAddress, ipAddresses, ipRange, since, until, sortBy, sortOrder

func (*AuditHandler) SearchEvents added in v0.0.8

func (h *AuditHandler) SearchEvents(c forge.Context) error

SearchEvents performs full-text search on audit events Query params: q (required), fields, fuzzy, environmentId, userId, action, since, until, limit, offset.

type AuthHandler

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

func NewAuthHandler

func NewAuthHandler(a auth.ServiceInterface, rlsvc *rl.Service, dsvc *dev.Service, ssvc *sec.Service, asvc *aud.Service, tfrepo *repo.TwoFARepository, appSvc *app.ServiceImpl, cookieCfg *session.CookieConfig, svcRegistry *registry.ServiceRegistry, baseURL string) *AuthHandler

func (*AuthHandler) ChangePassword added in v0.0.6

func (h *AuthHandler) ChangePassword(c forge.Context) error

ChangePassword handles password change requests.

func (*AuthHandler) ConfirmEmailChange added in v0.0.6

func (h *AuthHandler) ConfirmEmailChange(c forge.Context) error

ConfirmEmailChange handles email change confirmation.

func (*AuthHandler) GetSession

func (h *AuthHandler) GetSession(c forge.Context) error

func (*AuthHandler) ListDevices

func (h *AuthHandler) ListDevices(c forge.Context) error

ListDevices lists devices for the authenticated user.

func (*AuthHandler) RefreshSession added in v0.0.3

func (h *AuthHandler) RefreshSession(c forge.Context) error

RefreshSession refreshes an access token using a refresh token.

func (*AuthHandler) RequestEmailChange added in v0.0.6

func (h *AuthHandler) RequestEmailChange(c forge.Context) error

RequestEmailChange handles email change requests.

func (*AuthHandler) RequestPasswordReset added in v0.0.6

func (h *AuthHandler) RequestPasswordReset(c forge.Context) error

RequestPasswordReset handles password reset requests.

func (*AuthHandler) ResetPassword added in v0.0.6

func (h *AuthHandler) ResetPassword(c forge.Context) error

ResetPassword handles password reset confirmation Supports both token (URL link) and code (6-digit mobile entry).

func (*AuthHandler) RevokeDevice

func (h *AuthHandler) RevokeDevice(c forge.Context) error

RevokeDevice deletes a device by fingerprint for the authenticated user.

func (*AuthHandler) SignIn

func (h *AuthHandler) SignIn(c forge.Context) error

func (*AuthHandler) SignOut

func (h *AuthHandler) SignOut(c forge.Context) error

func (*AuthHandler) SignUp

func (h *AuthHandler) SignUp(c forge.Context) error

func (*AuthHandler) UpdateUser

func (h *AuthHandler) UpdateUser(c forge.Context) error

UpdateUser updates the authenticated user's profile (name, image, username).

func (*AuthHandler) ValidateResetToken added in v0.0.6

func (h *AuthHandler) ValidateResetToken(c forge.Context) error

ValidateResetToken validates a password reset token.

type ErrorResponse

type ErrorResponse = responses.ErrorResponse

type MessageResponse

type MessageResponse = responses.MessageResponse

type SessionResponse

type SessionResponse = responses.SessionResponse

type StatusResponse

type StatusResponse = responses.StatusResponse

type TwoFARequiredResponse

type TwoFARequiredResponse = responses.TwoFARequiredResponse

TwoFARequiredResponse is the response type for two-factor authentication requirement.

type WebhookHandler

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

WebhookHandler handles webhook-related HTTP requests.

func NewWebhookHandler

func NewWebhookHandler(service *webhook.Service) *WebhookHandler

NewWebhookHandler creates a new webhook handler.

func (*WebhookHandler) CreateWebhook

func (h *WebhookHandler) CreateWebhook(c forge.Context) error

CreateWebhook creates a new webhook.

func (*WebhookHandler) DeleteWebhook

func (h *WebhookHandler) DeleteWebhook(c forge.Context) error

DeleteWebhook deletes a webhook.

func (*WebhookHandler) GetWebhook

func (h *WebhookHandler) GetWebhook(c forge.Context) error

GetWebhook retrieves a webhook by ID.

func (*WebhookHandler) GetWebhookDeliveries

func (h *WebhookHandler) GetWebhookDeliveries(c forge.Context) error

GetWebhookDeliveries retrieves delivery logs for a webhook.

func (*WebhookHandler) ListWebhooks

func (h *WebhookHandler) ListWebhooks(c forge.Context) error

ListWebhooks lists webhooks for an app environment.

func (*WebhookHandler) UpdateWebhook

func (h *WebhookHandler) UpdateWebhook(c forge.Context) error

UpdateWebhook updates a webhook.

Jump to

Keyboard shortcuts

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