package
0.0.0-20241219120101-d8a5f49ad328
Repository: https://github.com/fossology/licensedb.git
Documentation: pkg.go.dev

# Functions

The Converter function takes an input of type models.LicenseJson and converts it into a corresponding models.LicenseDB object.
GenerateDiffForReplacingLicenses creates list of license associations to be created and deleted such that the list of currently associated licenses to a obligation is overwritten by the list provided in the param newLicenseAssociations.
GetAuditEntity is an utility function to fetch obligation or license associated with an audit.
HashPassword hashes the password of the user using bcrypt.
No description provided by the author
ParseIdToInt convert the string ID from gin.Context to an integer and throw error if conversion fails.
PerformObligationMapActions created associations for licenses in insertLicenses and deletes associations for licenses in removeLicenses.
Populatedb populates the database with license data from a JSON file.
PreparePaginateResponse prepares the pagination response for the API.
VerifyPassword compares the input password with the password stored in the database.

# Constants

Status codes covering various scenarios that can occur on a license import.
Status codes covering various scenarios that can occur on a license import.
Status codes covering various scenarios that can occur on a license import.
Status codes covering various scenarios that can occur on a license import.

# Variables

DefaultLimit Set default max limit to 20.
DefaultPage Set default page to 1.

# Type aliases

LicenseImportStatusCode is internally used for checking status of a license import.