source

package
v0.0.0-...-fb79b61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPaths = []string{
	"j5.yaml",
	"jsonapi.yaml",
	"j5.yml",
	"jsonapi.yml",
	"ext/j5/j5.yaml",
	"ext/j5/j5.yml",
}
View Source
var ErrPluginCycle = errors.New("plugin cycle detected")

Functions

func CodeGeneratorRequestFromSource

func CodeGeneratorRequestFromSource(ctx context.Context, src string) (*pluginpb.CodeGeneratorRequest, error)

func ReadDirConfigs

func ReadDirConfigs(src string) (*config_j5pb.Config, error)

func ReadImageFromSourceDir

func ReadImageFromSourceDir(ctx context.Context, src string) (*source_j5pb.SourceImage, error)

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewLocalDirSource

func NewLocalDirSource(ctx context.Context, commitInfo *source_j5pb.CommitInfo, config *config_j5pb.Config, sourceDir string) (*Source, error)

func ReadLocalSource

func ReadLocalSource(ctx context.Context, commitInfo *source_j5pb.CommitInfo, dir string) (*Source, error)

func (Source) CommitInfo

func (src Source) CommitInfo(context.Context) (*source_j5pb.CommitInfo, error)

func (Source) J5Config

func (src Source) J5Config() *config_j5pb.Config

func (*Source) PackageBuildConfig

func (src *Source) PackageBuildConfig(name string) (*config_j5pb.ProtoBuildConfig, error)

func (*Source) ProtoCodeGeneratorRequest

func (src *Source) ProtoCodeGeneratorRequest(ctx context.Context, root string) (*pluginpb.CodeGeneratorRequest, error)

func (*Source) ResolvePlugin

func (src *Source) ResolvePlugin(plugin *config_j5pb.BuildPlugin) (*config_j5pb.BuildPlugin, error)

func (*Source) SourceDescriptors

func (src *Source) SourceDescriptors(ctx context.Context) ([]*descriptorpb.FileDescriptorProto, error)

func (*Source) SourceFile

func (src *Source) SourceFile(ctx context.Context, filename string) ([]byte, error)

func (*Source) SourceImage

func (src *Source) SourceImage(ctx context.Context) (*source_j5pb.SourceImage, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL