Documentation ¶
Overview ¶
Package upload implements `fossa upload`.
`fossa upload` provides manual overrides for users whose builds are too complex or too custom for `fossa analyze` to successfully analyze. It essentially acts as a thin wrapper on top of the FOSSA API.
This command has multiple upload modes which accept different kinds of input. The upload modes are:
- Raw mode (default): uses the raw JSON that the CLI would normally upload. This is a thin wrapper over cURL.
- Locator mode: provides a newline-delimited list of locators. This is the simplest data format to generate, but also provides the least metadata. Most simple shell scripts could probably generate this.
- Graph mode (not implemented): provides the JSON dependency graph format used internally by the CLI. This is a good balance between complexity and ease-of-use. Generating this probably needs a proper script.
- Tarball mode (not implemented): provides a folder to upload as a project tarball.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = cli.Command{ Name: "upload", Usage: "Uploads user-provided test results to FOSSA", Action: Run, ArgsUsage: "DATA", Flags: flags.WithAPIFlags(flags.WithGlobalFlags([]cli.Flag{ cli.BoolFlag{Name: flags.Short(Locators), Usage: "upload data in locator format (instead of JSON)"}, })), }
Cmd is the CLI command struct for uploading.
View Source
var (
Locators = "locators"
)
Command-specific flags for `fossa upload`.
Functions ¶
func Do ¶
func Do(data []fossa.SourceUnit) (fossa.Locator, error)
Do performs a SourceUnit upload of the current project without other side effects.
func ParseLocators ¶
func ParseLocators(locators string) (fossa.SourceUnit, error)
ParseLocators parses newline-delimited string locators into SourceUnits.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.