Documentation
¶
Index ¶
- type Client
- func (c *Client) GetPackagesWithLifecycle(ctx context.Context, params map[string]string) (json.RawMessage, error)
- func (c *Client) GetSoftwareByID(ctx context.Context, softwareID int) (json.RawMessage, error)
- func (c *Client) GetSoftwareIDsByRepo(ctx context.Context, forge, org, repo, subrepoPath string) (json.RawMessage, error)
- func (c *Client) GetSoftwareList(ctx context.Context, search string, page, size int) (json.RawMessage, error)
- func (c *Client) GetSoftwareVulnerabilities(ctx context.Context, softwareID, page, size int) (json.RawMessage, error)
- func (c *Client) GetSoftwareVulnerabilityByID(ctx context.Context, softwareID, vulnID int) (json.RawMessage, error)
- func (c *Client) GetVulnerabilities(ctx context.Context, search string, kusariScore string, page, size int) (json.RawMessage, error)
- func (c *Client) GetVulnerabilityByExternalID(ctx context.Context, externalID string) (json.RawMessage, error)
- func (c *Client) SearchPackages(ctx context.Context, name, version string) (json.RawMessage, error)
- type RepoInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles HTTP requests to the Kusari Pico API.
func NewClient ¶
NewClient creates a new Pico API client. baseURL is the full tenant endpoint URL (e.g., "https://demo.api.us.kusari.cloud").
func NewClientFromWorkspace ¶
NewClientFromWorkspace creates a Pico client using the stored workspace configuration. It loads the workspace and extracts the tenant to initialize the client.
func (*Client) GetPackagesWithLifecycle ¶
func (c *Client) GetPackagesWithLifecycle(ctx context.Context, params map[string]string) (json.RawMessage, error)
GetPackagesWithLifecycle retrieves packages filtered by lifecycle status.
func (*Client) GetSoftwareByID ¶
GetSoftwareByID retrieves detailed information about a specific software by ID.
func (*Client) GetSoftwareIDsByRepo ¶
func (c *Client) GetSoftwareIDsByRepo(ctx context.Context, forge, org, repo, subrepoPath string) (json.RawMessage, error)
GetSoftwareIDsByRepo finds software IDs by repository metadata (forge, org, repo, subrepo_path). subrepoPath is optional - pass empty string to query all software in the repository.
func (*Client) GetSoftwareList ¶
func (c *Client) GetSoftwareList(ctx context.Context, search string, page, size int) (json.RawMessage, error)
GetSoftwareList retrieves a list of software with optional search filter.
func (*Client) GetSoftwareVulnerabilities ¶
func (c *Client) GetSoftwareVulnerabilities(ctx context.Context, softwareID, page, size int) (json.RawMessage, error)
GetSoftwareVulnerabilities retrieves vulnerabilities for a specific software by ID.
func (*Client) GetSoftwareVulnerabilityByID ¶
func (c *Client) GetSoftwareVulnerabilityByID(ctx context.Context, softwareID, vulnID int) (json.RawMessage, error)
GetSoftwareVulnerabilityByID retrieves detailed information about how a specific vulnerability affects a specific software.
func (*Client) GetVulnerabilities ¶
func (c *Client) GetVulnerabilities(ctx context.Context, search string, kusariScore string, page, size int) (json.RawMessage, error)
GetVulnerabilities retrieves vulnerabilities with optional filters.
func (*Client) GetVulnerabilityByExternalID ¶
func (c *Client) GetVulnerabilityByExternalID(ctx context.Context, externalID string) (json.RawMessage, error)
GetVulnerabilityByExternalID retrieves vulnerability details by external ID (CVE, GHSA, etc.).
func (*Client) SearchPackages ¶
SearchPackages searches for packages by name.
type RepoInfo ¶
RepoInfo contains repository information extracted from git.
func ExtractGitRemoteInfo ¶
ExtractGitRemoteInfo extracts forge, org, repo, and subrepo_path from git remote. If repoPath is empty, it uses the current working directory.