Documentation
¶
Index ¶
- Variables
- func RegisterXToProtoServiceServer(s *grpc.Server, srv XToProtoServiceServer)
- type Format
- type GenerateCodeRequest
- func (*GenerateCodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateCodeRequest) GetConverter() *GenerateCodeRequest_Converter
- func (x *GenerateCodeRequest) GetMapping() *recordtoproto.RecordProtoMapping
- func (x *GenerateCodeRequest) GetProtoDefinition() *GenerateCodeRequest_ProtoDefinition
- func (x *GenerateCodeRequest) GetWorkspacePath() string
- func (*GenerateCodeRequest) ProtoMessage()
- func (x *GenerateCodeRequest) ProtoReflect() protoreflect.Message
- func (x *GenerateCodeRequest) Reset()
- func (x *GenerateCodeRequest) String() string
- type GenerateCodeRequest_Converter
- func (*GenerateCodeRequest_Converter) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateCodeRequest_Converter) GetDirectory() string
- func (x *GenerateCodeRequest_Converter) GetGoFileName() string
- func (x *GenerateCodeRequest_Converter) GetUpdateBuildRules() bool
- func (*GenerateCodeRequest_Converter) ProtoMessage()
- func (x *GenerateCodeRequest_Converter) ProtoReflect() protoreflect.Message
- func (x *GenerateCodeRequest_Converter) Reset()
- func (x *GenerateCodeRequest_Converter) String() string
- type GenerateCodeRequest_ProtoDefinition
- func (*GenerateCodeRequest_ProtoDefinition) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateCodeRequest_ProtoDefinition) GetDirectory() string
- func (x *GenerateCodeRequest_ProtoDefinition) GetProtoFileName() string
- func (x *GenerateCodeRequest_ProtoDefinition) GetUpdateBuildRules() bool
- func (*GenerateCodeRequest_ProtoDefinition) ProtoMessage()
- func (x *GenerateCodeRequest_ProtoDefinition) ProtoReflect() protoreflect.Message
- func (x *GenerateCodeRequest_ProtoDefinition) Reset()
- func (x *GenerateCodeRequest_ProtoDefinition) String() string
- type GenerateCodeResponse
- func (*GenerateCodeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateCodeResponse) GetConverterBuildFile() *GenerateCodeResponse_File
- func (x *GenerateCodeResponse) GetConverterGoFile() *GenerateCodeResponse_File
- func (x *GenerateCodeResponse) GetProtoBuildFile() *GenerateCodeResponse_File
- func (x *GenerateCodeResponse) GetProtoFile() *GenerateCodeResponse_File
- func (*GenerateCodeResponse) ProtoMessage()
- func (x *GenerateCodeResponse) ProtoReflect() protoreflect.Message
- func (x *GenerateCodeResponse) Reset()
- func (x *GenerateCodeResponse) String() string
- type GenerateCodeResponse_File
- func (*GenerateCodeResponse_File) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateCodeResponse_File) GetNewContents() []byte
- func (x *GenerateCodeResponse_File) GetWorkspaceRelativePath() string
- func (*GenerateCodeResponse_File) ProtoMessage()
- func (x *GenerateCodeResponse_File) ProtoReflect() protoreflect.Message
- func (x *GenerateCodeResponse_File) Reset()
- func (x *GenerateCodeResponse_File) String() string
- type InferRequest
- func (*InferRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InferRequest) GetExampleInputs() []*InputFile
- func (x *InferRequest) GetGoPackageName() string
- func (x *InferRequest) GetGoProtoImport() string
- func (x *InferRequest) GetInputFormat() Format
- func (x *InferRequest) GetMessageName() string
- func (x *InferRequest) GetPackageName() string
- func (x *InferRequest) GetTimestampLocation() string
- func (*InferRequest) ProtoMessage()
- func (x *InferRequest) ProtoReflect() protoreflect.Message
- func (x *InferRequest) Reset()
- func (x *InferRequest) String() string
- type InferResponse
- type InputFile
- func (*InputFile) Descriptor() ([]byte, []int)deprecated
- func (x *InputFile) GetInputContent() []byte
- func (x *InputFile) GetInputPath() string
- func (m *InputFile) GetSpec() isInputFile_Spec
- func (*InputFile) ProtoMessage()
- func (x *InputFile) ProtoReflect() protoreflect.Message
- func (x *InputFile) Reset()
- func (x *InputFile) String() string
- type InputFile_InputContent
- type InputFile_InputPath
- type MappingSet
- func (*MappingSet) Descriptor() ([]byte, []int)deprecated
- func (x *MappingSet) GetAdditionalMappings() []*recordtoproto.RecordProtoMapping
- func (x *MappingSet) GetTopLevelMapping() *recordtoproto.RecordProtoMapping
- func (*MappingSet) ProtoMessage()
- func (x *MappingSet) ProtoReflect() protoreflect.Message
- func (x *MappingSet) Reset()
- func (x *MappingSet) String() string
- type UnimplementedXToProtoServiceServer
- type XToProtoServiceClient
- type XToProtoServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Format_name = map[int32]string{ 0: "UNSPECIFIED_FORMAT", 1: "CSV", } Format_value = map[string]int32{ "UNSPECIFIED_FORMAT": 0, "CSV": 1, } )
Enum value maps for Format.
var File_github_com_google_xtoproto_proto_service_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterXToProtoServiceServer ¶
func RegisterXToProtoServiceServer(s *grpc.Server, srv XToProtoServiceServer)
Types ¶
type Format ¶
type Format int32
func (Format) Descriptor ¶
func (Format) Descriptor() protoreflect.EnumDescriptor
func (Format) EnumDescriptor
deprecated
func (Format) Number ¶
func (x Format) Number() protoreflect.EnumNumber
func (Format) Type ¶
func (Format) Type() protoreflect.EnumType
type GenerateCodeRequest ¶
type GenerateCodeRequest struct {
Mapping *recordtoproto.RecordProtoMapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"`
WorkspacePath string `protobuf:"bytes,2,opt,name=workspace_path,json=workspacePath,proto3" json:"workspace_path,omitempty"`
ProtoDefinition *GenerateCodeRequest_ProtoDefinition `protobuf:"bytes,3,opt,name=proto_definition,json=protoDefinition,proto3" json:"proto_definition,omitempty"`
Converter *GenerateCodeRequest_Converter `protobuf:"bytes,4,opt,name=converter,proto3" json:"converter,omitempty"`
// contains filtered or unexported fields
}
func (*GenerateCodeRequest) Descriptor
deprecated
func (*GenerateCodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GenerateCodeRequest.ProtoReflect.Descriptor instead.
func (*GenerateCodeRequest) GetConverter ¶
func (x *GenerateCodeRequest) GetConverter() *GenerateCodeRequest_Converter
func (*GenerateCodeRequest) GetMapping ¶
func (x *GenerateCodeRequest) GetMapping() *recordtoproto.RecordProtoMapping
func (*GenerateCodeRequest) GetProtoDefinition ¶
func (x *GenerateCodeRequest) GetProtoDefinition() *GenerateCodeRequest_ProtoDefinition
func (*GenerateCodeRequest) GetWorkspacePath ¶
func (x *GenerateCodeRequest) GetWorkspacePath() string
func (*GenerateCodeRequest) ProtoMessage ¶
func (*GenerateCodeRequest) ProtoMessage()
func (*GenerateCodeRequest) ProtoReflect ¶
func (x *GenerateCodeRequest) ProtoReflect() protoreflect.Message
func (*GenerateCodeRequest) Reset ¶
func (x *GenerateCodeRequest) Reset()
func (*GenerateCodeRequest) String ¶
func (x *GenerateCodeRequest) String() string
type GenerateCodeRequest_Converter ¶
type GenerateCodeRequest_Converter struct {
Directory string `protobuf:"bytes,1,opt,name=directory,proto3" json:"directory,omitempty"`
GoFileName string `protobuf:"bytes,2,opt,name=go_file_name,json=goFileName,proto3" json:"go_file_name,omitempty"`
UpdateBuildRules bool `protobuf:"varint,3,opt,name=update_build_rules,json=updateBuildRules,proto3" json:"update_build_rules,omitempty"`
// contains filtered or unexported fields
}
func (*GenerateCodeRequest_Converter) Descriptor
deprecated
func (*GenerateCodeRequest_Converter) Descriptor() ([]byte, []int)
Deprecated: Use GenerateCodeRequest_Converter.ProtoReflect.Descriptor instead.
func (*GenerateCodeRequest_Converter) GetDirectory ¶
func (x *GenerateCodeRequest_Converter) GetDirectory() string
func (*GenerateCodeRequest_Converter) GetGoFileName ¶
func (x *GenerateCodeRequest_Converter) GetGoFileName() string
func (*GenerateCodeRequest_Converter) GetUpdateBuildRules ¶
func (x *GenerateCodeRequest_Converter) GetUpdateBuildRules() bool
func (*GenerateCodeRequest_Converter) ProtoMessage ¶
func (*GenerateCodeRequest_Converter) ProtoMessage()
func (*GenerateCodeRequest_Converter) ProtoReflect ¶
func (x *GenerateCodeRequest_Converter) ProtoReflect() protoreflect.Message
func (*GenerateCodeRequest_Converter) Reset ¶
func (x *GenerateCodeRequest_Converter) Reset()
func (*GenerateCodeRequest_Converter) String ¶
func (x *GenerateCodeRequest_Converter) String() string
type GenerateCodeRequest_ProtoDefinition ¶
type GenerateCodeRequest_ProtoDefinition struct {
Directory string `protobuf:"bytes,1,opt,name=directory,proto3" json:"directory,omitempty"`
ProtoFileName string `protobuf:"bytes,2,opt,name=proto_file_name,json=protoFileName,proto3" json:"proto_file_name,omitempty"`
UpdateBuildRules bool `protobuf:"varint,3,opt,name=update_build_rules,json=updateBuildRules,proto3" json:"update_build_rules,omitempty"`
// contains filtered or unexported fields
}
func (*GenerateCodeRequest_ProtoDefinition) Descriptor
deprecated
func (*GenerateCodeRequest_ProtoDefinition) Descriptor() ([]byte, []int)
Deprecated: Use GenerateCodeRequest_ProtoDefinition.ProtoReflect.Descriptor instead.
func (*GenerateCodeRequest_ProtoDefinition) GetDirectory ¶
func (x *GenerateCodeRequest_ProtoDefinition) GetDirectory() string
func (*GenerateCodeRequest_ProtoDefinition) GetProtoFileName ¶
func (x *GenerateCodeRequest_ProtoDefinition) GetProtoFileName() string
func (*GenerateCodeRequest_ProtoDefinition) GetUpdateBuildRules ¶
func (x *GenerateCodeRequest_ProtoDefinition) GetUpdateBuildRules() bool
func (*GenerateCodeRequest_ProtoDefinition) ProtoMessage ¶
func (*GenerateCodeRequest_ProtoDefinition) ProtoMessage()
func (*GenerateCodeRequest_ProtoDefinition) ProtoReflect ¶
func (x *GenerateCodeRequest_ProtoDefinition) ProtoReflect() protoreflect.Message
func (*GenerateCodeRequest_ProtoDefinition) Reset ¶
func (x *GenerateCodeRequest_ProtoDefinition) Reset()
func (*GenerateCodeRequest_ProtoDefinition) String ¶
func (x *GenerateCodeRequest_ProtoDefinition) String() string
type GenerateCodeResponse ¶
type GenerateCodeResponse struct {
ProtoFile *GenerateCodeResponse_File `protobuf:"bytes,1,opt,name=proto_file,json=protoFile,proto3" json:"proto_file,omitempty"`
ProtoBuildFile *GenerateCodeResponse_File `protobuf:"bytes,2,opt,name=proto_build_file,json=protoBuildFile,proto3" json:"proto_build_file,omitempty"`
ConverterGoFile *GenerateCodeResponse_File `protobuf:"bytes,3,opt,name=converter_go_file,json=converterGoFile,proto3" json:"converter_go_file,omitempty"`
ConverterBuildFile *GenerateCodeResponse_File `protobuf:"bytes,4,opt,name=converter_build_file,json=converterBuildFile,proto3" json:"converter_build_file,omitempty"`
// contains filtered or unexported fields
}
func (*GenerateCodeResponse) Descriptor
deprecated
func (*GenerateCodeResponse) Descriptor() ([]byte, []int)
Deprecated: Use GenerateCodeResponse.ProtoReflect.Descriptor instead.
func (*GenerateCodeResponse) GetConverterBuildFile ¶
func (x *GenerateCodeResponse) GetConverterBuildFile() *GenerateCodeResponse_File
func (*GenerateCodeResponse) GetConverterGoFile ¶
func (x *GenerateCodeResponse) GetConverterGoFile() *GenerateCodeResponse_File
func (*GenerateCodeResponse) GetProtoBuildFile ¶
func (x *GenerateCodeResponse) GetProtoBuildFile() *GenerateCodeResponse_File
func (*GenerateCodeResponse) GetProtoFile ¶
func (x *GenerateCodeResponse) GetProtoFile() *GenerateCodeResponse_File
func (*GenerateCodeResponse) ProtoMessage ¶
func (*GenerateCodeResponse) ProtoMessage()
func (*GenerateCodeResponse) ProtoReflect ¶
func (x *GenerateCodeResponse) ProtoReflect() protoreflect.Message
func (*GenerateCodeResponse) Reset ¶
func (x *GenerateCodeResponse) Reset()
func (*GenerateCodeResponse) String ¶
func (x *GenerateCodeResponse) String() string
type GenerateCodeResponse_File ¶
type GenerateCodeResponse_File struct {
WorkspaceRelativePath string `` /* 126-byte string literal not displayed */
NewContents []byte `protobuf:"bytes,2,opt,name=new_contents,json=newContents,proto3" json:"new_contents,omitempty"`
// contains filtered or unexported fields
}
func (*GenerateCodeResponse_File) Descriptor
deprecated
func (*GenerateCodeResponse_File) Descriptor() ([]byte, []int)
Deprecated: Use GenerateCodeResponse_File.ProtoReflect.Descriptor instead.
func (*GenerateCodeResponse_File) GetNewContents ¶
func (x *GenerateCodeResponse_File) GetNewContents() []byte
func (*GenerateCodeResponse_File) GetWorkspaceRelativePath ¶
func (x *GenerateCodeResponse_File) GetWorkspaceRelativePath() string
func (*GenerateCodeResponse_File) ProtoMessage ¶
func (*GenerateCodeResponse_File) ProtoMessage()
func (*GenerateCodeResponse_File) ProtoReflect ¶
func (x *GenerateCodeResponse_File) ProtoReflect() protoreflect.Message
func (*GenerateCodeResponse_File) Reset ¶
func (x *GenerateCodeResponse_File) Reset()
func (*GenerateCodeResponse_File) String ¶
func (x *GenerateCodeResponse_File) String() string
type InferRequest ¶
type InferRequest struct {
ExampleInputs []*InputFile `protobuf:"bytes,1,rep,name=example_inputs,json=exampleInputs,proto3" json:"example_inputs,omitempty"`
InputFormat Format `protobuf:"varint,2,opt,name=input_format,json=inputFormat,proto3,enum=xtoproto.Format" json:"input_format,omitempty"`
MessageName string `protobuf:"bytes,3,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
PackageName string `protobuf:"bytes,4,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
GoPackageName string `protobuf:"bytes,5,opt,name=go_package_name,json=goPackageName,proto3" json:"go_package_name,omitempty"`
GoProtoImport string `protobuf:"bytes,6,opt,name=go_proto_import,json=goProtoImport,proto3" json:"go_proto_import,omitempty"`
TimestampLocation string `protobuf:"bytes,7,opt,name=timestamp_location,json=timestampLocation,proto3" json:"timestamp_location,omitempty"`
// contains filtered or unexported fields
}
func (*InferRequest) Descriptor
deprecated
func (*InferRequest) Descriptor() ([]byte, []int)
Deprecated: Use InferRequest.ProtoReflect.Descriptor instead.
func (*InferRequest) GetExampleInputs ¶
func (x *InferRequest) GetExampleInputs() []*InputFile
func (*InferRequest) GetGoPackageName ¶
func (x *InferRequest) GetGoPackageName() string
func (*InferRequest) GetGoProtoImport ¶
func (x *InferRequest) GetGoProtoImport() string
func (*InferRequest) GetInputFormat ¶
func (x *InferRequest) GetInputFormat() Format
func (*InferRequest) GetMessageName ¶
func (x *InferRequest) GetMessageName() string
func (*InferRequest) GetPackageName ¶
func (x *InferRequest) GetPackageName() string
func (*InferRequest) GetTimestampLocation ¶
func (x *InferRequest) GetTimestampLocation() string
func (*InferRequest) ProtoMessage ¶
func (*InferRequest) ProtoMessage()
func (*InferRequest) ProtoReflect ¶
func (x *InferRequest) ProtoReflect() protoreflect.Message
func (*InferRequest) Reset ¶
func (x *InferRequest) Reset()
func (*InferRequest) String ¶
func (x *InferRequest) String() string
type InferResponse ¶
type InferResponse struct {
BestMappingCandidate *MappingSet `protobuf:"bytes,1,opt,name=best_mapping_candidate,json=bestMappingCandidate,proto3" json:"best_mapping_candidate,omitempty"`
// contains filtered or unexported fields
}
func (*InferResponse) Descriptor
deprecated
func (*InferResponse) Descriptor() ([]byte, []int)
Deprecated: Use InferResponse.ProtoReflect.Descriptor instead.
func (*InferResponse) GetBestMappingCandidate ¶
func (x *InferResponse) GetBestMappingCandidate() *MappingSet
func (*InferResponse) ProtoMessage ¶
func (*InferResponse) ProtoMessage()
func (*InferResponse) ProtoReflect ¶
func (x *InferResponse) ProtoReflect() protoreflect.Message
func (*InferResponse) Reset ¶
func (x *InferResponse) Reset()
func (*InferResponse) String ¶
func (x *InferResponse) String() string
type InputFile ¶
type InputFile struct {
// Types that are assignable to Spec:
// *InputFile_InputPath
// *InputFile_InputContent
Spec isInputFile_Spec `protobuf_oneof:"spec"`
// contains filtered or unexported fields
}
func (*InputFile) Descriptor
deprecated
func (*InputFile) GetInputContent ¶
func (*InputFile) GetInputPath ¶
func (*InputFile) ProtoMessage ¶
func (*InputFile) ProtoMessage()
func (*InputFile) ProtoReflect ¶
func (x *InputFile) ProtoReflect() protoreflect.Message
type InputFile_InputContent ¶
type InputFile_InputContent struct {
InputContent []byte `protobuf:"bytes,2,opt,name=input_content,json=inputContent,proto3,oneof"`
}
type InputFile_InputPath ¶
type InputFile_InputPath struct {
InputPath string `protobuf:"bytes,1,opt,name=input_path,json=inputPath,proto3,oneof"`
}
type MappingSet ¶
type MappingSet struct {
TopLevelMapping *recordtoproto.RecordProtoMapping `protobuf:"bytes,1,opt,name=top_level_mapping,json=topLevelMapping,proto3" json:"top_level_mapping,omitempty"`
AdditionalMappings []*recordtoproto.RecordProtoMapping `protobuf:"bytes,2,rep,name=additional_mappings,json=additionalMappings,proto3" json:"additional_mappings,omitempty"`
// contains filtered or unexported fields
}
func (*MappingSet) Descriptor
deprecated
func (*MappingSet) Descriptor() ([]byte, []int)
Deprecated: Use MappingSet.ProtoReflect.Descriptor instead.
func (*MappingSet) GetAdditionalMappings ¶
func (x *MappingSet) GetAdditionalMappings() []*recordtoproto.RecordProtoMapping
func (*MappingSet) GetTopLevelMapping ¶
func (x *MappingSet) GetTopLevelMapping() *recordtoproto.RecordProtoMapping
func (*MappingSet) ProtoMessage ¶
func (*MappingSet) ProtoMessage()
func (*MappingSet) ProtoReflect ¶
func (x *MappingSet) ProtoReflect() protoreflect.Message
func (*MappingSet) Reset ¶
func (x *MappingSet) Reset()
func (*MappingSet) String ¶
func (x *MappingSet) String() string
type UnimplementedXToProtoServiceServer ¶
type UnimplementedXToProtoServiceServer struct {
}
UnimplementedXToProtoServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedXToProtoServiceServer) GenerateCode ¶
func (*UnimplementedXToProtoServiceServer) GenerateCode(context.Context, *GenerateCodeRequest) (*GenerateCodeResponse, error)
func (*UnimplementedXToProtoServiceServer) Infer ¶
func (*UnimplementedXToProtoServiceServer) Infer(context.Context, *InferRequest) (*InferResponse, error)
type XToProtoServiceClient ¶
type XToProtoServiceClient interface {
Infer(ctx context.Context, in *InferRequest, opts ...grpc.CallOption) (*InferResponse, error)
GenerateCode(ctx context.Context, in *GenerateCodeRequest, opts ...grpc.CallOption) (*GenerateCodeResponse, error)
}
XToProtoServiceClient is the client API for XToProtoService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewXToProtoServiceClient ¶
func NewXToProtoServiceClient(cc grpc.ClientConnInterface) XToProtoServiceClient
type XToProtoServiceServer ¶
type XToProtoServiceServer interface {
Infer(context.Context, *InferRequest) (*InferResponse, error)
GenerateCode(context.Context, *GenerateCodeRequest) (*GenerateCodeResponse, error)
}
XToProtoServiceServer is the server API for XToProtoService service.