Documentation
¶
Index ¶
- Variables
- func RegisterLoaderServer(s grpc.ServiceRegistrar, srv LoaderServer)
- func RegisterMapperServer(s grpc.ServiceRegistrar, srv MapperServer)
- type Diagnostic
- func (*Diagnostic) Descriptor() ([]byte, []int)deprecated
- func (x *Diagnostic) GetContext() *Range
- func (x *Diagnostic) GetDetail() string
- func (x *Diagnostic) GetSeverity() DiagnosticSeverity
- func (x *Diagnostic) GetSubject() *Range
- func (x *Diagnostic) GetSummary() string
- func (*Diagnostic) ProtoMessage()
- func (x *Diagnostic) ProtoReflect() protoreflect.Message
- func (x *Diagnostic) Reset()
- func (x *Diagnostic) String() string
- type DiagnosticSeverity
- func (DiagnosticSeverity) Descriptor() protoreflect.EnumDescriptor
- func (x DiagnosticSeverity) Enum() *DiagnosticSeverity
- func (DiagnosticSeverity) EnumDescriptor() ([]byte, []int)deprecated
- func (x DiagnosticSeverity) Number() protoreflect.EnumNumber
- func (x DiagnosticSeverity) String() string
- func (DiagnosticSeverity) Type() protoreflect.EnumType
- type GetMappingRequest
- func (*GetMappingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMappingRequest) GetCodeinfraProvider() string
- func (x *GetMappingRequest) GetProvider() string
- func (*GetMappingRequest) ProtoMessage()
- func (x *GetMappingRequest) ProtoReflect() protoreflect.Message
- func (x *GetMappingRequest) Reset()
- func (x *GetMappingRequest) String() string
- type GetMappingResponse
- func (*GetMappingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMappingResponse) GetData() []byte
- func (*GetMappingResponse) ProtoMessage()
- func (x *GetMappingResponse) ProtoReflect() protoreflect.Message
- func (x *GetMappingResponse) Reset()
- func (x *GetMappingResponse) String() string
- type GetSchemaRequest
- func (*GetSchemaRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSchemaRequest) GetDownloadUrl() string
- func (x *GetSchemaRequest) GetPackage() string
- func (x *GetSchemaRequest) GetParameterization() *Parameterization
- func (x *GetSchemaRequest) GetVersion() string
- func (*GetSchemaRequest) ProtoMessage()
- func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message
- func (x *GetSchemaRequest) Reset()
- func (x *GetSchemaRequest) String() string
- type GetSchemaResponse
- type LoaderClient
- type LoaderServer
- type MapperClient
- type MapperServer
- type Parameterization
- func (*Parameterization) Descriptor() ([]byte, []int)deprecated
- func (x *Parameterization) GetName() string
- func (x *Parameterization) GetValue() []byte
- func (x *Parameterization) GetVersion() string
- func (*Parameterization) ProtoMessage()
- func (x *Parameterization) ProtoReflect() protoreflect.Message
- func (x *Parameterization) Reset()
- func (x *Parameterization) String() string
- type Pos
- type Range
- type UnimplementedLoaderServer
- type UnimplementedMapperServer
- type UnsafeLoaderServer
- type UnsafeMapperServer
Constants ¶
This section is empty.
Variables ¶
var ( DiagnosticSeverity_name = map[int32]string{ 0: "DIAG_INVALID", 1: "DIAG_ERROR", 2: "DIAG_WARNING", } DiagnosticSeverity_value = map[string]int32{ "DIAG_INVALID": 0, "DIAG_ERROR": 1, "DIAG_WARNING": 2, } )
Enum value maps for DiagnosticSeverity.
var File_codeinfra_codegen_hcl_proto protoreflect.FileDescriptor
var File_codeinfra_codegen_loader_proto protoreflect.FileDescriptor
var File_codeinfra_codegen_mapper_proto protoreflect.FileDescriptor
var Loader_ServiceDesc = grpc.ServiceDesc{ ServiceName: "codegen.Loader", HandlerType: (*LoaderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSchema", Handler: _Loader_GetSchema_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "codeinfra/codegen/loader.proto", }
Loader_ServiceDesc is the grpc.ServiceDesc for Loader service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Mapper_ServiceDesc = grpc.ServiceDesc{ ServiceName: "codegen.Mapper", HandlerType: (*MapperServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMapping", Handler: _Mapper_GetMapping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "codeinfra/codegen/mapper.proto", }
Mapper_ServiceDesc is the grpc.ServiceDesc for Mapper service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLoaderServer ¶
func RegisterLoaderServer(s grpc.ServiceRegistrar, srv LoaderServer)
func RegisterMapperServer ¶
func RegisterMapperServer(s grpc.ServiceRegistrar, srv MapperServer)
Types ¶
type Diagnostic ¶
type Diagnostic struct { Severity DiagnosticSeverity `protobuf:"varint,1,opt,name=severity,proto3,enum=codeinfrarpc.codegen.DiagnosticSeverity" json:"severity,omitempty"` // Summary and Detail contain the English-language description of the // problem. Summary is a terse description of the general problem and // detail is a more elaborate, often-multi-sentence description of // the problem and what might be done to solve it. Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` // Subject and Context are both source ranges relating to the diagnostic. // // Subject is a tight range referring to exactly the construct that // is problematic, while Context is an optional broader range (which should // fully contain Subject) that ought to be shown around Subject when // generating isolated source-code snippets in diagnostic messages. // If Context is nil, the Subject is also the Context. // // Some diagnostics have no source ranges at all. If Context is set then // Subject should always also be set. Subject *Range `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` Context *Range `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` // contains filtered or unexported fields }
Diagnostic represents information to be presented to a user about an error or anomaly in parsing or evaluating configuration.
func (*Diagnostic) Descriptor
deprecated
func (*Diagnostic) Descriptor() ([]byte, []int)
Deprecated: Use Diagnostic.ProtoReflect.Descriptor instead.
func (*Diagnostic) GetContext ¶
func (x *Diagnostic) GetContext() *Range
func (*Diagnostic) GetDetail ¶
func (x *Diagnostic) GetDetail() string
func (*Diagnostic) GetSeverity ¶
func (x *Diagnostic) GetSeverity() DiagnosticSeverity
func (*Diagnostic) GetSubject ¶
func (x *Diagnostic) GetSubject() *Range
func (*Diagnostic) GetSummary ¶
func (x *Diagnostic) GetSummary() string
func (*Diagnostic) ProtoMessage ¶
func (*Diagnostic) ProtoMessage()
func (*Diagnostic) ProtoReflect ¶
func (x *Diagnostic) ProtoReflect() protoreflect.Message
func (*Diagnostic) Reset ¶
func (x *Diagnostic) Reset()
func (*Diagnostic) String ¶
func (x *Diagnostic) String() string
type DiagnosticSeverity ¶
type DiagnosticSeverity int32
DiagnosticSeverity is the severity level of a diagnostic message.
const ( // DIAG_INVALID is the invalid zero value of DiagnosticSeverity DiagnosticSeverity_DIAG_INVALID DiagnosticSeverity = 0 // DIAG_ERROR indicates that the problem reported by a diagnostic prevents // further progress in parsing and/or evaluating the subject. DiagnosticSeverity_DIAG_ERROR DiagnosticSeverity = 1 // DIAG_WARNING indicates that the problem reported by a diagnostic warrants // user attention but does not prevent further progress. It is most // commonly used for showing deprecation notices. DiagnosticSeverity_DIAG_WARNING DiagnosticSeverity = 2 )
func (DiagnosticSeverity) Descriptor ¶
func (DiagnosticSeverity) Descriptor() protoreflect.EnumDescriptor
func (DiagnosticSeverity) Enum ¶
func (x DiagnosticSeverity) Enum() *DiagnosticSeverity
func (DiagnosticSeverity) EnumDescriptor
deprecated
func (DiagnosticSeverity) EnumDescriptor() ([]byte, []int)
Deprecated: Use DiagnosticSeverity.Descriptor instead.
func (DiagnosticSeverity) Number ¶
func (x DiagnosticSeverity) Number() protoreflect.EnumNumber
func (DiagnosticSeverity) String ¶
func (x DiagnosticSeverity) String() string
func (DiagnosticSeverity) Type ¶
func (DiagnosticSeverity) Type() protoreflect.EnumType
type GetMappingRequest ¶
type GetMappingRequest struct { // the provider name for the mapping being requested. Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` // the expected name of the codeinfra provider that maps to the requested provider. Defaults to the same as 'provider'. CodeinfraProvider string `protobuf:"bytes,2,opt,name=codeinfra_provider,json=codeinfraProvider,proto3" json:"codeinfra_provider,omitempty"` // contains filtered or unexported fields }
GetMappingRequest allows the engine to return ecosystem specific information to allow the converter to be convert provider types from a source markup to Codeinfra.
func (*GetMappingRequest) Descriptor
deprecated
func (*GetMappingRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMappingRequest.ProtoReflect.Descriptor instead.
func (*GetMappingRequest) GetCodeinfraProvider ¶
func (x *GetMappingRequest) GetCodeinfraProvider() string
func (*GetMappingRequest) GetProvider ¶
func (x *GetMappingRequest) GetProvider() string
func (*GetMappingRequest) ProtoMessage ¶
func (*GetMappingRequest) ProtoMessage()
func (*GetMappingRequest) ProtoReflect ¶
func (x *GetMappingRequest) ProtoReflect() protoreflect.Message
func (*GetMappingRequest) Reset ¶
func (x *GetMappingRequest) Reset()
func (*GetMappingRequest) String ¶
func (x *GetMappingRequest) String() string
type GetMappingResponse ¶
type GetMappingResponse struct { // the conversion plugin specific data (if any) Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
GetMappingResponse returns converter plugin specific data for the requested provider. This will normally be human readable JSON, but the engine doesn't mandate any form.
func (*GetMappingResponse) Descriptor
deprecated
func (*GetMappingResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMappingResponse.ProtoReflect.Descriptor instead.
func (*GetMappingResponse) GetData ¶
func (x *GetMappingResponse) GetData() []byte
func (*GetMappingResponse) ProtoMessage ¶
func (*GetMappingResponse) ProtoMessage()
func (*GetMappingResponse) ProtoReflect ¶
func (x *GetMappingResponse) ProtoReflect() protoreflect.Message
func (*GetMappingResponse) Reset ¶
func (x *GetMappingResponse) Reset()
func (*GetMappingResponse) String ¶
func (x *GetMappingResponse) String() string
type GetSchemaRequest ¶
type GetSchemaRequest struct { // the package name for the schema being requested. Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` // the version for the schema being requested, must be a valid semver or empty. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // the optional download url for the schema being requested. DownloadUrl string `protobuf:"bytes,3,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // the parameterization for the schema being requested, can be empty. Parameterization *Parameterization `protobuf:"bytes,4,opt,name=parameterization,proto3" json:"parameterization,omitempty"` // contains filtered or unexported fields }
GetSchemaRequest allows the engine to return a schema for a given package and version.
func (*GetSchemaRequest) Descriptor
deprecated
func (*GetSchemaRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead.
func (*GetSchemaRequest) GetDownloadUrl ¶
func (x *GetSchemaRequest) GetDownloadUrl() string
func (*GetSchemaRequest) GetPackage ¶
func (x *GetSchemaRequest) GetPackage() string
func (*GetSchemaRequest) GetParameterization ¶
func (x *GetSchemaRequest) GetParameterization() *Parameterization
func (*GetSchemaRequest) GetVersion ¶
func (x *GetSchemaRequest) GetVersion() string
func (*GetSchemaRequest) ProtoMessage ¶
func (*GetSchemaRequest) ProtoMessage()
func (*GetSchemaRequest) ProtoReflect ¶
func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message
func (*GetSchemaRequest) Reset ¶
func (x *GetSchemaRequest) Reset()
func (*GetSchemaRequest) String ¶
func (x *GetSchemaRequest) String() string
type GetSchemaResponse ¶
type GetSchemaResponse struct { // the JSON encoded schema. Schema []byte `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // contains filtered or unexported fields }
GetSchemaResponse returns the schema data for the requested package.
func (*GetSchemaResponse) Descriptor
deprecated
func (*GetSchemaResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead.
func (*GetSchemaResponse) GetSchema ¶
func (x *GetSchemaResponse) GetSchema() []byte
func (*GetSchemaResponse) ProtoMessage ¶
func (*GetSchemaResponse) ProtoMessage()
func (*GetSchemaResponse) ProtoReflect ¶
func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message
func (*GetSchemaResponse) Reset ¶
func (x *GetSchemaResponse) Reset()
func (*GetSchemaResponse) String ¶
func (x *GetSchemaResponse) String() string
type LoaderClient ¶
type LoaderClient interface { // GetSchema tries to find a schema for the given package and version. GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) }
LoaderClient is the client API for Loader service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewLoaderClient ¶
func NewLoaderClient(cc grpc.ClientConnInterface) LoaderClient
type LoaderServer ¶
type LoaderServer interface { // GetSchema tries to find a schema for the given package and version. GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) // contains filtered or unexported methods }
LoaderServer is the server API for Loader service. All implementations must embed UnimplementedLoaderServer for forward compatibility
type MapperClient ¶
type MapperClient interface { // GetMapping tries to find a mapping for the given provider. GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) }
MapperClient is the client API for Mapper service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMapperClient ¶
func NewMapperClient(cc grpc.ClientConnInterface) MapperClient
type MapperServer ¶
type MapperServer interface { // GetMapping tries to find a mapping for the given provider. GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) // contains filtered or unexported methods }
MapperServer is the server API for Mapper service. All implementations must embed UnimplementedMapperServer for forward compatibility
type Parameterization ¶
type Parameterization struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the parameterized package name. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // the parameterized package version. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // the parameter value for the parameterized package. // contains filtered or unexported fields }
Parameterization specifies the name, version, and value for a parameterized package.
func (*Parameterization) Descriptor
deprecated
func (*Parameterization) Descriptor() ([]byte, []int)
Deprecated: Use Parameterization.ProtoReflect.Descriptor instead.
func (*Parameterization) GetName ¶
func (x *Parameterization) GetName() string
func (*Parameterization) GetValue ¶
func (x *Parameterization) GetValue() []byte
func (*Parameterization) GetVersion ¶
func (x *Parameterization) GetVersion() string
func (*Parameterization) ProtoMessage ¶
func (*Parameterization) ProtoMessage()
func (*Parameterization) ProtoReflect ¶
func (x *Parameterization) ProtoReflect() protoreflect.Message
func (*Parameterization) Reset ¶
func (x *Parameterization) Reset()
func (*Parameterization) String ¶
func (x *Parameterization) String() string
type Pos ¶
type Pos struct { // Line is the source code line where this position points. Lines are counted starting at 1 and // incremented for each newline character encountered. Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` // Column is the source code column where this position points, in unicode characters, with counting // starting at 1. // // Column counts characters as they appear visually, so for example a latin letter with a combining // diacritic mark counts as one character. This is intended for rendering visual markers against source // code in contexts where these diacritics would be rendered in a single character cell. Technically // speaking, Column is counting grapheme clusters as used in unicode normalization. Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` // Byte is the byte offset into the file where the indicated character begins. This is a zero-based offset // to the first byte of the first UTF-8 codepoint sequence in the character, and thus gives a position // that can be resolved _without_ awareness of Unicode characters. Byte int64 `protobuf:"varint,3,opt,name=byte,proto3" json:"byte,omitempty"` // contains filtered or unexported fields }
Pos represents a single position in a source file, by addressing the start byte of a unicode character encoded in UTF-8.
func (*Pos) Descriptor
deprecated
func (*Pos) ProtoMessage ¶
func (*Pos) ProtoMessage()
func (*Pos) ProtoReflect ¶
func (x *Pos) ProtoReflect() protoreflect.Message
type Range ¶
type Range struct { // Filename is the name of the file into which this range's positions point. Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // Start and End represent the bounds of this range. Start is inclusive and End is exclusive. Start *Pos `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` End *Pos `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
Range represents a span of characters between two positions in a source file.
func (*Range) Descriptor
deprecated
func (*Range) GetFilename ¶
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) ProtoReflect ¶
func (x *Range) ProtoReflect() protoreflect.Message
type UnimplementedLoaderServer ¶
type UnimplementedLoaderServer struct { }
UnimplementedLoaderServer must be embedded to have forward compatible implementations.
func (UnimplementedLoaderServer) GetSchema ¶
func (UnimplementedLoaderServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
type UnimplementedMapperServer ¶
type UnimplementedMapperServer struct { }
UnimplementedMapperServer must be embedded to have forward compatible implementations.
func (UnimplementedMapperServer) GetMapping ¶
func (UnimplementedMapperServer) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error)
type UnsafeLoaderServer ¶
type UnsafeLoaderServer interface {
// contains filtered or unexported methods
}
UnsafeLoaderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoaderServer will result in compilation errors.
type UnsafeMapperServer ¶
type UnsafeMapperServer interface {
// contains filtered or unexported methods
}
UnsafeMapperServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MapperServer will result in compilation errors.