-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from chainguard-dev/create-pull-request/patch
Export mono/sdk: refs/heads/main
- Loading branch information
Showing
16 changed files
with
531 additions
and
567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
Copyright 2024 Chainguard, Inc. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package apk | ||
|
||
import "chainguard.dev/sdk/civil" | ||
|
||
const ( | ||
// PushedEventType is the cloudevents event type for registry pushes | ||
PushedEventType = "dev.chainguard.apk.push.v1" | ||
) | ||
|
||
// PushEvent describes an APK being pushed to the registry. | ||
type PushEvent struct { | ||
// Repository identifies the repository being pushed | ||
Repository string `json:"repository"` | ||
|
||
// GroupID identifies the UIDP of the APK repository (group) being pushed | ||
RepoID string `json:"repo_id"` | ||
|
||
// Package holds the name of the package being pushed. | ||
Package string `json:"package"` | ||
|
||
// Version holds the version of the package being pushed. | ||
Version string `json:"version"` | ||
|
||
// Architecture holds the architecture of the package being pushed. | ||
Architecture string `json:"architecture"` | ||
|
||
// Checksum holds the checksum of the package's control section as | ||
// it would appear in an APKINDEX entry for the package. | ||
Checksum string `json:"checksum"` | ||
|
||
// When holds when the push occurred. | ||
When civil.DateTime `json:"when"` | ||
|
||
// Location holds the detected approximate location of the client who pushed. | ||
// For example, "ColumbusOHUS" or "Minato City13JP". | ||
Location string `json:"location"` | ||
|
||
// RemoteAddress holds the address of the client who pushed. | ||
RemoteAddress string `json:"remote_address"` | ||
|
||
// UserAgent holds the user-agent of the client who pushed. | ||
UserAgent string `json:"user_agent"` | ||
|
||
Error *Error `json:"error,omitempty"` | ||
} | ||
|
||
type Error struct { | ||
Status int `json:"status"` | ||
Code string `json:"code"` | ||
Message string `json:"message"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.