🚀 chore: add initial project setup with docker, go modules, and basic api structure
Add docker configuration for building and running the application, including a dockerfile and docker-compose.yml. Set up go modules with dependencies and create the basic api structure with main.go, models, and wrapper files. Include .dockerignore and .gitignore files to manage ignored files and directories. Add constants for ipatool path and global flags.
This commit is contained in:
24
models/auth.go
Normal file
24
models/auth.go
Normal file
@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
type AuthInput struct {
|
||||
User string `query:"user" doc:"Имя пользователя" minLength:"3" example:"Ivan"`
|
||||
Pswd string `query:"pswd" doc:"Пароль" minLength:"8" example:"12345678"`
|
||||
Code string `query:"code" doc:"Код двухфакторной авторизации" minLength:"6" example:"123456"`
|
||||
}
|
||||
|
||||
type AuthOutput struct {
|
||||
Body struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
}
|
||||
|
||||
type AuthInfoInput struct {
|
||||
User string `query:"user" doc:"Имя пользователя" minLength:"3" example:"Ivan"`
|
||||
Pswd string `query:"pswd" doc:"Пароль" minLength:"8" example:"12345678"`
|
||||
}
|
||||
|
||||
type AuthInfoOutput struct {
|
||||
Body struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
}
|
||||
13
models/download.go
Normal file
13
models/download.go
Normal file
@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
import "github.com/danielgtaylor/huma/v2"
|
||||
|
||||
type DownloadInput struct {
|
||||
BundleID string `query:"bundleID" doc:"ID приложения" minLength:"3" example:"com.zhiliaoapp.musically"`
|
||||
}
|
||||
|
||||
type DownloadOutput struct {
|
||||
Body func(huma.Context)
|
||||
ContentDisposition string `header:"Content-Disposition"`
|
||||
ContentType string `header:"Content-Type"`
|
||||
}
|
||||
15
models/search.go
Normal file
15
models/search.go
Normal file
@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "ipa/IPAGo/wrapper"
|
||||
|
||||
type SearchInput struct {
|
||||
Query string `query:"query" doc:"Поисковый запрос" minLength:"3" example:"TikTok"`
|
||||
Limit int `query:"limit" doc:"Количество результатов" min:"1" max:"100" example:"10"`
|
||||
}
|
||||
|
||||
type SearchOutput struct {
|
||||
Body struct {
|
||||
Success bool `json:"success"`
|
||||
Apps []wrapper.App `json:"apps"`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user