licence_audit/exception

Types

pub type Coverage {
  NotEvaluated(String)
  Evaluated(
    matched: List(Int),
    unavailable: List(#(String, String)),
  )
}

Constructors

  • NotEvaluated(String)
  • Evaluated(
      matched: List(Int),
      unavailable: List(#(String, String)),
    )
pub type Decision {
  Unaccepted
  Excepted(Exception)
  Expired(Exception)
}

Constructors

pub type Error {
  UnknownField(String)
  NestedFields
  RequiredString(String)
  UnexpectedField(String)
  InvalidFinding
  LicenceRequiresHex
  InvalidExpiryType
  InvalidPurl
  InvalidDate
  OverlappingEntries(first: Exception, second: Exception)
  AmbiguousIdentity(Exception)
}

Constructors

  • UnknownField(String)
  • NestedFields
  • RequiredString(String)
  • UnexpectedField(String)
  • InvalidFinding
  • LicenceRequiresHex
  • InvalidExpiryType
  • InvalidPurl
  • InvalidDate
  • OverlappingEntries(first: Exception, second: Exception)
  • AmbiguousIdentity(Exception)
pub type Exception {
  Exception(
    number: Int,
    purl: String,
    finding: Finding,
    reason: String,
    expires: option.Option(String),
  )
}

Constructors

  • Exception(
      number: Int,
      purl: String,
      finding: Finding,
      reason: String,
      expires: option.Option(String),
    )
pub type Finding {
  DeniedLicence(String)
  UnallowedLicence(String)
  InvalidLicenceExpression(String)
  NoLicencesDeclared
  Advisory(String)
}

Constructors

  • DeniedLicence(String)
  • UnallowedLicence(String)
  • InvalidLicenceExpression(String)
  • NoLicencesDeclared
  • Advisory(String)

Values

pub fn accepted(decision: Decision) -> Bool
pub fn decide(
  entries: List(Exception),
  purl: String,
  finding: Finding,
  aliases: List(String),
  today: String,
) -> Result(Decision, Error)
pub fn decision_text(decision: Decision) -> String
pub fn describe_error(error: Error) -> String
pub fn finding_text(finding: Finding) -> String
pub fn is_expired(entry: Exception, today: String) -> Bool
pub fn matched(decisions: List(Decision)) -> List(Int)
pub fn parse(
  table: List(#(List(String), tomlet.Value)),
  number: Int,
) -> Result(Exception, Error)
pub fn summary(
  entries: List(Exception),
  today: String,
  licences: Coverage,
  advisories: Coverage,
) -> String
pub fn utc_date(now: timestamp.Timestamp) -> String
pub fn validate_date(date: String) -> Result(Nil, Error)
pub fn validate_identities(
  entries: List(Exception),
  purls: List(String),
) -> Result(Nil, Error)
pub fn validate_unique(
  entries: List(Exception),
) -> Result(Nil, Error)
✨ Search Document