Versions in this module Expand all Collapse all v1 v1.0.0 May 8, 2022 Changes in this version + func CheckResponse(r *http.Response) error + func NewServerError(resp *http.Response, httpError error) error + type AddOrUpdateInterfaceData struct + Token string + type AuthenticationService struct + type BasicAuthTransport struct + Password string + Transport http.RoundTripper + Username string + func (t *BasicAuthTransport) Client() *http.Client + func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) + type CatData struct + Desc string + ID int + Name string + UID int + type CatMenu struct + Data CatMenuData + ErrCode int + ErrMsg string + func (p *CatMenu) ToString() string + type CatMenuData []CatData + type CatMenuParam struct + ProjectID int + Token string + type CatMenuService struct + func (s *CatMenuService) AddOrUpdate(param *ModifyMenuParam) (*ModifyMenuResp, error) + func (s *CatMenuService) Get(projectId int) (*CatMenu, error) + type Client struct + Authentication *AuthenticationService + CatMenu *CatMenuService + Interface *InterfaceService + Project *ProjectService + func NewClient(baseURL string, apiToken string) (*Client, error) + func (c *Client) Do(req *http.Request, v interface{}) (string, error) + func (c *Client) Get(urlStr string, body io.Reader) (string, error) + func (c *Client) GetBaseURL() url.URL + func (c *Client) NewMultiPartRequest(method, urlStr string, buf *bytes.Buffer) (*http.Request, error) + func (c *Client) NewRawRequest(method, urlStr string, body io.Reader) (*http.Request, error) + func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) + func (c *Client) Post(urlStr string, body interface{}) (string, error) + type CommonResp struct + ErrCode int + ErrMsg string + type EnvGlobal struct + ID string + Name string + Value string + type EnvHeader struct + ID string + Name string + Value string + type Error struct + ErrorMessages []string + Errors map[string]string + HTTPError error + func (e *Error) Error() string + func (e *Error) LongError() string + type Interface struct + Data InterfaceData + func (i *Interface) ToString() string + type InterfaceData struct + type InterfaceList struct + Data InterfaceListData + ErrCode int + ErrMsg string + func (i *InterfaceList) ToString() string + type InterfaceListData struct + Count int + List []InterfaceData + Total int + type InterfaceListParam struct + CatID int + Limit int + Page int + Token string + type InterfaceParam struct + ID int + Token string + type InterfaceService struct + func (s *InterfaceService) AddOrUpdate(data *InterfaceData) (*ModifyResp, error) + func (s *InterfaceService) Get(id int) (*Interface, error) + func (s *InterfaceService) GetList(opt *InterfaceListParam) (*InterfaceList, error) + func (s *InterfaceService) UploadSwagger(data *string) (*ModifyResp, error) + type ModifyMenuParam struct + ProjectID int + type ModifyMenuResp struct + Data interface{} + func (p *ModifyMenuResp) ToString() string + type ModifyMenumReq struct + Token string + type ModifyResp struct + Data interface{} + func (m *ModifyResp) ToString() string + type ModifyResult struct + N int + NModified int + Ok int + type Project struct + Data ProjectData + ErrCode int + ErrMsg string + func (p *Project) ToString() string + type ProjectData struct + Env []ProjectEnv + GroupID int + ID int + Name string + Role bool + UID int + type ProjectEnv struct + Domain string + Global []EnvGlobal + Header []EnvHeader + ID string + Name string + type ProjectParam struct + Token string + type ProjectService struct + func (s *ProjectService) Get() (*Project, error) + type ReqKVItemDetail struct + Required string + Type string + type ReqKVItemSimple struct + Desc string + Example string + Name string + Value string + type UploadSwaggerReq struct + Json string + Merge string + Token string + Type string