Documentation
¶
Index ¶
- func Token() string
- type Alert
- type Client
- func (c *Client) OrganizationAlerts(ctx context.Context, org string) ([]Alert, error)
- func (c *Client) OrganizationRepositories(ctx context.Context, org string) ([]Repository, error)
- func (c *Client) Repository(ctx context.Context, owner, repo string) (Repository, error)
- func (c *Client) RepositoryAlerts(ctx context.Context, owner, repo string) ([]Alert, error)
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
Number int64 `json:"number"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
HTMLURL string `json:"html_url"`
Tool struct {
Name string `json:"name"`
Version string `json:"version"`
GUID string `json:"guid"`
} `json:"tool"`
Rule struct {
ID, Name, Severity string
Description string `json:"description"`
SecuritySeverity string `json:"security_severity_level"`
Tags []string `json:"tags"`
} `json:"rule"`
Repository Repository `json:"repository"`
MostRecentInstance struct {
Ref string `json:"ref"`
CommitSHA string `json:"commit_sha"`
AnalysisKey string `json:"analysis_key"`
Environment string `json:"environment"`
Category string `json:"category"`
Message struct {
Text string `json:"text"`
} `json:"message"`
Location struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
StartColumn int `json:"start_column"`
EndColumn int `json:"end_column"`
} `json:"location"`
} `json:"most_recent_instance"`
}
type Client ¶
type Client struct {
HTTP *http.Client
BaseURL, Token string
// OnPage reports only successfully decoded pages, with cumulative item counts.
OnPage func(path string, pages, items int)
}
func (*Client) OrganizationAlerts ¶
func (*Client) OrganizationRepositories ¶
func (*Client) Repository ¶
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
HTMLURL string `json:"html_url"`
Description *string `json:"description"`
Visibility string `json:"visibility"`
Private bool `json:"private"`
Archived bool `json:"archived"`
Language *string `json:"language"`
Owner struct {
Login string `json:"login"`
} `json:"owner"`
}
Click to show internal directories.
Click to hide internal directories.