code.gitea.io/gitea@v1.22.3/modules/structs/package.go (about) 1 // Copyright 2021 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package structs 5 6 import ( 7 "time" 8 ) 9 10 // Package represents a package 11 type Package struct { 12 ID int64 `json:"id"` 13 Owner *User `json:"owner"` 14 Repository *Repository `json:"repository"` 15 Creator *User `json:"creator"` 16 Type string `json:"type"` 17 Name string `json:"name"` 18 Version string `json:"version"` 19 HTMLURL string `json:"html_url"` 20 // swagger:strfmt date-time 21 CreatedAt time.Time `json:"created_at"` 22 } 23 24 // PackageFile represents a package file 25 type PackageFile struct { 26 ID int64 `json:"id"` 27 Size int64 28 Name string `json:"name"` 29 HashMD5 string `json:"md5"` 30 HashSHA1 string `json:"sha1"` 31 HashSHA256 string `json:"sha256"` 32 HashSHA512 string `json:"sha512"` 33 }