Documentation
¶
Overview ¶
Package toproto contains an implementation to encode a Go structure into a structure generated from *.proto. This package is not intended to be used directly from plugins.
Many primitives can be handled as-is, but some interfaces and errors require special encoding. The `hcl.Expression` encodes into the range and the text representation as bytes. Error is encoded into gRPC error details to represent wrapped errors.
Index ¶
- func BodyContent(body *hclext.BodyContent, sources map[string][]byte) *proto.BodyContent
- func BodySchema(body *hclext.BodySchema) *proto.BodySchema
- func Config(config *tflint.Config) *proto.ApplyGlobalConfig_Config
- func Error(code codes.Code, err error) error
- func GetModuleContentHint(hint tflint.GetModuleContentHint) *proto.GetModuleContent_Hint
- func GetModuleContentOption(opts *tflint.GetModuleContentOption) *proto.GetModuleContent_Option
- func ModuleCtxType(ty tflint.ModuleCtxType) proto.ModuleCtxType
- func Pos(pos hcl.Pos) *proto.Range_Pos
- func Range(rng hcl.Range) *proto.Range
- func Rule(rule tflint.Rule) *proto.EmitIssue_Rule
- func Severity(severity tflint.Severity) proto.EmitIssue_Severity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyContent ¶
func BodyContent(body *hclext.BodyContent, sources map[string][]byte) *proto.BodyContent
BodyContent converts schema.BodyContent to proto.BodyContent
func BodySchema ¶
func BodySchema(body *hclext.BodySchema) *proto.BodySchema
BodySchema converts schema.BodySchema to proto.BodySchema
func Config ¶
func Config(config *tflint.Config) *proto.ApplyGlobalConfig_Config
Config converts tflint.Config to proto.ApplyGlobalConfig_Config
func GetModuleContentHint ¶
func GetModuleContentHint(hint tflint.GetModuleContentHint) *proto.GetModuleContent_Hint
GetModuleContentHint converts tflint.GetModuleContentHint to proto.GetModuleContentHint
func GetModuleContentOption ¶
func GetModuleContentOption(opts *tflint.GetModuleContentOption) *proto.GetModuleContent_Option
GetModuleContentOption converts tflint.GetModuleContentOption to proto.GetModuleContent_Option
func ModuleCtxType ¶
func ModuleCtxType(ty tflint.ModuleCtxType) proto.ModuleCtxType
ModuleCtxType converts tflint.ModuleCtxType to proto.ModuleCtxType
Types ¶
This section is empty.