proto

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetEnd

func (x *Location) GetEnd() *Position

func (*Location) GetStart

func (x *Location) GetStart() *Position

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

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

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

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

Deprecated: Use Position.ProtoReflect.Descriptor instead.

func (*Position) GetColumn

func (x *Position) GetColumn() uint32

func (*Position) GetLine

func (x *Position) GetLine() uint32

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) ProtoReflect

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

func (*Position) Reset

func (x *Position) Reset()

func (*Position) String

func (x *Position) String() string

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

Deprecated: Use RuleError.ProtoReflect.Descriptor instead.

func (*RuleError) GetLocation

func (x *RuleError) GetLocation() *Location

func (*RuleError) GetMetadata

func (x *RuleError) GetMetadata() map[string]string

func (*RuleError) GetRemediation

func (x *RuleError) GetRemediation() string

func (*RuleError) GetSuggestion

func (x *RuleError) GetSuggestion() string

func (*RuleError) ProtoMessage

func (*RuleError) ProtoMessage()

func (*RuleError) ProtoReflect

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

func (*RuleError) Reset

func (x *RuleError) Reset()

func (*RuleError) String

func (x *RuleError) String() string

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

Deprecated: Use RuleInfo.ProtoReflect.Descriptor instead.

func (*RuleInfo) GetEnabled

func (x *RuleInfo) GetEnabled() bool

func (*RuleInfo) GetError

func (x *RuleInfo) GetError() string
func (x *RuleInfo) GetLink() string

func (*RuleInfo) GetLong

func (x *RuleInfo) GetLong() string

func (*RuleInfo) GetName

func (x *RuleInfo) GetName() string

func (*RuleInfo) GetShort

func (x *RuleInfo) GetShort() string

func (*RuleInfo) ProtoMessage

func (*RuleInfo) ProtoMessage()

func (*RuleInfo) ProtoReflect

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

func (*RuleInfo) Reset

func (x *RuleInfo) Reset()

func (*RuleInfo) String

func (x *RuleInfo) String() string

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.

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

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.

Jump to

Keyboard shortcuts

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