Files
forge/modules/structs/package.go
zeekayandHanzo Dev 9a07b4d089 legal: Hanzo AI, Inc. copyright above the upstream notices
2978 files. The fork is 2026-07-15 (rebrand: gitea.dev -> github.com/hanzoai/git),
so 2026 is the year, and "Copyright 2026 Hanzo AI, Inc." was already the form
used by the handful of files that had ours.

Shape is now:

	// Copyright 2026 Hanzo AI, Inc. All rights reserved.
	// Copyright 2015 The Gogs Authors. All rights reserved.
	// Copyright 2019 The Gitea Authors. All rights reserved.
	// SPDX-License-Identifier: MIT

Ours on top, theirs retained verbatim. Retained because MIT requires it, and
separately because they are true — those authors did write that code.

Not renamed to "The Git Authors": Git is a different project under a different
license, and putting its name here would attribute this code to people who have
nothing to do with it. Adding our line is the fix; overwriting theirs would have
been both a licence violation and a false statement.

gofmt still reports import-order drift in some of these files. It predates this
change (verified against a stash) and is left alone rather than burying a
one-line-per-file legal change under 3000 files of unrelated reordering.

Build clean.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 13:49:52 -07:00

51 lines
1.4 KiB
Go

// Copyright 2026 Hanzo AI, Inc. All rights reserved.
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import (
"time"
)
// Package represents a package
type Package struct {
// The unique identifier of the package
ID int64 `json:"id"`
// The owner of the package
Owner *User `json:"owner"`
// The repository that contains this package
Repository *Repository `json:"repository"`
// The user who created this package
Creator *User `json:"creator"`
// The type of the package (e.g., npm, maven, docker)
Type string `json:"type"`
// The name of the package
Name string `json:"name"`
// The version of the package
Version string `json:"version"`
// The HTML URL to view the package
HTMLURL string `json:"html_url"`
// swagger:strfmt date-time
// The date and time when the package was created
CreatedAt time.Time `json:"created_at"`
}
// PackageFile represents a package file
type PackageFile struct {
// The unique identifier of the package file
ID int64 `json:"id"`
// The size of the package file in bytes
Size int64 `json:"size"`
// The name of the package file
Name string `json:"name"`
// The MD5 hash of the package file
HashMD5 string `json:"md5"`
// The SHA1 hash of the package file
HashSHA1 string `json:"sha1"`
// The SHA256 hash of the package file
HashSHA256 string `json:"sha256"`
// The SHA512 hash of the package file
HashSHA512 string `json:"sha512"`
}