Documentation ¶
Index ¶
- Variables
- func RegisterTfvetRulePluginServer(s grpc.ServiceRegistrar, srv TfvetRulePluginServer)
- type ExecuteRuleRequest
- func (*ExecuteRuleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRuleRequest) GetHclFile() []byte
- func (*ExecuteRuleRequest) ProtoMessage()
- func (x *ExecuteRuleRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRuleRequest) Reset()
- func (x *ExecuteRuleRequest) String() string
- type ExecuteRuleResponse
- func (*ExecuteRuleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRuleResponse) GetErrors() []*RuleError
- func (*ExecuteRuleResponse) ProtoMessage()
- func (x *ExecuteRuleResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteRuleResponse) Reset()
- func (x *ExecuteRuleResponse) String() string
- type GetRuleInfoRequest
- type GetRuleInfoResponse
- func (*GetRuleInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetRuleInfoResponse) GetRuleInfo() *RuleInfo
- func (*GetRuleInfoResponse) ProtoMessage()
- func (x *GetRuleInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetRuleInfoResponse) Reset()
- func (x *GetRuleInfoResponse) String() string
- type Location
- type Position
- type RuleError
- func (*RuleError) Descriptor() ([]byte, []int)deprecated
- func (x *RuleError) GetLocation() *Location
- func (x *RuleError) GetMetadata() map[string]string
- func (x *RuleError) GetRemediation() string
- func (x *RuleError) GetSuggestion() string
- func (*RuleError) ProtoMessage()
- func (x *RuleError) ProtoReflect() protoreflect.Message
- func (x *RuleError) Reset()
- func (x *RuleError) String() string
- type RuleInfo
- func (*RuleInfo) Descriptor() ([]byte, []int)deprecated
- func (x *RuleInfo) GetEnabled() bool
- func (x *RuleInfo) GetError() string
- func (x *RuleInfo) GetLink() string
- func (x *RuleInfo) GetLong() string
- func (x *RuleInfo) GetName() string
- func (x *RuleInfo) GetShort() string
- func (*RuleInfo) ProtoMessage()
- func (x *RuleInfo) ProtoReflect() protoreflect.Message
- func (x *RuleInfo) Reset()
- func (x *RuleInfo) String() string
- type TfvetRulePluginClient
- type TfvetRulePluginServer
- type UnimplementedTfvetRulePluginServer
- type UnsafeTfvetRulePluginServer
Constants ¶
This section is empty.
Variables ¶
var File_internal_plugin_proto_rule_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTfvetRulePluginServer ¶
func RegisterTfvetRulePluginServer(s grpc.ServiceRegistrar, srv TfvetRulePluginServer)
Types ¶
type ExecuteRuleRequest ¶
type ExecuteRuleRequest struct { HclFile []byte `protobuf:"bytes,1,opt,name=hcl_file,json=hclFile,proto3" json:"hcl_file,omitempty"` // contains filtered or unexported fields }
ExecuteRuleRequest passes the byte string representation of an HCL file body. It can be turned back into an hclwrite.File.Body object on reception.
Expected back is a list of errors (if any) for the file passed to the plugin.
func (*ExecuteRuleRequest) Descriptor
deprecated
func (*ExecuteRuleRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRuleRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRuleRequest) GetHclFile ¶
func (x *ExecuteRuleRequest) GetHclFile() []byte
func (*ExecuteRuleRequest) ProtoMessage ¶
func (*ExecuteRuleRequest) ProtoMessage()
func (*ExecuteRuleRequest) ProtoReflect ¶
func (x *ExecuteRuleRequest) ProtoReflect() protoreflect.Message
func (*ExecuteRuleRequest) Reset ¶
func (x *ExecuteRuleRequest) Reset()
func (*ExecuteRuleRequest) String ¶
func (x *ExecuteRuleRequest) String() string
type ExecuteRuleResponse ¶
type ExecuteRuleResponse struct { Errors []*RuleError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*ExecuteRuleResponse) Descriptor
deprecated
func (*ExecuteRuleResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRuleResponse.ProtoReflect.Descriptor instead.
func (*ExecuteRuleResponse) GetErrors ¶
func (x *ExecuteRuleResponse) GetErrors() []*RuleError
func (*ExecuteRuleResponse) ProtoMessage ¶
func (*ExecuteRuleResponse) ProtoMessage()
func (*ExecuteRuleResponse) ProtoReflect ¶
func (x *ExecuteRuleResponse) ProtoReflect() protoreflect.Message
func (*ExecuteRuleResponse) Reset ¶
func (x *ExecuteRuleResponse) Reset()
func (*ExecuteRuleResponse) String ¶
func (x *ExecuteRuleResponse) String() string
type GetRuleInfoRequest ¶
type GetRuleInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetRuleInfoRequest) Descriptor
deprecated
func (*GetRuleInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRuleInfoRequest.ProtoReflect.Descriptor instead.
func (*GetRuleInfoRequest) ProtoMessage ¶
func (*GetRuleInfoRequest) ProtoMessage()
func (*GetRuleInfoRequest) ProtoReflect ¶
func (x *GetRuleInfoRequest) ProtoReflect() protoreflect.Message
func (*GetRuleInfoRequest) Reset ¶
func (x *GetRuleInfoRequest) Reset()
func (*GetRuleInfoRequest) String ¶
func (x *GetRuleInfoRequest) String() string
type GetRuleInfoResponse ¶
type GetRuleInfoResponse struct { RuleInfo *RuleInfo `protobuf:"bytes,1,opt,name=rule_info,json=ruleInfo,proto3" json:"rule_info,omitempty"` // contains filtered or unexported fields }
func (*GetRuleInfoResponse) Descriptor
deprecated
func (*GetRuleInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetRuleInfoResponse.ProtoReflect.Descriptor instead.
func (*GetRuleInfoResponse) GetRuleInfo ¶
func (x *GetRuleInfoResponse) GetRuleInfo() *RuleInfo
func (*GetRuleInfoResponse) ProtoMessage ¶
func (*GetRuleInfoResponse) ProtoMessage()
func (*GetRuleInfoResponse) ProtoReflect ¶
func (x *GetRuleInfoResponse) ProtoReflect() protoreflect.Message
func (*GetRuleInfoResponse) Reset ¶
func (x *GetRuleInfoResponse) Reset()
func (*GetRuleInfoResponse) String ¶
func (x *GetRuleInfoResponse) String() string
type Location ¶
type Location struct { Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
func (*Location) Descriptor
deprecated
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Position ¶
type Position struct { Line uint32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` // contains filtered or unexported fields }
func (*Position) Descriptor
deprecated
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type RuleError ¶
type RuleError struct { // a description of possible remediation for error Suggestion string `protobuf:"bytes,1,opt,name=suggestion,proto3" json:"suggestion,omitempty"` Remediation string `protobuf:"bytes,2,opt,name=remediation,proto3" json:"remediation,omitempty"` // program code for possible remediation Location *Location `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` // start and end range of where error occurred // metadata is a key value store that allows the rule to include extra data, // that can be used by any tooling consuming said rule. For example "severity" // might be something included in metadata. Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RuleError) Descriptor
deprecated
func (*RuleError) GetLocation ¶
func (*RuleError) GetMetadata ¶
func (*RuleError) GetRemediation ¶
func (*RuleError) GetSuggestion ¶
func (*RuleError) ProtoMessage ¶
func (*RuleError) ProtoMessage()
func (*RuleError) ProtoReflect ¶
func (x *RuleError) ProtoReflect() protoreflect.Message
type RuleInfo ¶
type RuleInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Short string `protobuf:"bytes,2,opt,name=short,proto3" json:"short,omitempty"` Long string `protobuf:"bytes,3,opt,name=long,proto3" json:"long,omitempty"` Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"` Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` // short description on what the error is Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` // link to further documentation // contains filtered or unexported fields }
RuleInfo is a representation of the data that governs a single linting rule.
func (*RuleInfo) Descriptor
deprecated
func (*RuleInfo) GetEnabled ¶
func (*RuleInfo) ProtoMessage ¶
func (*RuleInfo) ProtoMessage()
func (*RuleInfo) ProtoReflect ¶
func (x *RuleInfo) ProtoReflect() protoreflect.Message
type TfvetRulePluginClient ¶
type TfvetRulePluginClient interface { GetRuleInfo(ctx context.Context, in *GetRuleInfoRequest, opts ...grpc.CallOption) (*GetRuleInfoResponse, error) ExecuteRule(ctx context.Context, in *ExecuteRuleRequest, opts ...grpc.CallOption) (*ExecuteRuleResponse, error) }
TfvetRulePluginClient is the client API for TfvetRulePlugin 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 NewTfvetRulePluginClient ¶
func NewTfvetRulePluginClient(cc grpc.ClientConnInterface) TfvetRulePluginClient
type TfvetRulePluginServer ¶
type TfvetRulePluginServer interface { GetRuleInfo(context.Context, *GetRuleInfoRequest) (*GetRuleInfoResponse, error) ExecuteRule(context.Context, *ExecuteRuleRequest) (*ExecuteRuleResponse, error) // contains filtered or unexported methods }
TfvetRulePluginServer is the server API for TfvetRulePlugin service. All implementations must embed UnimplementedTfvetRulePluginServer for forward compatibility
type UnimplementedTfvetRulePluginServer ¶
type UnimplementedTfvetRulePluginServer struct { }
UnimplementedTfvetRulePluginServer must be embedded to have forward compatible implementations.
func (UnimplementedTfvetRulePluginServer) ExecuteRule ¶
func (UnimplementedTfvetRulePluginServer) ExecuteRule(context.Context, *ExecuteRuleRequest) (*ExecuteRuleResponse, error)
func (UnimplementedTfvetRulePluginServer) GetRuleInfo ¶
func (UnimplementedTfvetRulePluginServer) GetRuleInfo(context.Context, *GetRuleInfoRequest) (*GetRuleInfoResponse, error)
type UnsafeTfvetRulePluginServer ¶
type UnsafeTfvetRulePluginServer interface {
// contains filtered or unexported methods
}
UnsafeTfvetRulePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TfvetRulePluginServer will result in compilation errors.