diff --git a/tools/mothership/db/entry.go b/tools/mothership/db/entry.go index 4b9d3401..8e3b01fc 100644 --- a/tools/mothership/db/entry.go +++ b/tools/mothership/db/entry.go @@ -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 { diff --git a/tools/mothership/proto/v1/entry.proto b/tools/mothership/proto/v1/entry.proto index c24baf72..92e49c3d 100644 --- a/tools/mothership/proto/v1/entry.proto +++ b/tools/mothership/proto/v1/entry.proto @@ -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]; }