Skip to content

Commit

Permalink
docs: document the packages interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tale committed Feb 15, 2022
1 parent 65d770e commit 78a3672
Showing 1 changed file with 70 additions and 7 deletions.
77 changes: 70 additions & 7 deletions src/packages.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,74 @@
import type { IControl } from './control.d'

interface IPackage extends IControl {
filename: string // Filename
size: number // Size
md5?: string // MD5Sum
sha1?: string // SHA1
sha256?: string // SHA256
sha512?: string // SHA512
descriptionMd5?: string // Description-md5
/**
* A string depicting the file location of the package.
*
* Represents the `Filename` key on the control contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Filename
*/
filename: string


/**
* A number depicting the size of the package.
*
* Represents the `Size` key on the control contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Size.2C_MD5sum.2C_SHA1.2C_SHA256.2C_SHA512
*/
size: number

/**
* Optional list of MD5 file hashes.
*
* Represents the `MD5Sum` key on the Release contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Size.2C_MD5sum.2C_SHA1.2C_SHA256.2C_SHA512
*/
md5?: string

/**
* Optional list of SHA1 file hashes.
*
* Represents the `SHA1` key on the Release contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Size.2C_MD5sum.2C_SHA1.2C_SHA256.2C_SHA512
*/
sha1?: string

/**
* Optional list of SHA256 file hashes.
*
* Represents the `SHA256` key on the Release contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Size.2C_MD5sum.2C_SHA1.2C_SHA256.2C_SHA512
*/
sha256?: string

/**
* Optional list of SHA512 file hashes.
*
* Represents the `SHA512` key on the Release contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Size.2C_MD5sum.2C_SHA1.2C_SHA256.2C_SHA512
*/
sha512?: string

/**
* An optional string containing the hash of the full english description.
*
* Represents the `Description-md5` key on the Release contents.
*
* For the technical specification, see:
* https://wiki.debian.org/DebianRepository/Format#Description-md5
*/
descriptionMd5?: string
}

0 comments on commit 78a3672

Please sign in to comment.