[优化] go 引用调整

This commit is contained in:
ryan
2026-06-06 10:26:20 +08:00
parent ee1110b752
commit 3cfefb4367
552 changed files with 1642 additions and 2185 deletions
+5
View File
@@ -0,0 +1,5 @@
export interface ApiEnvelope<T> {
success: boolean;
message: string;
data: T;
}
+28
View File
@@ -0,0 +1,28 @@
export interface AuthUser {
id: number;
username: string;
display_name: string;
role: number;
status: number;
token?: string;
email?: string;
github_id?: string;
wechat_id?: string;
}
export interface LoginPayload {
username: string;
password: string;
}
export interface RegisterPayload {
username: string;
password: string;
email?: string;
verification_code?: string;
}
export interface PasswordResetRequestPayload {
email: string;
token: string;
}
+22
View File
@@ -0,0 +1,22 @@
export type NavigationIconKey =
| 'home'
| 'node'
| 'website'
| 'origin'
| 'domain'
| 'certificate'
| 'pages'
| 'proxy'
| 'waf'
| 'release'
| 'log'
| 'performance'
| 'user'
| 'setting';
export interface NavigationItem {
href: string;
label: string;
icon: NavigationIconKey;
children?: NavigationItem[];
}
@@ -0,0 +1,24 @@
export interface PublicAuthSource {
id: number;
name: string;
type: 'github' | 'oidc';
display_name: string;
authorize_url: string;
icon_url?: string;
}
export interface PublicStatus {
version: string;
start_time: number;
email_verification: boolean;
github_oauth: boolean;
github_client_id: string;
system_name: string;
home_page_link: string;
footer_html: string;
wechat_qrcode: string;
wechat_login: boolean;
server_address: string;
password_register_enabled: boolean;
auth_sources: PublicAuthSource[];
}