Add repository name to Entry

This commit is contained in:
Mustafa Gezen 2023-08-27 06:04:16 +02:00
parent 97730ab267
commit e7efc38219
Signed by: mustafa
GPG Key ID: DCDF010D946438C1
2 changed files with 16 additions and 12 deletions

View File

@ -25,14 +25,15 @@ import (
type Entry struct {
PikaTableName string `pika:"entries"`
Name string `db:"name"`
EntryID string `db:"entry_id"`
CreateTime time.Time `db:"create_time"`
OSRelease string `db:"os_release"`
Sha256Sum string `db:"sha256_sum"`
WorkerID sql.NullString `db:"worker_id"`
BatchName sql.NullString `db:"batch_name"`
UserEmail sql.NullString `db:"user_email"`
Name string `db:"name"`
EntryID string `db:"entry_id"`
CreateTime time.Time `db:"create_time"`
OSRelease string `db:"os_release"`
Sha256Sum string `db:"sha256_sum"`
RepositoryName string `db:"repository_name"`
WorkerID sql.NullString `db:"worker_id"`
BatchName sql.NullString `db:"batch_name"`
UserEmail sql.NullString `db:"user_email"`
}
func (e *Entry) GetID() string {

View File

@ -35,7 +35,7 @@ message Entry {
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Package NEVRA (name-epoch:version-release.arch) of the package being archived.
string entry_id = 2 [(google.api.field_behavior) = REQUIRED];
string entry_id = 2 [(google.api.field_behavior) = IMMUTABLE];
// When the package was archived.
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = REQUIRED];
@ -48,17 +48,20 @@ message Entry {
// the SHA256 of the package.
string sha256_sum = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Repository name of the package as in which repository the package was archived from.
string repository = 6 [(google.api.field_behavior) = REQUIRED];
// Worker ID of the worker that archived the package.
// This value is output only as the API server will determine
// the worker ID of the worker that archived the package based
// on the authentication token used to make the request.
// If this field is not set, the package was archived by a
// user instead of a worker.
google.protobuf.StringValue worker_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.StringValue worker_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Name of the batch the package was archived in.
// If this field is not set, the package was not archived in a batch.
google.protobuf.StringValue batch = 7;
google.protobuf.StringValue batch = 8;
// User email of the user that archived the package.
// This value is output only as the API server will determine
@ -66,5 +69,5 @@ message Entry {
// on the authentication token used to make the request.
// If this field is not set, the package was archived by a
// worker instead of a user.
google.protobuf.StringValue user_email = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.StringValue user_email = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}