{"modulePath":"github.com/sbekti/intern","version":"v0.13.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpserver\n\n## Functions\n\n```go\nfunc NewHandler(logger *slog.Logger, cfg config.Config, deps Dependencies) http.Handler\n```\n\n## Types\n\n```go\ntype AuditLogService interface {\n\tList(ctx context.Context, filter auditlogs.Filter) (*auditlogs.Page, error)\n}\n```\n\n```go\ntype AuthSpamService interface {\n\tCheckDeviceCodeCreate(ctx context.Context, clientInfo requestmeta.ClientInfo) error\n\tCheckDeviceTokenExchange(ctx context.Context, clientInfo requestmeta.ClientInfo) error\n\tCheckDeviceDecision(ctx context.Context, username string, clientInfo requestmeta.ClientInfo) error\n\tCheckRefreshToken(ctx context.Context, clientInfo requestmeta.ClientInfo) error\n\tCheckLogout(ctx context.Context, clientInfo requestmeta.ClientInfo) error\n}\n```\n\n```go\ntype ClientAuthService interface {\n\tCreateDeviceCode(ctx context.Context, request *api.DeviceCodeCreateRequest) (*api.DeviceCode, error)\n\tApproveDeviceCode(ctx context.Context, userCode string, user db.User) error\n\tDenyDeviceCode(ctx context.Context, userCode string, user db.User) error\n\tExchangeDeviceCode(ctx context.Context, request api.DeviceCodeTokenRequest, userAgent string) (*api.TokenResponse, error)\n\tRefreshAccessToken(ctx context.Context, request api.RefreshTokenRequest, userAgent string) (*api.TokenResponse, error)\n\tLogout(ctx context.Context, request api.LogoutRequest) error\n}\n```\n\n```go\ntype DatabasePinger interface {\n\tPing(context.Context) error\n}\n```\n\n```go\ntype Dependencies struct {\n\tPreferencesStore     PreferencesStore\n\tUserStore            identity.UserStore\n\tDatabasePinger       DatabasePinger\n\tVLANService          VLANService\n\tDeviceService        DeviceService\n\tGizmoService         GizmoService\n\tClientAuthService    ClientAuthService\n\tAuthSpamService      AuthSpamService\n\tSessionService       SessionService\n\tAuditLogService      AuditLogService\n\tRemoteDesktopService RemoteDesktopService\n}\n```\n\n```go\ntype DeviceService interface {\n\tRADIUSPolicy(ctx context.Context) ([]devices.RADIUSPolicyRecord, error)\n\tList(ctx context.Context) ([]devices.DeviceRecord, error)\n\tGet(ctx context.Context, id uuid.UUID) (devices.DeviceRecord, error)\n\tCreate(ctx context.Context, actor db.User, input api.NetworkDeviceWrite) (devices.DeviceRecord, error)\n\tUpdate(ctx context.Context, actor db.User, id uuid.UUID, patch api.NetworkDevicePatch) (devices.DeviceRecord, error)\n\tDelete(ctx context.Context, actor db.User, id uuid.UUID) error\n\tRevealWiFiPassword(ctx context.Context, actor db.User, id uuid.UUID) (string, error)\n}\n```\n\n```go\ntype GizmoService interface {\n\tList(ctx context.Context) ([]gizmos.Record, error)\n\tCreate(ctx context.Context, actor db.User, input api.GizmoWrite) (gizmos.Record, error)\n\tUpdate(ctx context.Context, actor db.User, networkDeviceID uuid.UUID, input api.GizmoUpdate) (gizmos.Record, error)\n\tDelete(ctx context.Context, actor db.User, networkDeviceID uuid.UUID) error\n\tResolveKioskURL(ctx context.Context, macAddress string) (string, error)\n}\n```\n\n```go\ntype PreferencesStore interface {\n\tGetApplicationPreferences(context.Context) ([]byte, error)\n\tMergeApplicationPreferences(context.Context, db.MergeApplicationPreferencesParams) ([]byte, error)\n}\n```\n\n```go\ntype RemoteDesktopService interface {\n\tList(ctx context.Context) ([]db.RemoteDesktop, error)\n\tCreate(ctx context.Context, actor db.User, input api.RemoteDesktopWrite) (db.RemoteDesktop, error)\n\tUpdate(ctx context.Context, actor db.User, id uuid.UUID, patch api.RemoteDesktopPatch) (db.RemoteDesktop, error)\n\tDelete(ctx context.Context, actor db.User, id uuid.UUID) error\n\tStartSession(ctx context.Context, actor db.User, id uuid.UUID, offer string) (remotedesktops.Session, error)\n\tDialRelay(ctx context.Context, id uuid.UUID, token string) (*websocket.Conn, error)\n\tRelay(ctx context.Context, browser, host *websocket.Conn) string\n}\n```\n\n```go\ntype SessionService interface {\n\tValidateSession(ctx context.Context, sessionID string) (bool, error)\n\tListProfileSessionsPage(ctx context.Context, user db.User, currentSessionID string, limit, offset int32) (*api.AuthSessionPage, error)\n\tRevokeProfileSession(ctx context.Context, user db.User, sessionID uuid.UUID) error\n\tRevokeOtherProfileSessions(ctx context.Context, user db.User, currentSessionID string) error\n\tListAdminSessionsPage(ctx context.Context, currentSessionID string, limit, offset int32) (*api.AuthSessionPage, error)\n\tRevokeAdminSession(ctx context.Context, sessionID uuid.UUID) error\n\tRevokeAllAdminSessions(ctx context.Context) error\n}\n```\n\n```go\ntype VLANService interface {\n\tList(ctx context.Context) ([]db.Vlan, error)\n\tGet(ctx context.Context, vlanID int32) (db.Vlan, error)\n\tCreate(ctx context.Context, actor db.User, input api.VlanWrite) (db.Vlan, error)\n\tUpdate(ctx context.Context, actor db.User, vlanID int32, patch api.VlanPatch) (db.Vlan, error)\n\tDelete(ctx context.Context, actor db.User, vlanID int32) error\n}\n```\n\n","path":"github.com/sbekti/intern/internal/httpserver","name":"httpserver","synopsis":"","isRedistributable":true}
