1// Copyright 2020 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto3"; 6 7package chromiumos.config.public_replication; 8 9option go_package = "go.chromium.org/chromiumos/config/go/public_replication"; 10 11import "google/protobuf/field_mask.proto"; 12 13// Configures which fields in a ConfigBundle are made public. 14// 15// Any message in a ConfigBundle that has a PublicReplication message as a field 16// will have the fields specified by the public_fields FieldMask made public. 17// For example, consider the ConfigBundle: 18// 19// software_configs { 20// audio_configs { 21// card_name: "testcard" 22// private_field: "secretA" 23// public_replication { 24// public_fields { 25// paths: "card_name" 26// } 27// } 28// } 29// } 30// 31// "card_name" will be made public, "private_field" will not be. 32// 33// A few notes: 34// - Currently PublicReplication just wraps a FieldMask. This is done so that 35// it can be discovered via proto reflection without accidentally using 36// FieldMasks that are not meant to control public fields. 37// - In FieldMasks a repeated field is only allowed in the last position of a 38// path (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask). 39// Using a single FieldMask for a ConfigBundle would not be very useful, since 40// more granularity is needed (i.e. saying all or none of 41// "software_configs" is public is not useful). Thus, FieldMasks to control 42// public fields are specified in child messages of ConfigBundle. 43message PublicReplication { 44 google.protobuf.FieldMask public_fields = 1; 45} 46