init push

This commit is contained in:
2026-05-21 19:52:45 +08:00
commit e3f75311ab
1280 changed files with 179173 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package v1
import "github.com/chaitin/panda-wiki/consts"
type AuthLoginSimpleReq struct {
Password string `json:"password" validate:"required"`
}
type AuthLoginSimpleResp struct {
}
type AuthGetReq struct {
}
type AuthGetResp struct {
AuthType consts.AuthType `json:"auth_type"`
SourceType consts.SourceType `json:"source_type"`
LicenseEdition consts.LicenseEdition `json:"license_edition"`
}
type AuthGitHubReq struct {
KbID string `json:"kb_id"`
RedirectUrl string `json:"redirect_url"`
}
type AuthGitHubResp struct {
Url string `json:"url"`
}
type GitHubCallbackReq struct {
Code string `json:"code" query:"code"`
State string `json:"state" query:"state"`
}
type GitHubCallbackResp struct {
}

View File

@@ -0,0 +1,21 @@
package v1
type ShareFileUploadReq struct {
KbId string `json:"-"`
File string `form:"file"`
CaptchaToken string `form:"captcha_token" json:"captcha_token" validate:"required"`
}
type FileUploadResp struct {
Key string `json:"key"`
}
type ShareFileUploadUrlReq struct {
KbId string `json:"-"`
Url string `json:"url" validate:"required,url"`
CaptchaToken string `json:"captcha_token" validate:"required"`
}
type ShareFileUploadUrlResp struct {
Key string `json:"key"`
}

View File

@@ -0,0 +1,5 @@
package v1
type ShareNavListReq struct {
KbId string `json:"kb_id" query:"kb_id" validate:"required"`
}

View File

@@ -0,0 +1,37 @@
package v1
import (
"time"
"github.com/chaitin/panda-wiki/domain"
)
type ShareNodeDetailResp struct {
ID string `json:"id"`
KbID string `json:"kb_id"`
Type domain.NodeType `json:"type"`
Status domain.NodeStatus `json:"status"`
Name string `json:"name"`
Content string `json:"content"`
Meta domain.NodeMeta `json:"meta"`
ParentID string `json:"parent_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Permissions domain.NodePermissions `json:"permissions"`
CreatorId string `json:"creator_id"`
EditorId string `json:"editor_id"`
PublisherId string `json:"publisher_id"`
CreatorAccount string `json:"creator_account"`
EditorAccount string `json:"editor_account"`
PublisherAccount string `json:"publisher_account"`
List []*domain.ShareNodeDetailItem `json:"list" gorm:"-"`
PV int64 `json:"pv" gorm:"-"`
}
type NodeListGroupNavResp struct {
NavName string `json:"nav_name"`
NavID string `json:"nav_id"`
Position float64 `json:"position"`
Count int64 `json:"count"`
List []domain.ShareNodeListItemResp `json:"list"`
}

View File

@@ -0,0 +1,8 @@
package v1
type WechatAppInfoResp struct {
WeChatAppIsEnabled bool `json:"wechat_app_is_enabled"`
FeedbackEnable bool `json:"feedback_enable"`
FeedbackType []string `json:"feedback_type"`
DisclaimerContent string `json:"disclaimer_content"`
}