Documentation ¶
Index ¶
- Constants
- Variables
- type CommonResponse
- type HAPI
- type HAPIParams
- type HAPIs
- type HFieldType
- type HProject
- type HProjectStatus
- type HProjects
- type MyQueue
- type QueryDeleteAPI
- type QueryDeleteAPIParams
- type QueryGetAPI
- type QueryGetAPIs
- type QueryGetProject
- type QueryGetProjects
- type ReqPostAPI
- type ReqPostAPIParams
- type ReqPostProject
- type ReqPutAPI
- type ReqPutProject
- type RespDeleteAPI
- type RespDeleteAPIParams
- type RespGetAPI
- type RespGetAPIItem
- type RespGetAPIParamsData
- type RespGetAPIParamsDataItem
- type RespGetAPIParamsItem
- type RespGetAPIs
- type RespGetAPIsItem
- type RespGetFieldType
- type RespGetFieldTypeItem
- type RespGetProject
- type RespGetProjectItem
- type RespGetProjectStatus
- type RespGetProjectStatusItem
- type RespGetProjects
- type RespGetProjectsItem
- type RespPostAPI
- type RespPostAPIParams
- type RespPostProject
- type RespPutAPI
- type RespPutProject
Constants ¶
View Source
const (
DefaultPageNumber = 20
)
Variables ¶
View Source
var Validator = validator.New()
Functions ¶
This section is empty.
Types ¶
type CommonResponse ¶
type HAPI ¶
type HAPI struct { Committer connector.Committer `inject:"t"` RepoAPI models.RepoAPI `inject:"t"` RepoAPIParams models.RepoAPIParams `inject:"t"` RepoProject models.RepoProject `inject:"t"` }
HAPI 操作者
type HAPIParams ¶
type HAPIParams struct { Committer connector.Committer `inject:"t"` RepoAPIParams models.RepoAPIParams `inject:"t"` }
HAPIParams 操作者
func (*HAPIParams) Delete ¶
func (p *HAPIParams) Delete(ctx *gin.Context)
func (*HAPIParams) Post ¶
func (p *HAPIParams) Post(ctx *gin.Context)
type HAPIs ¶
type HAPIs struct { Committer connector.Committer `inject:"t"` RepoAPI models.RepoAPI `inject:"t"` }
HAPIs 操作者
type HFieldType ¶
type HFieldType struct { Committer connector.Committer `inject:"t"` RepoFieldType models.RepoFieldType `inject:"t"` }
HFieldType 操作者
func (*HFieldType) Get ¶
func (p *HFieldType) Get(ctx *gin.Context)
type HProject ¶
type HProject struct { Committer connector.Committer `inject:"t"` RepoProject models.RepoProject `inject:"t"` }
HProject 操作者
type HProjectStatus ¶
type HProjectStatus struct { Committer connector.Committer `inject:"t"` RepoProjectStatus models.RepoProjectStatus `inject:"t"` }
HProjectStatus 操作者
func (*HProjectStatus) Get ¶
func (p *HProjectStatus) Get(ctx *gin.Context)
func (*HProjectStatus) Inject ¶
func (p *HProjectStatus) Inject(params map[string]interface{})
Inject 初始化函数
type HProjects ¶
type HProjects struct { Committer connector.Committer `inject:"t"` RepoProject models.RepoProject `inject:"t"` }
HProjects 操作者
type QueryDeleteAPI ¶
type QueryDeleteAPI struct {
ID int64 `form:"id" validate:"required"`
}
type QueryDeleteAPIParams ¶
type QueryDeleteAPIParams struct {
ID int64 `form:"id" validate:"required"`
}
type QueryGetAPI ¶
type QueryGetAPI struct {
ID int `form:"id" validate:"required"`
}
type QueryGetAPIs ¶
type QueryGetProject ¶
type QueryGetProject struct {
ID int `form:"id" validate:"required"`
}
QueryGetProject
type QueryGetProjects ¶
type QueryGetProjects struct { Status string `form:"status"` Page int `form:"page"` Number int `form:"num"` }
QueryGetProjects 请求对象
type ReqPostAPI ¶
type ReqPostAPIParams ¶
type ReqPostAPIParams struct { APIID int64 `form:"aid" validate:"required"` ParentID int64 `form:"parent_id"` APIParamsType int `json:"api_params_type" validate:"required"` Key string `json:"key" validate:"required"` FieldType string `json:"field_type" validate:"required"` IsList bool `json:"is_list"` Required bool `json:"required"` Description string `json:"description"` Sample string `json:"sample"` }
type ReqPostProject ¶
type ReqPostProject struct { Name string `json:"name" validate:"required"` Address string `json:"address,omitempty"` Host string `json:"host,omitempty"` ContactName string `json:"contact_name"` ContactCellphone string `json:"contact_cellphone"` Brokerage int64 `json:"brokerage"` Deposit int64 `json:"deposit,omitempty"` Refund int64 `json:"refund,omitempty"` }
ReqPostProject
type ReqPutProject ¶
type ReqPutProject struct { ID int `json:"id" validate:"required"` Address string `json:"address,omitempty"` Host string `json:"host,omitempty"` ContactName string `json:"contact_name"` ContactCellphone string `json:"contact_cellphone"` Brokerage int64 `json:"brokerage"` Deposit int64 `json:"deposit,omitempty"` Refund int64 `json:"refund,omitempty"` Status string `json:"status" validate:"required"` }
ReqPutProject
type RespDeleteAPI ¶
type RespDeleteAPI struct {
CommonResponse
}
type RespDeleteAPIParams ¶
type RespDeleteAPIParams struct {
CommonResponse
}
type RespGetAPI ¶
type RespGetAPI struct {
CommonResponse
}
type RespGetAPIItem ¶
type RespGetAPIItem struct { ID int64 `json:"id"` ProjectID int `json:"project_id"` ProjectName string `json:"project_name"` Name string `json:"name"` Path string `json:"path"` HttpMethodID int `json:"http_method_id"` HttpMethod string `json:"http_method"` Description string `json:"description"` Status string `json:"status"` RespGetAPIParamsData RespGetAPIParamsData `json:"params"` }
type RespGetAPIParamsData ¶
type RespGetAPIParamsData struct { Headers []*RespGetAPIParamsItem `json:"headers"` Queries []*RespGetAPIParamsItem `json:"queries"` Requests []*RespGetAPIParamsItem `json:"requests"` Responses []*RespGetAPIParamsItem `json:"responses"` }
type RespGetAPIParamsDataItem ¶
type RespGetAPIParamsDataItem struct { Item *RespGetAPIParamsItem `json:"item"` // 自己 SubParams []*RespGetAPIParamsDataItem `json:"sub_params"` // 子参数,自有 FieldType == object才可以 }
func (*RespGetAPIParamsDataItem) Rang ¶
func (p *RespGetAPIParamsDataItem) Rang(item *RespGetAPIParamsItem) bool
func (*RespGetAPIParamsDataItem) RangItems ¶
func (p *RespGetAPIParamsDataItem) RangItems() []*RespGetAPIParamsItem
type RespGetAPIParamsItem ¶
type RespGetAPIParamsItem struct { ID int64 `json:"id"` ParentID int64 `json:"parent_id"` APIID int64 `json:"api_id"` APIParamsType int `json:"api_params_type"` Key string `json:"key"` FieldType string `json:"field_type"` IsList bool `json:"is_list"` Required bool `json:"required"` Description string `json:"description"` Sample string `json:"sample"` }
type RespGetAPIs ¶
type RespGetAPIs struct {
CommonResponse
}
type RespGetAPIsItem ¶
type RespGetAPIsItem struct { ID int64 `json:"id"` ProjectID int `json:"project_id"` ProjectName string `json:"project_name"` Name string `json:"name"` Path string `json:"path"` HttpMethodID int `json:"http_method_id"` HttpMethod string `json:"http_method"` Description string `json:"description"` Status string `json:"status"` }
type RespGetFieldType ¶
type RespGetFieldType struct {
CommonResponse
}
type RespGetFieldTypeItem ¶
type RespGetProject ¶
type RespGetProject struct {
CommonResponse
}
type RespGetProjectItem ¶
type RespGetProjectItem struct { ID int `json:"id"` Name string `json:"name"` Address string `json:"address"` Host string `json:"host"` ContactName string `json:"contact_name"` ContactCellphone string `json:"contact_cellphone"` Brokerage int64 `json:"brokerage"` Deposit int64 `json:"deposit"` Refund int64 `json:"refund"` Status string `json:"status"` }
RespGetProjectItem
type RespGetProjectStatus ¶
type RespGetProjectStatus struct {
CommonResponse
}
type RespGetProjects ¶
type RespGetProjects struct {
CommonResponse
}
type RespGetProjectsItem ¶
type RespGetProjectsItem struct { ID int `json:"id"` Name string `json:"name"` Address string `json:"address"` Host string `json:"host"` ContactName string `json:"contact_name"` ContactCellphone string `json:"contact_cellphone"` Brokerage int64 `json:"brokerage"` Deposit int64 `json:"deposit"` Refund int64 `json:"refund"` Status string `json:"status"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` CreateTime string `json:"create_time"` UpdateTime string `json:"update_time"` }
type RespPostAPI ¶
type RespPostAPI struct {
CommonResponse
}
type RespPostAPIParams ¶
type RespPostAPIParams struct {
CommonResponse
}
type RespPostProject ¶
type RespPostProject struct {
CommonResponse
}
type RespPutAPI ¶
type RespPutAPI struct {
CommonResponse
}
type RespPutProject ¶
type RespPutProject struct {
CommonResponse
}
Click to show internal directories.
Click to hide internal directories.