{"modulePath":"github.com/deepsourcelabs/cli","version":"v0.2.4","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Constants\n\n```go\nconst DefaultConnectTimeout = 1\n```\n\n```go\nconst DefaultReadTimeout = 10\n```\n\n## Functions\n\n```go\nfunc CheckTokenExpiry(client *DSClient, token string) (bool, error)\n```\n// Verifies the active status of JWT token\n\n```go\nfunc GetDeviceCode(client *DSClient) (string, string, string, int, int, error)\n```\n\n```go\nfunc GetRepoStatus(client *DSClient, owner string, repoName string, provider string) (bool, error)\n```\n\n```go\nfunc GetSupportedAnalyzers(client *DSClient) ([]string, []string, []string, map[string]string, error)\n```\n\n```go\nfunc GetSupportedTransformers(client *DSClient) ([]string, []string, map[string]string, error)\n```\n\n## Types\n\n```go\ntype AnalyzersQueryResponse struct {\n\tAnalyzers struct {\n\t\tEdges []struct {\n\t\t\tNode struct {\n\t\t\t\tName       string `json:\"name\"`\n\t\t\t\tShortcode  string `json:\"shortcode\"`\n\t\t\t\tMetaSchema string `json:\"metaSchema\"`\n\t\t\t} `json:\"node\"`\n\t\t} `json:\"edges\"`\n\t} `json:\"analyzers\"`\n}\n```\n\n```go\ntype DSClient struct {\n\tToken string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewDSClient(host string, token string) *DSClient\n```\n\n```go\ntype FetchJWTResponse struct {\n\tRequestjwt struct {\n\t\tPayload struct {\n\t\t\tEmail   string `json:\"email\"`\n\t\t\tExp     string `json:\"exp\"`\n\t\t\tOrigiat int64  `json:\"origIat\"`\n\t\t} `json:\"payload\"`\n\t\tToken            string `json:\"token\"`\n\t\tRefreshtoken     string `json:\"refreshToken\"`\n\t\tRefreshexpiresin int64  `json:\"refreshExpiresIn\"`\n\t} `json:\"requestJwt\"`\n}\n```\n\n```go\nfunc GetJWT(client *DSClient, deviceCode string) (*FetchJWTResponse, error)\n```\nFetches JWT\n\n```go\ntype IssuesListFileResponse struct {\n\tRepository struct {\n\t\tFile struct {\n\t\t\tIssues struct {\n\t\t\t\tEdges []struct {\n\t\t\t\t\tNode struct {\n\t\t\t\t\t\tPath          string `json:\"path\"`\n\t\t\t\t\t\tBeginline     int    `json:\"beginLine\"`\n\t\t\t\t\t\tEndline       int    `json:\"endLine\"`\n\t\t\t\t\t\tConcreteissue struct {\n\t\t\t\t\t\t\tAnalyzer struct {\n\t\t\t\t\t\t\t\tShortcode string `json:\"shortcode\"`\n\t\t\t\t\t\t\t} `json:\"analyzer\"`\n\t\t\t\t\t\t\tTitle     string `json:\"title\"`\n\t\t\t\t\t\t\tShortcode string `json:\"shortcode\"`\n\t\t\t\t\t\t} `json:\"concreteIssue\"`\n\t\t\t\t\t} `json:\"node\"`\n\t\t\t\t} `json:\"edges\"`\n\t\t\t} `json:\"issues\"`\n\t\t} `json:\"file\"`\n\t} `json:\"repository\"`\n}\n```\n\n```go\nfunc GetIssuesForFile(client *DSClient, owner string, repoName string, provider string, filePath string, limit int) (*IssuesListFileResponse, error)\n```\n\n```go\ntype IssuesListResponse struct {\n\tRepository struct {\n\t\tIssues struct {\n\t\t\tEdges []struct {\n\t\t\t\tNode struct {\n\t\t\t\t\tPath          string `json:\"path\"`\n\t\t\t\t\tBeginline     int    `json:\"beginLine\"`\n\t\t\t\t\tEndline       int    `json:\"endLine\"`\n\t\t\t\t\tConcreteissue struct {\n\t\t\t\t\t\tAnalyzer struct {\n\t\t\t\t\t\t\tShortcode string `json:\"shortcode\"`\n\t\t\t\t\t\t} `json:\"analyzer\"`\n\t\t\t\t\t\tTitle     string `json:\"title\"`\n\t\t\t\t\t\tShortcode string `json:\"shortcode\"`\n\t\t\t\t\t} `json:\"concreteIssue\"`\n\t\t\t\t} `json:\"node\"`\n\t\t\t} `json:\"edges\"`\n\t\t} `json:\"issues\"`\n\t} `json:\"repository\"`\n}\n```\n\n```go\nfunc GetIssues(client *DSClient, owner string, repoName string, provider string, limit int) (*IssuesListResponse, error)\n```\n\n```go\ntype RefreshAuthResponse struct {\n\tRefreshtoken struct {\n\t\tToken   string `json:\"token\"`\n\t\tPayload struct {\n\t\t\tEmail   string `json:\"email\"`\n\t\t\tExp     string `json:\"exp\"`\n\t\t\tOrigiat int64  `json:\"origIat\"`\n\t\t} `json:\"payload\"`\n\t\tRefreshexpiresin int64  `json:\"refreshExpiresIn\"`\n\t\tRefreshtoken     string `json:\"refreshToken\"`\n\t} `json:\"refreshToken\"`\n}\n```\n\n```go\nfunc RefreshAuthCreds(client *DSClient, refreshToken string) (*RefreshAuthResponse, error)\n```\n\n```go\ntype RepoStatusResponse struct {\n\tRepository struct {\n\t\tIsactivated bool `json:\"isActivated\"`\n\t} `json:\"repository\"`\n}\n```\n\n```go\ntype TransformersQueryResponse struct {\n\tTransformers struct {\n\t\tEdges []struct {\n\t\t\tNode struct {\n\t\t\t\tName      string `json:\"name\"`\n\t\t\t\tShortcode string `json:\"shortcode\"`\n\t\t\t} `json:\"node\"`\n\t\t} `json:\"edges\"`\n\t} `json:\"transformers\"`\n}\n```\n\n```go\ntype VerifyJWTResponse struct {\n\tVerifytoken struct {\n\t\tPayload struct {\n\t\t\tEmail   string `json:\"email\"`\n\t\t\tExp     int    `json:\"exp\"`\n\t\t\tOrigiat int    `json:\"origIat\"`\n\t\t} `json:\"payload\"`\n\t} `json:\"verifyToken\"`\n}\n```\n\n","path":"github.com/deepsourcelabs/cli/api","name":"api","synopsis":"","isRedistributable":true}
