Documentation
¶
Index ¶
- func CodeGeneratorRequestToImage(request *pluginpb.CodeGeneratorRequest) (*imagev1beta1.Image, error)
- func FileDescriptorSetToImage(fileDescriptorSet *descriptorpb.FileDescriptorSet) (*imagev1beta1.Image, error)
- func ImageImportNames(image *imagev1beta1.Image) ([]string, error)
- func ImageToCodeGeneratorRequest(image *imagev1beta1.Image, parameter string, fileToGenerate ...string) (*pluginpb.CodeGeneratorRequest, error)
- func ImageToFileDescriptorSet(image *imagev1beta1.Image) (*descriptorpb.FileDescriptorSet, error)
- func ImageWithSpecificNames(image *imagev1beta1.Image, allowNotExist bool, specificNames ...string) (*imagev1beta1.Image, error)
- func ImageWithoutImports(image *imagev1beta1.Image) (*imagev1beta1.Image, error)
- func ValidateImage(image *imagev1beta1.Image) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeGeneratorRequestToImage ¶
func CodeGeneratorRequestToImage(request *pluginpb.CodeGeneratorRequest) (*imagev1beta1.Image, error)
CodeGeneratorRequestToImage converts the CodeGeneratorRequest to an Image.
Validates the input and output.
func FileDescriptorSetToImage ¶ added in v0.13.0
func FileDescriptorSetToImage(fileDescriptorSet *descriptorpb.FileDescriptorSet) (*imagev1beta1.Image, error)
FileDescriptorSetToImage converts the FileDescriptorSet to an Image.
This does not set the ImageExtension.
Backing FileDescriptorProtos are not copied, only the references are copied. This will result in unknown fields being dropped from the backing FileDescriptorSet, but not the backing FileDescriptorProtos.
Validates the input and output.
func ImageImportNames ¶
func ImageImportNames(image *imagev1beta1.Image) ([]string, error)
ImageImportNames returns the sorted import names.
Validates the input.
func ImageToCodeGeneratorRequest ¶
func ImageToCodeGeneratorRequest( image *imagev1beta1.Image, parameter string, fileToGenerate ...string, ) (*pluginpb.CodeGeneratorRequest, error)
ImageToCodeGeneratorRequest converts the Image to a CodeGeneratorRequest.
The files to generate must be within the Image. Files to generate are normalized and validated.
Validates the input and output.
func ImageToFileDescriptorSet ¶
func ImageToFileDescriptorSet(image *imagev1beta1.Image) (*descriptorpb.FileDescriptorSet, error)
ImageToFileDescriptorSet converts the Image to a FileDescriptorSet.
This strips the backing ImageExtension.
Backing FileDescriptorProtos are not copied, only the references are copied. This will result in unknown fields being dropped from the backing FileDescriptorSet, but not the backing FileDescriptorProtos.
Validates the input and output.
func ImageWithSpecificNames ¶
func ImageWithSpecificNames( image *imagev1beta1.Image, allowNotExist bool, specificNames ...string, ) (*imagev1beta1.Image, error)
ImageWithSpecificNames returns a copy of the Image with only the Files with the given names.
Names are normalized and validated. If allowNotExist is false, the specific names must exist on the input image. Backing FileDescriptorProtos are not copied, only the references are copied.
Validates the input and output.
func ImageWithoutImports ¶
func ImageWithoutImports(image *imagev1beta1.Image) (*imagev1beta1.Image, error)
ImageWithoutImports returns a copy of the Image without imports.
If GetBufbuildImageExtension() is nil, returns the original Image. If there are no imports, returns the original Image.
Backing FileDescriptorProtos are not copied, only the references are copied. This will result in unknown fields being dropped from the backing Image, but not the backing FileDescriptorProtos.
Validates the input and output.
func ValidateImage ¶
func ValidateImage(image *imagev1beta1.Image) error
ValidateImage validates an Image.
Types ¶
This section is empty.