service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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
const (
	Format_UNSPECIFIED_FORMAT Format = 0
	Format_CSV                Format = 1
)

func (Format) Descriptor

func (Format) Descriptor() protoreflect.EnumDescriptor

func (Format) Enum

func (x Format) Enum() *Format

func (Format) EnumDescriptor deprecated

func (Format) EnumDescriptor() ([]byte, []int)

Deprecated: Use Format.Descriptor instead.

func (Format) Number

func (x Format) Number() protoreflect.EnumNumber

func (Format) String

func (x Format) String() string

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 (*GenerateCodeRequest) GetMapping

func (*GenerateCodeRequest) GetProtoDefinition

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 (*GenerateCodeRequest_Converter) Reset

func (x *GenerateCodeRequest_Converter) Reset()

func (*GenerateCodeRequest_Converter) 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 (*GenerateCodeRequest_ProtoDefinition) Reset

func (*GenerateCodeRequest_ProtoDefinition) 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 (*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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use InputFile.ProtoReflect.Descriptor instead.

func (*InputFile) GetInputContent

func (x *InputFile) GetInputContent() []byte

func (*InputFile) GetInputPath

func (x *InputFile) GetInputPath() string

func (*InputFile) GetSpec

func (m *InputFile) GetSpec() isInputFile_Spec

func (*InputFile) ProtoMessage

func (*InputFile) ProtoMessage()

func (*InputFile) ProtoReflect

func (x *InputFile) ProtoReflect() protoreflect.Message

func (*InputFile) Reset

func (x *InputFile) Reset()

func (*InputFile) String

func (x *InputFile) String() string

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) Infer

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.

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.

Jump to

Keyboard shortcuts

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