view mrjunejune/admin_api.h @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents 04fee26ecce0
children
line wrap: on
line source

#ifndef MRJUNEJUNE_ADMIN_API_H
#define MRJUNEJUNE_ADMIN_API_H

#include "dowa/dowa.h"
#include "seobeo/seobeo.h"

/* Route paths */
#define ADMIN_API_PAGE_PATH          "/admin/users"
#define ADMIN_API_LIST_PATH          "/api/admin/users"
#define ADMIN_API_PATCH_PATH         "/api/admin/users/:id"
#define ADMIN_API_REVOKE_SESS_PATH   "/api/admin/users/:id/sessions"

/* Pagination defaults */
#define ADMIN_API_DEFAULT_LIMIT  50
#define ADMIN_API_MAX_LIMIT     100

/*
 * Register all admin routes.  Call after Auth_API_Init.
 */
void Admin_API_Register_Routes(void);

#ifdef ADMIN_API_TEST_HOOKS
/*
 * Direct handler entry-points for in-process testing.
 * Only available when ADMIN_API_TEST_HOOKS is defined.
 */
Seobeo_Request_Entry *Admin_API_Test_Page_Handler(
    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
Seobeo_Request_Entry *Admin_API_Test_List_Handler(
    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
Seobeo_Request_Entry *Admin_API_Test_Create_Handler(
    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
Seobeo_Request_Entry *Admin_API_Test_Update_Handler(
    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
Seobeo_Request_Entry *Admin_API_Test_Revoke_Sessions_Handler(
    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
#endif /* ADMIN_API_TEST_HOOKS */

#endif /* MRJUNEJUNE_ADMIN_API_H */