report

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2025 License: BSD-2-Clause Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CliVersion = "v0.8.0"
)

Variables

View Source
var ErrInvalidDSN = errors.New("DeepSource | Error | Invalid DSN. Cross verify DEEPSOURCE_DSN value against the settings page of the repository")

Functions

func NewCmdReport

func NewCmdReport() *cobra.Command

NewCmdVersion returns the current version of cli being used

Types

type DSN added in v0.8.5

type DSN struct {
	Protocol string
	Host     string
	Token    string
}

func NewDSN added in v0.8.5

func NewDSN(raw string) (*DSN, error)

type QueryResponse

type QueryResponse struct {
	Data struct {
		CreateArtifact struct {
			Error   string `json:"error"`
			Message string `json:"message"`
			Ok      bool   `json:"ok"`
		} `json:"createArtifact"`
	} `json:"data"`
}

QueryResponse is the response returned by artifacts report GraphQL query

type ReportOptions

type ReportOptions struct {
	Analyzer                    string
	AnalyzerType                string
	Key                         string
	Value                       string
	ValueFile                   string
	SkipCertificateVerification bool
	DSN                         string
	UseOIDC                     bool
	OIDCRequestToken            string // id token to manually get an OIDC token
	OIDCRequestUrl              string // url to manually get an OIDC token
	DeepSourceHostEndpoint      string // DeepSource host endpoint where the app is running. Defaults to the cloud endpoint https://app.deepsource.com
	OIDCProvider                string // OIDC provider to use for authentication
}

func (*ReportOptions) Run

func (opts *ReportOptions) Run() int

type ReportQuery

type ReportQuery struct {
	Query     string `json:"query"`
	Variables struct {
		Input ReportQueryInput `json:"input"`
	} `json:"variables"`
}

ReportQueryInput is the structure of artifacts report GraphQL query

type ReportQueryInput

type ReportQueryInput struct {
	AccessToken       string      `json:"accessToken"`
	CommitOID         string      `json:"commitOid"`
	ReporterName      string      `json:"reporter"`
	ReporterVersion   string      `json:"reporterVersion"`
	Key               string      `json:"key"`
	Data              string      `json:"data"`
	AnalyzerShortcode string      `json:"analyzer"`
	AnalyzerType      string      `json:"analyzerType,omitempty"`
	Metadata          interface{} `json:"metadata,omitempty"`
}

ReportQueryInput is the schema for variables of artifacts report GraphQL query

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL