http

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(mux *http.ServeMux, d Deps)

func MountBillingOps

func MountBillingOps(mux *http.ServeMux, d BillingOpsDeps)

func MountUserOps

func MountUserOps(mux *http.ServeMux, d UserOpsDeps)

func MountWsOps

func MountWsOps(mux *http.ServeMux, d WsOpsDeps)

Types

type AuditRecorder

type AuditRecorder interface {
	Record(ctx context.Context, workspaceID *string, p *webx.Principal, action, resourceType, resourceID string, meta map[string]any)
}

type BillingOpsDeps

type BillingOpsDeps struct {
	Svc *app.BillingOpsService
}

type Deps

type Deps struct {
	Svc *app.AdminService

	Rec AuditRecorder

	Sessions SessionMinter

	AuthCfg *webx.AuthConfig

	Hooks *admin.Hooks
}

type SessionMinter

type SessionMinter interface {
	CreateSession(ctx context.Context, userID, ipHash, userAgent string, now time.Time) (token string, exp time.Time, err error)
	CreateImpersonatedSession(ctx context.Context, userID, impersonatedBy, ipHash, userAgent string, now time.Time) (token string, exp time.Time, err error)
}

type UserOpsDeps

type UserOpsDeps struct {
	Deps
	Ops *app.UserOpsService
}

type WsOpsDeps

type WsOpsDeps struct {
	Svc *app.WsOpsService
}

Jump to

Keyboard shortcuts

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