Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListOptions ¶
type ListOptions struct {
Cursor string `json:"cursor"`
PerPage *int `json:"per_page"`
Search string `json:"search"`
Type SourcesListType `json:"type"`
}
type SourcesClient ¶
type SourcesClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...client.ClientOption) (*SourcesClient, error)
func (*SourcesClient) Get ¶
func (c *SourcesClient) Get(sourceId int) (*SourcesGetResult, error)
func (*SourcesClient) List ¶
func (c *SourcesClient) List(lo ListOptions) (*SourcesListResult, *client.PaginationMeta, error)
type SourcesGetResult ¶
type SourcesGetResult struct {
Result SourcesResponse `json:"result"`
Error *Error `json:"error"`
}
type SourcesListResult ¶
type SourcesListResult struct {
Result []SourcesResponse `json:"result"`
Error *Error `json:"error"`
}
type SourcesListType ¶
type SourcesListType string
const ( Bitbucket SourcesListType = "bitbucket" GitHub SourcesListType = "github" GitLab SourcesListType = "gitlab" )
type SourcesResponse ¶
type SourcesResponse struct {
ID int64 `json:"id"`
URL string `json:"url"`
Type string `json:"type"`
FullName string `json:"full_name"`
Visibility string `json:"visibility"`
Health string `json:"health"`
OpenIncidentsCount int `json:"open_incidents_count"`
ClosedIncidentsCount int `json:"closed_incidents_count"`
LastScan LastScan `json:"last_scan"`
}
Click to show internal directories.
Click to hide internal directories.