Documentation ¶
Index ¶
- func CheckResponse(r *http.Response) error
- type AttachmentsData
- type AttachmentsService
- type Author
- type Client
- func (c *Client) BaseURL() *url.URL
- func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*Response, error)
- func (c *Client) NewRequest(method, path string, requestQuery interface{}, requestBody interface{}) (*retryablehttp.Request, error)
- func (c *Client) UploadRequest(method, path string, content io.Reader, filename string) (*retryablehttp.Request, error)
- type Commit
- type Committer
- type DeleteTag
- type DeleteTagRequest
- type ErrorResponse
- type GetProjectsRequest
- type GetTagsData
- type GetTagsRequestPath
- type GetTagsRequestQuery
- type Language
- type ListOptions
- type Project
- type ProjectTypeValue
- type ProjectsData
- type ProjectsService
- type Response
- type SortByValue
- type SortDirectionValue
- type Tag
- type TagService
- type Tagger
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
Types ¶
type AttachmentsData ¶
type AttachmentsService ¶
type AttachmentsService struct {
// contains filtered or unexported fields
}
func (*AttachmentsService) PostAttachments ¶
func (s *AttachmentsService) PostAttachments(filePath string) (*AttachmentsData, *Response, error)
PostAttachments 上传文件 https://apifox.com/apidoc/shared-da30afb0-9d2e-429b-a4bc-a83209e06021/api-128323479
type Client ¶
type Client struct { UserAgent string Projects *ProjectsService Attachments *AttachmentsService Tag *TagService // contains filtered or unexported fields }
func (*Client) NewRequest ¶
type DeleteTagRequest ¶ added in v0.1.0
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type GetProjectsRequest ¶
type GetProjectsRequest struct { SortBy SortByValue `url:"sort_by,omitempty" json:"sort_by,omitempty"` // 排序方式 SortDirection SortDirectionValue `url:"sort_direction,omitempty" json:"sort_direction,omitempty"` // 排序字段 Search string `url:"search,omitempty" json:"search,omitempty"` // 搜索关键词 CategoryId string `url:"category_id,omitempty" json:"category_id,omitempty"` // 项目分类id LanguageId string `url:"language_id,omitempty" json:"language_id,omitempty"` // 项目语言id ProjectType ProjectTypeValue `url:"project_type,omitempty" json:"project_type,omitempty"` // 项目类型 ListOptions }
type GetTagsData ¶ added in v0.2.0
type GetTagsRequestPath ¶ added in v1.0.0
type GetTagsRequestQuery ¶ added in v1.0.0
type GetTagsRequestQuery struct { Name string // 搜索关键词,可选 ListOptions }
type ListOptions ¶
type Project ¶
type Project struct { Id int `json:"id"` RepoId int `json:"repo_id"` Identifier string `json:"identifier"` Name string `json:"name"` Description string `json:"description"` Visits int `json:"visits"` PraisesCount int `json:"praises_count"` ForkedCount int `json:"forked_count"` IsPublic bool `json:"is_public"` MirrorUrl string `json:"mirror_url"` Type int `json:"type"` LastUpdateTime int `json:"last_update_time"` TimeAgo string `json:"time_ago"` ForkedFromProjectId int `json:"forked_from_project_id"` OpenDevops bool `json:"open_devops"` Platform string `json:"platform"` Author Author `json:"author"` Category interface{} `json:"category"` Language Language `json:"language"` Topics []Topic `json:"topics"` }
type ProjectTypeValue ¶
type ProjectTypeValue string // 项目类型
const ( ProjectTypeCommon ProjectTypeValue = "common" // 普通项目 ProjectTypeMirror ProjectTypeValue = "mirror" // 授权用户为仓库成员 ProjectTypeSyncMirror ProjectTypeValue = "sync_mirror" // 授权用户为仓库所在组织并有访问仓库权限 )
type ProjectsData ¶
type ProjectsService ¶
type ProjectsService struct {
// contains filtered or unexported fields
}
func (*ProjectsService) GetProjects ¶
func (s *ProjectsService) GetProjects(request *GetProjectsRequest) (*ProjectsData, *Response, error)
GetProjects 项目列表 https://apifox.com/apidoc/shared-da30afb0-9d2e-429b-a4bc-a83209e06021/api-102299292
type SortByValue ¶
type SortByValue string // 排序方式
const ( SortByDesc SortByValue = "desc" // 倒序 SortByAsc SortByValue = "asc" // 正序 )
type SortDirectionValue ¶
type SortDirectionValue string // 排序字段
const ( SortDirectionUpdatedOn SortDirectionValue = "updated_on" // 公开 SortDirectionCreatedOn SortDirectionValue = "created_on" // 私有 SortDirectionForkedCount SortDirectionValue = "forked_count" // 所有 SortDirectionPraisesCount SortDirectionValue = "praises_count" )
type Tag ¶ added in v0.2.0
type Tag struct { Name string `json:"name"` Id string `json:"id"` ZipballUrl string `json:"zipball_url"` TarballUrl string `json:"tarball_url"` Tagger Tagger `json:"tagger"` TimeAgo string `json:"time_ago"` CreatedAtUnix int `json:"created_at_unix"` Message string `json:"message"` Commit Commit `json:"commit"` }
type TagService ¶ added in v0.1.0
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) DeleteTag ¶ added in v0.1.0
func (s *TagService) DeleteTag(request *DeleteTagRequest) (*DeleteTag, *Response, error)
DeleteTag 删除一个标签 https://apifox.com/apidoc/shared-da30afb0-9d2e-429b-a4bc-a83209e06021/api-118749620
func (*TagService) GetTags ¶ added in v0.2.0
func (s *TagService) GetTags(request *GetTagsRequestPath, requestQuery *GetTagsRequestQuery) (*GetTagsData, *Response, error)
GetTags 获取仓库标签列表 https://apifox.com/apidoc/shared-da30afb0-9d2e-429b-a4bc-a83209e06021/api-118749619
Click to show internal directories.
Click to hide internal directories.