Documentation
¶
Index ¶
- func CountProtoFiles(paths map[string]string) int
- func Main(ver string) *redant.Command
- type Config
- type ProtoWalker
- func (w *ProtoWalker) CollectPluginConfigs(baseCfg *Config, pluginCfgName string) map[string]*Config
- func (w *ProtoWalker) GetAllProtoDirs() []string
- func (w *ProtoWalker) GetProtoFiles(dir string) []string
- func (w *ProtoWalker) HasProtoFiles(dir string) bool
- func (w *ProtoWalker) WalkDirs() map[string][]string
- type ProtocBuilder
- type ProtocCommand
- type VendorResult
- type VendorService
- type YamlListType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountProtoFiles ¶ added in v0.1.0
CountProtoFiles counts total proto files in resolved paths.
Types ¶
type ProtoWalker ¶ added in v0.1.0
type ProtoWalker struct {
// contains filtered or unexported fields
}
ProtoWalker provides utilities for walking proto directories.
func NewProtoWalker ¶ added in v0.1.0
func NewProtoWalker(roots, excludes []string) *ProtoWalker
NewProtoWalker creates a new ProtoWalker.
func (*ProtoWalker) CollectPluginConfigs ¶ added in v0.1.0
func (w *ProtoWalker) CollectPluginConfigs(baseCfg *Config, pluginCfgName string) map[string]*Config
CollectPluginConfigs collects plugin configurations for each proto directory.
func (*ProtoWalker) GetAllProtoDirs ¶ added in v0.1.0
func (w *ProtoWalker) GetAllProtoDirs() []string
GetAllProtoDirs returns all directories that contain proto files.
func (*ProtoWalker) GetProtoFiles ¶ added in v0.1.0
func (w *ProtoWalker) GetProtoFiles(dir string) []string
GetProtoFiles returns all .proto files in a directory (non-recursive).
func (*ProtoWalker) HasProtoFiles ¶ added in v0.1.0
func (w *ProtoWalker) HasProtoFiles(dir string) bool
HasProtoFiles checks if a directory contains proto files.
func (*ProtoWalker) WalkDirs ¶ added in v0.1.0
func (w *ProtoWalker) WalkDirs() map[string][]string
WalkDirs walks all directories containing proto files. Returns a map of directory path to list of proto files in that directory.
type ProtocBuilder ¶ added in v0.1.0
type ProtocBuilder struct {
// contains filtered or unexported fields
}
ProtocBuilder builds protoc commands for code generation.
func NewProtocBuilder ¶ added in v0.1.0
func NewProtocBuilder(includes []string, vendor, pwd string) *ProtocBuilder
NewProtocBuilder creates a new ProtocBuilder.
func (*ProtocBuilder) BuildCommand ¶ added in v0.1.0
func (b *ProtocBuilder) BuildCommand(cfg *Config, protoPath string) *ProtocCommand
BuildCommand builds a protoc command for the given config and proto path.
type ProtocCommand ¶ added in v0.1.0
type ProtocCommand struct {
// contains filtered or unexported fields
}
ProtocCommand represents a protoc command to execute.
func (*ProtocCommand) Execute ¶ added in v0.1.0
func (c *ProtocCommand) Execute() error
Execute runs the protoc command.
type VendorResult ¶ added in v0.1.0
type VendorResult struct {
ResolvedPaths map[string]string // dep.Name -> localPath
FailedDeps []string
Changed bool
}
VendorResult contains the result of a vendor operation.
type VendorService ¶ added in v0.1.0
type VendorService struct {
// contains filtered or unexported fields
}
VendorService handles dependency vendoring operations.
func NewVendorService ¶ added in v0.1.0
func NewVendorService(config *Config) *VendorService
NewVendorService creates a new VendorService.
func (*VendorService) CacheDir ¶ added in v0.1.0
func (s *VendorService) CacheDir() string
CacheDir returns the cache directory path.
func (*VendorService) CleanCache ¶ added in v0.1.0
func (s *VendorService) CleanCache() error
CleanCache cleans the dependency cache.
func (*VendorService) CopyToVendor ¶ added in v0.1.0
func (s *VendorService) CopyToVendor(resolvedPaths map[string]string) (int, error)
CopyToVendor copies resolved dependencies to the vendor directory.
func (*VendorService) ResolveDependencies ¶ added in v0.1.0
func (s *VendorService) ResolveDependencies(ctx context.Context, update bool) (*VendorResult, error)
ResolveDependencies resolves all configured dependencies.
type YamlListType ¶ added in v0.0.24
type YamlListType[T any] []T
func (*YamlListType[T]) UnmarshalYAML ¶ added in v0.0.24
func (p *YamlListType[T]) UnmarshalYAML(value *yaml.Node) error