github.com/stackb/rules_proto@v0.0.0-20240221195024-5428336c51f1/pkg/protoc/proto_library.go (about)

     1  package protoc
     2  
     3  import (
     4  	"github.com/bazelbuild/bazel-gazelle/rule"
     5  )
     6  
     7  // ProtoLibrary represents a proto_library target and its associated parsed
     8  // .proto files.
     9  type ProtoLibrary interface {
    10  	// Name returns the name of the rule (e.g. foo_proto)
    11  	Name() string
    12  	// BaseName returns the name of the rule (e.g. foo).  This is typically
    13  	// derived from the proto file package or name.
    14  	BaseName() string
    15  	// Rule returns the underlying rule
    16  	Rule() *rule.Rule
    17  	// Srcs() returns the relative path of srcs, including args.Rel
    18  	Srcs() []string
    19  	// Deps lists all direct library dependencies.
    20  	Deps() []string
    21  	// Imports lists all direct library proto import filenames.
    22  	Imports() []string
    23  	// StripImportPrefix returns the strip_import_prefix or the empty string.
    24  	StripImportPrefix() string
    25  	// Files returns the list of proto files in the rule.
    26  	Files() []*File
    27  }