Documentation ¶
Index ¶
- Variables
- type Plugin
- type Server
- func (s *Server) Attributes(req *tfplugin.AttributesRequest, resp *tfplugin.AttributesResponse) error
- func (s *Server) Backend(req *tfplugin.BackendRequest, resp *tfplugin.BackendResponse) error
- func (s *Server) Blocks(req *tfplugin.BlocksRequest, resp *tfplugin.BlocksResponse) error
- func (s *Server) Config(req *tfplugin.ConfigRequest, resp *tfplugin.ConfigResponse) error
- func (s *Server) EmitIssue(req *tfplugin.EmitIssueRequest, resp *interface{}) error
- func (s *Server) EvalExpr(req *tfplugin.EvalExprRequest, resp *tfplugin.EvalExprResponse) error
- func (s *Server) EvalExprOnRootCtx(req *tfplugin.EvalExprRequest, resp *tfplugin.EvalExprResponse) error
- func (s *Server) File(req *tfplugin.FileRequest, resp *tfplugin.FileResponse) error
- func (s *Server) IsNullExpr(req *tfplugin.IsNullExprRequest, resp *tfplugin.IsNullExprResponse) error
- func (s *Server) ModuleCalls(req *tfplugin.ModuleCallsRequest, resp *tfplugin.ModuleCallsResponse) error
- func (s *Server) Resources(req *tfplugin.ResourcesRequest, resp *tfplugin.ResourcesResponse) error
- func (s *Server) RootProvider(req *tfplugin.RootProviderRequest, resp *tfplugin.RootProviderResponse) error
- func (s *Server) RuleConfig(req *tfplugin.RuleConfigRequest, resp *tfplugin.RuleConfigResponse) error
Constants ¶
This section is empty.
Variables ¶
var PluginRoot = "~/.tflint.d/plugins"
PluginRoot is the root directory of the plugins This variable is exposed for testing.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { RuleSets map[string]*tfplugin.Client // contains filtered or unexported fields }
Plugin is an object handling plugins Basically, it is a wrapper for go-plugin and provides an API to handle them collectively.
func Discovery ¶ added in v0.14.0
Discovery searches plugins according the passed configuration The search priority of plugins is as follows:
- Current directory (./.tflint.d/plugins)
- Home directory (~/.tflint.d/plugins)
Files under these directories that satisfy the "tflint-ruleset-*" naming rules enabled in the configuration are treated as plugins.
If the `TFLINT_PLUGIN_DIR` environment variable is set, ignore the above and refer to that directory.
type Server ¶ added in v0.14.0
type Server struct {
// contains filtered or unexported fields
}
Server is a RPC server for responding to requests from plugins
func (*Server) Attributes ¶ added in v0.14.0
func (s *Server) Attributes(req *tfplugin.AttributesRequest, resp *tfplugin.AttributesResponse) error
Attributes returns corresponding hcl.Attributes
func (*Server) Backend ¶ added in v0.18.0
func (s *Server) Backend(req *tfplugin.BackendRequest, resp *tfplugin.BackendResponse) error
Backend returns corresponding configs.Backend as tfplugin.Backend
func (*Server) Blocks ¶ added in v0.17.0
func (s *Server) Blocks(req *tfplugin.BlocksRequest, resp *tfplugin.BlocksResponse) error
Blocks returns corresponding hcl.Blocks
func (*Server) Config ¶ added in v0.20.0
func (s *Server) Config(req *tfplugin.ConfigRequest, resp *tfplugin.ConfigResponse) error
Config returns corresponding configs.Config as tfplugin.Config
func (*Server) EmitIssue ¶ added in v0.14.0
func (s *Server) EmitIssue(req *tfplugin.EmitIssueRequest, resp *interface{}) error
EmitIssue reflects a issue to the Runner
func (*Server) EvalExpr ¶ added in v0.14.0
func (s *Server) EvalExpr(req *tfplugin.EvalExprRequest, resp *tfplugin.EvalExprResponse) error
EvalExpr returns a value of the evaluated expression
func (*Server) EvalExprOnRootCtx ¶ added in v0.23.0
func (s *Server) EvalExprOnRootCtx(req *tfplugin.EvalExprRequest, resp *tfplugin.EvalExprResponse) error
EvalExprOnRootCtx returns a value of the evaluated expression on the context of the root module.
func (*Server) File ¶ added in v0.23.0
func (s *Server) File(req *tfplugin.FileRequest, resp *tfplugin.FileResponse) error
File returns the corresponding hcl.File object
func (*Server) IsNullExpr ¶ added in v0.23.0
func (s *Server) IsNullExpr(req *tfplugin.IsNullExprRequest, resp *tfplugin.IsNullExprResponse) error
IsNullExpr returns the result of determining whether the expression is null or not.
func (*Server) ModuleCalls ¶ added in v0.19.0
func (s *Server) ModuleCalls(req *tfplugin.ModuleCallsRequest, resp *tfplugin.ModuleCallsResponse) error
ModuleCalls returns all configs.ModuleCall as tfplugin.ModuleCall
func (*Server) Resources ¶ added in v0.17.0
func (s *Server) Resources(req *tfplugin.ResourcesRequest, resp *tfplugin.ResourcesResponse) error
Resources returns corresponding configs.Resource as tfplugin.Resource
func (*Server) RootProvider ¶ added in v0.23.0
func (s *Server) RootProvider(req *tfplugin.RootProviderRequest, resp *tfplugin.RootProviderResponse) error
RootProvider returns the provider configuration on the root module as tfplugin.Provider
func (*Server) RuleConfig ¶ added in v0.23.0
func (s *Server) RuleConfig(req *tfplugin.RuleConfigRequest, resp *tfplugin.RuleConfigResponse) error
RuleConfig returns an encoded HCL format rule config