blob: 4973f3f521b501379ab5231cf9bd8e844265b780 [file] [log] [blame]
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Define a schema for representing container images generated during a build.
// For a given build target, we map container name to metadata about the image
// Then, for multiple builds, we map build target to each one's metadata.
//
// Joining multiple builds container metadata is simply achieved by using
// MergeFrom on the individual ContainerMetadata instances.
//
// Example metadata:
// {
// "containers" : {
// "amd64-generic" : {
// "images" : {
// "cros-provision" : {
// "repository" : { "hostname" : "gcr.io", "project" : "chromeos-bot" },
// "name" : "cros-provision",
// "digest" : "sha256:3e36d3622f5adad01080cc2120bb72c0714ecec6118eb9523586410b7435ae80",
// "tags" : [
// "8835841547076258945",
// "amd64-generic-release.R96-1.2.3"
// ]
// }
// }
// }
// }
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.1
// source: chromiumos/build/api/container_metadata.proto
package api
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GcrRepository struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` // Hostname without protocol (eg: gcr.io)
Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` // Project name (eg: chromeos-bot)
}
func (x *GcrRepository) Reset() {
*x = GcrRepository{}
if protoimpl.UnsafeEnabled {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GcrRepository) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GcrRepository) ProtoMessage() {}
func (x *GcrRepository) ProtoReflect() protoreflect.Message {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GcrRepository.ProtoReflect.Descriptor instead.
func (*GcrRepository) Descriptor() ([]byte, []int) {
return file_chromiumos_build_api_container_metadata_proto_rawDescGZIP(), []int{0}
}
func (x *GcrRepository) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *GcrRepository) GetProject() string {
if x != nil {
return x.Project
}
return ""
}
type ContainerImageInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Repository *GcrRepository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` // repository images are stored in
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // name of the image (eg: cros-provision)
Digest string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"` // docker provided hash of the image
Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` // list of tags attached to image
}
func (x *ContainerImageInfo) Reset() {
*x = ContainerImageInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContainerImageInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContainerImageInfo) ProtoMessage() {}
func (x *ContainerImageInfo) ProtoReflect() protoreflect.Message {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContainerImageInfo.ProtoReflect.Descriptor instead.
func (*ContainerImageInfo) Descriptor() ([]byte, []int) {
return file_chromiumos_build_api_container_metadata_proto_rawDescGZIP(), []int{1}
}
func (x *ContainerImageInfo) GetRepository() *GcrRepository {
if x != nil {
return x.Repository
}
return nil
}
func (x *ContainerImageInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ContainerImageInfo) GetDigest() string {
if x != nil {
return x.Digest
}
return ""
}
func (x *ContainerImageInfo) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
// Map from container name (canonically lowercase) to its metadata
type ContainerImageMap struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Images map[string]*ContainerImageInfo `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ContainerImageMap) Reset() {
*x = ContainerImageMap{}
if protoimpl.UnsafeEnabled {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContainerImageMap) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContainerImageMap) ProtoMessage() {}
func (x *ContainerImageMap) ProtoReflect() protoreflect.Message {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContainerImageMap.ProtoReflect.Descriptor instead.
func (*ContainerImageMap) Descriptor() ([]byte, []int) {
return file_chromiumos_build_api_container_metadata_proto_rawDescGZIP(), []int{2}
}
func (x *ContainerImageMap) GetImages() map[string]*ContainerImageInfo {
if x != nil {
return x.Images
}
return nil
}
// Map from a string identifier to container metadata.
// For build we'll map the build target to container metadata for it
// For provisioning, we'll map from specific boards to metadata
type ContainerMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Containers map[string]*ContainerImageMap `protobuf:"bytes,1,rep,name=containers,proto3" json:"containers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ContainerMetadata) Reset() {
*x = ContainerMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContainerMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContainerMetadata) ProtoMessage() {}
func (x *ContainerMetadata) ProtoReflect() protoreflect.Message {
mi := &file_chromiumos_build_api_container_metadata_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContainerMetadata.ProtoReflect.Descriptor instead.
func (*ContainerMetadata) Descriptor() ([]byte, []int) {
return file_chromiumos_build_api_container_metadata_proto_rawDescGZIP(), []int{3}
}
func (x *ContainerMetadata) GetContainers() map[string]*ContainerImageMap {
if x != nil {
return x.Containers
}
return nil
}
var File_chromiumos_build_api_container_metadata_proto protoreflect.FileDescriptor
var file_chromiumos_build_api_container_metadata_proto_rawDesc = []byte{
0x0a, 0x2d, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x75, 0x69,
0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x14, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c,
0x64, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x45, 0x0a, 0x0d, 0x47, 0x63, 0x72, 0x52, 0x65, 0x70, 0x6f,
0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x99, 0x01, 0x0a,
0x12, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69,
0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x63, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65,
0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69,
0x67, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x4b,
0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33,
0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c,
0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x63, 0x0a, 0x0b, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x68,
0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xd4, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x57, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x68, 0x72,
0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x1a,
0x66, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73,
0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x6f, 0x2e, 0x63, 0x68,
0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d,
0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6f, 0x2f,
0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_chromiumos_build_api_container_metadata_proto_rawDescOnce sync.Once
file_chromiumos_build_api_container_metadata_proto_rawDescData = file_chromiumos_build_api_container_metadata_proto_rawDesc
)
func file_chromiumos_build_api_container_metadata_proto_rawDescGZIP() []byte {
file_chromiumos_build_api_container_metadata_proto_rawDescOnce.Do(func() {
file_chromiumos_build_api_container_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_chromiumos_build_api_container_metadata_proto_rawDescData)
})
return file_chromiumos_build_api_container_metadata_proto_rawDescData
}
var file_chromiumos_build_api_container_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_chromiumos_build_api_container_metadata_proto_goTypes = []interface{}{
(*GcrRepository)(nil), // 0: chromiumos.build.api.GcrRepository
(*ContainerImageInfo)(nil), // 1: chromiumos.build.api.ContainerImageInfo
(*ContainerImageMap)(nil), // 2: chromiumos.build.api.ContainerImageMap
(*ContainerMetadata)(nil), // 3: chromiumos.build.api.ContainerMetadata
nil, // 4: chromiumos.build.api.ContainerImageMap.ImagesEntry
nil, // 5: chromiumos.build.api.ContainerMetadata.ContainersEntry
}
var file_chromiumos_build_api_container_metadata_proto_depIdxs = []int32{
0, // 0: chromiumos.build.api.ContainerImageInfo.repository:type_name -> chromiumos.build.api.GcrRepository
4, // 1: chromiumos.build.api.ContainerImageMap.images:type_name -> chromiumos.build.api.ContainerImageMap.ImagesEntry
5, // 2: chromiumos.build.api.ContainerMetadata.containers:type_name -> chromiumos.build.api.ContainerMetadata.ContainersEntry
1, // 3: chromiumos.build.api.ContainerImageMap.ImagesEntry.value:type_name -> chromiumos.build.api.ContainerImageInfo
2, // 4: chromiumos.build.api.ContainerMetadata.ContainersEntry.value:type_name -> chromiumos.build.api.ContainerImageMap
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_chromiumos_build_api_container_metadata_proto_init() }
func file_chromiumos_build_api_container_metadata_proto_init() {
if File_chromiumos_build_api_container_metadata_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_chromiumos_build_api_container_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GcrRepository); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chromiumos_build_api_container_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContainerImageInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chromiumos_build_api_container_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContainerImageMap); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chromiumos_build_api_container_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContainerMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_chromiumos_build_api_container_metadata_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_chromiumos_build_api_container_metadata_proto_goTypes,
DependencyIndexes: file_chromiumos_build_api_container_metadata_proto_depIdxs,
MessageInfos: file_chromiumos_build_api_container_metadata_proto_msgTypes,
}.Build()
File_chromiumos_build_api_container_metadata_proto = out.File
file_chromiumos_build_api_container_metadata_proto_rawDesc = nil
file_chromiumos_build_api_container_metadata_proto_goTypes = nil
file_chromiumos_build_api_container_metadata_proto_depIdxs = nil
}