| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| package loaders |
| |
| import ( |
| // Import all protobuf libs to make sure proto file descriptors are registered and |
| // loadable. (registration happens in the proto pkg's init()). |
| _ "fuchsia.googlesource.com/infra/infra/fxicfg/starlark/protos/recipes" |
| luci "go.chromium.org/luci/starlark/interpreter" |
| ) |
| |
| // ProtoLoader returns a luci.Loader that loads protocol buffer modules. |
| // |
| // lucicfg has its own internal-only ProtoLoader constructor. We don't want to have to |
| // send commits that project every time our recipe APIs change. |
| func ProtoLoader() luci.Loader { |
| return luci.ProtoLoader(map[string]string{ |
| // load("@proto//recipes/example.proto", example_pb="example" |
| "recipes/example.proto": "recipes/example.proto", |
| |
| // load("@proto//recipes/fuchsia.proto", fuchsia_pb="recipe_modules.infra.fuchsia") |
| "recipes/fuchsia.proto": "recipes/fuchsia.proto", |
| }) |
| } |