{"modulePath":"github.com/deepsourcelabs/cli","version":"v0.10.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package deepsource\n\nDeepSource SDK\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(cp ClientOpts) (*Client, error)\n```\nReturns a new GQLClient\n\n```go\nfunc (c Client) GQL() *graphql.Client\n```\nReturns a GraphQL client which can be used to interact with the GQL APIs\n\n```go\nfunc (c Client) GetIssues(ctx context.Context, owner, repoName, provider string, limit int) ([]issues.Issue, error)\n```\nReturns the list of issues for a certain repository whose data is sent as parameters. Owner : The username of the owner of the repository repoName : The name of the repository whose activation status has to be queried provider : The VCS provider which hosts the repo (GITHUB/GITLAB/BITBUCKET) limit : The amount of issues to be listed. The default limit is 30 while the maximum limit is currently 100.\n\n```go\nfunc (c Client) GetIssuesForFile(ctx context.Context, owner, repoName, provider, filePath string, limit int) ([]issues.Issue, error)\n```\nReturns the list of issues reported for a certain file in a certain repository whose data is sent as parameters. Owner : The username of the owner of the repository repoName : The name of the repository whose activation status has to be queried provider : The VCS provider which hosts the repo (GITHUB/GITLAB/BITBUCKET) filePath : The relative path of the file. Eg: \"tests/mock.py\" if a file \\`mock.py\\` is present in \\`tests\\` directory which in turn is present in the root dir limit : The amount of issues to be listed. The default limit is 30 while the maximum limit is currently 100.\n\n```go\nfunc (c Client) GetRepoStatus(ctx context.Context, owner, repoName, provider string) (*repository.Meta, error)\n```\nReturns the activation status of the repository whose data is sent as parameters. Owner : The username of the owner of the repository repoName : The name of the repository whose activation status has to be queried provider : The VCS provider which hosts the repo (GITHUB/GITLAB/BITBUCKET)\n\n```go\nfunc (c Client) GetSupportedAnalyzers(ctx context.Context) ([]analyzers.Analyzer, error)\n```\nReturns the list of Analyzers supported by DeepSource along with their meta like shortcode, metaschema.\n\n```go\nfunc (c Client) GetSupportedTransformers(ctx context.Context) ([]transformers.Transformer, error)\n```\nReturns the list of Transformers supported by DeepSource along with their meta like shortcode.\n\n```go\nfunc (c Client) GetToken() string\n```\nReturns the PAT which is required for authentication and thus, interacting with the APIs\n\n```go\nfunc (c Client) Login(ctx context.Context, deviceCode, description string) (*auth.PAT, error)\n```\nLogs in the client using the deviceCode and the user Code and returns the PAT and data which is required for authentication\n\n```go\nfunc (c Client) RefreshAuthCreds(ctx context.Context, token string) (*auth.PAT, error)\n```\nRefreshes the authentication credentials. Takes the refreshToken as a parameter.\n\n```go\nfunc (c Client) RegisterDevice(ctx context.Context) (*auth.Device, error)\n```\nRegisters the device and allots it a device code which is further used for fetching the PAT and other authentication data\n\n```go\ntype ClientOpts struct {\n\tToken    string\n\tHostName string\n}\n```\n\n","path":"github.com/deepsourcelabs/cli/deepsource","name":"deepsource","synopsis":"DeepSource SDK","isRedistributable":true}
