code.gitea.io/gitea@v1.19.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 // swagger:strfmt date-time 20 CreatedAt time.Time `json:"created_at"` 21 } 22 23 // PackageFile represents a package file 24 type PackageFile struct { 25 ID int64 `json:"id"` 26 Size int64 27 Name string `json:"name"` 28 HashMD5 string `json:"md5"` 29 HashSHA1 string `json:"sha1"` 30 HashSHA256 string `json:"sha256"` 31 HashSHA512 string `json:"sha512"` 32 }