Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRuleSetServiceServer(s grpc.ServiceRegistrar, srv RuleSetServiceServer)
- type ApplyRequest
- func (*ApplyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyRequest) GetId() string
- func (x *ApplyRequest) GetPath() string
- func (*ApplyRequest) ProtoMessage()
- func (x *ApplyRequest) ProtoReflect() protoreflect.Message
- func (x *ApplyRequest) Reset()
- func (x *ApplyRequest) String() string
- type ApplyResponse
- type ApplyResponse_Failure
- func (*ApplyResponse_Failure) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyResponse_Failure) GetMessage() string
- func (x *ApplyResponse_Failure) GetPos() *ApplyResponse_Position
- func (*ApplyResponse_Failure) ProtoMessage()
- func (x *ApplyResponse_Failure) ProtoReflect() protoreflect.Message
- func (x *ApplyResponse_Failure) Reset()
- func (x *ApplyResponse_Failure) String() string
- type ApplyResponse_Position
- func (*ApplyResponse_Position) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyResponse_Position) GetColumn() int32
- func (x *ApplyResponse_Position) GetLine() int32
- func (x *ApplyResponse_Position) GetOffset() int32
- func (*ApplyResponse_Position) ProtoMessage()
- func (x *ApplyResponse_Position) ProtoReflect() protoreflect.Message
- func (x *ApplyResponse_Position) Reset()
- func (x *ApplyResponse_Position) String() string
- type ListRulesRequest
- func (*ListRulesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRulesRequest) GetFixMode() bool
- func (x *ListRulesRequest) GetVerbose() bool
- func (*ListRulesRequest) ProtoMessage()
- func (x *ListRulesRequest) ProtoReflect() protoreflect.Message
- func (x *ListRulesRequest) Reset()
- func (x *ListRulesRequest) String() string
- type ListRulesResponse
- func (*ListRulesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListRulesResponse) GetRules() []*ListRulesResponse_Rule
- func (*ListRulesResponse) ProtoMessage()
- func (x *ListRulesResponse) ProtoReflect() protoreflect.Message
- func (x *ListRulesResponse) Reset()
- func (x *ListRulesResponse) String() string
- type ListRulesResponse_Rule
- func (*ListRulesResponse_Rule) Descriptor() ([]byte, []int)deprecated
- func (x *ListRulesResponse_Rule) GetId() string
- func (x *ListRulesResponse_Rule) GetPurpose() string
- func (x *ListRulesResponse_Rule) GetSeverity() RuleSeverity
- func (*ListRulesResponse_Rule) ProtoMessage()
- func (x *ListRulesResponse_Rule) ProtoReflect() protoreflect.Message
- func (x *ListRulesResponse_Rule) Reset()
- func (x *ListRulesResponse_Rule) String() string
- type RuleSetServiceClient
- type RuleSetServiceServer
- type RuleSeverity
- func (RuleSeverity) Descriptor() protoreflect.EnumDescriptor
- func (x RuleSeverity) Enum() *RuleSeverity
- func (RuleSeverity) EnumDescriptor() ([]byte, []int)deprecated
- func (x RuleSeverity) Number() protoreflect.EnumNumber
- func (x RuleSeverity) String() string
- func (RuleSeverity) Type() protoreflect.EnumType
- type UnimplementedRuleSetServiceServer
- type UnsafeRuleSetServiceServer
Constants ¶
const ( RuleSetService_ListRules_FullMethodName = "/proto.RuleSetService/ListRules" RuleSetService_Apply_FullMethodName = "/proto.RuleSetService/Apply" )
Variables ¶
var ( RuleSeverity_name = map[int32]string{ 0: "RULE_SEVERITY_UNSPECIFIED", 1: "RULE_SEVERITY_NOTE", 2: "RULE_SEVERITY_WARNING", 3: "RULE_SEVERITY_ERROR", } RuleSeverity_value = map[string]int32{ "RULE_SEVERITY_UNSPECIFIED": 0, "RULE_SEVERITY_NOTE": 1, "RULE_SEVERITY_WARNING": 2, "RULE_SEVERITY_ERROR": 3, } )
Enum value maps for RuleSeverity.
var File_plugin_proto protoreflect.FileDescriptor
var RuleSetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.RuleSetService", HandlerType: (*RuleSetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListRules", Handler: _RuleSetService_ListRules_Handler, }, { MethodName: "Apply", Handler: _RuleSetService_Apply_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
RuleSetService_ServiceDesc is the grpc.ServiceDesc for RuleSetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRuleSetServiceServer ¶
func RegisterRuleSetServiceServer(s grpc.ServiceRegistrar, srv RuleSetServiceServer)
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*ApplyRequest) Descriptor
deprecated
func (*ApplyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead.
func (*ApplyRequest) GetId ¶
func (x *ApplyRequest) GetId() string
func (*ApplyRequest) GetPath ¶
func (x *ApplyRequest) GetPath() string
func (*ApplyRequest) ProtoMessage ¶
func (*ApplyRequest) ProtoMessage()
func (*ApplyRequest) ProtoReflect ¶ added in v0.45.0
func (x *ApplyRequest) ProtoReflect() protoreflect.Message
func (*ApplyRequest) Reset ¶
func (x *ApplyRequest) Reset()
func (*ApplyRequest) String ¶
func (x *ApplyRequest) String() string
type ApplyResponse ¶
type ApplyResponse struct { Failures []*ApplyResponse_Failure `protobuf:"bytes,1,rep,name=failures,proto3" json:"failures,omitempty"` // contains filtered or unexported fields }
func (*ApplyResponse) Descriptor
deprecated
func (*ApplyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead.
func (*ApplyResponse) GetFailures ¶
func (x *ApplyResponse) GetFailures() []*ApplyResponse_Failure
func (*ApplyResponse) ProtoMessage ¶
func (*ApplyResponse) ProtoMessage()
func (*ApplyResponse) ProtoReflect ¶ added in v0.45.0
func (x *ApplyResponse) ProtoReflect() protoreflect.Message
func (*ApplyResponse) Reset ¶
func (x *ApplyResponse) Reset()
func (*ApplyResponse) String ¶
func (x *ApplyResponse) String() string
type ApplyResponse_Failure ¶
type ApplyResponse_Failure struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Pos *ApplyResponse_Position `protobuf:"bytes,2,opt,name=pos,proto3" json:"pos,omitempty"` // contains filtered or unexported fields }
func (*ApplyResponse_Failure) Descriptor
deprecated
func (*ApplyResponse_Failure) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResponse_Failure.ProtoReflect.Descriptor instead.
func (*ApplyResponse_Failure) GetMessage ¶
func (x *ApplyResponse_Failure) GetMessage() string
func (*ApplyResponse_Failure) GetPos ¶
func (x *ApplyResponse_Failure) GetPos() *ApplyResponse_Position
func (*ApplyResponse_Failure) ProtoMessage ¶
func (*ApplyResponse_Failure) ProtoMessage()
func (*ApplyResponse_Failure) ProtoReflect ¶ added in v0.45.0
func (x *ApplyResponse_Failure) ProtoReflect() protoreflect.Message
func (*ApplyResponse_Failure) Reset ¶
func (x *ApplyResponse_Failure) Reset()
func (*ApplyResponse_Failure) String ¶
func (x *ApplyResponse_Failure) String() string
type ApplyResponse_Position ¶
type ApplyResponse_Position struct { Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` Column int32 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` // contains filtered or unexported fields }
func (*ApplyResponse_Position) Descriptor
deprecated
func (*ApplyResponse_Position) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResponse_Position.ProtoReflect.Descriptor instead.
func (*ApplyResponse_Position) GetColumn ¶
func (x *ApplyResponse_Position) GetColumn() int32
func (*ApplyResponse_Position) GetLine ¶
func (x *ApplyResponse_Position) GetLine() int32
func (*ApplyResponse_Position) GetOffset ¶
func (x *ApplyResponse_Position) GetOffset() int32
func (*ApplyResponse_Position) ProtoMessage ¶
func (*ApplyResponse_Position) ProtoMessage()
func (*ApplyResponse_Position) ProtoReflect ¶ added in v0.45.0
func (x *ApplyResponse_Position) ProtoReflect() protoreflect.Message
func (*ApplyResponse_Position) Reset ¶
func (x *ApplyResponse_Position) Reset()
func (*ApplyResponse_Position) String ¶
func (x *ApplyResponse_Position) String() string
type ListRulesRequest ¶
type ListRulesRequest struct { Verbose bool `protobuf:"varint,1,opt,name=verbose,proto3" json:"verbose,omitempty"` FixMode bool `protobuf:"varint,2,opt,name=fix_mode,json=fixMode,proto3" json:"fix_mode,omitempty"` // contains filtered or unexported fields }
func (*ListRulesRequest) Descriptor
deprecated
func (*ListRulesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRulesRequest.ProtoReflect.Descriptor instead.
func (*ListRulesRequest) GetFixMode ¶
func (x *ListRulesRequest) GetFixMode() bool
func (*ListRulesRequest) GetVerbose ¶
func (x *ListRulesRequest) GetVerbose() bool
func (*ListRulesRequest) ProtoMessage ¶
func (*ListRulesRequest) ProtoMessage()
func (*ListRulesRequest) ProtoReflect ¶ added in v0.45.0
func (x *ListRulesRequest) ProtoReflect() protoreflect.Message
func (*ListRulesRequest) Reset ¶
func (x *ListRulesRequest) Reset()
func (*ListRulesRequest) String ¶
func (x *ListRulesRequest) String() string
type ListRulesResponse ¶
type ListRulesResponse struct { Rules []*ListRulesResponse_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
func (*ListRulesResponse) Descriptor
deprecated
func (*ListRulesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListRulesResponse.ProtoReflect.Descriptor instead.
func (*ListRulesResponse) GetRules ¶
func (x *ListRulesResponse) GetRules() []*ListRulesResponse_Rule
func (*ListRulesResponse) ProtoMessage ¶
func (*ListRulesResponse) ProtoMessage()
func (*ListRulesResponse) ProtoReflect ¶ added in v0.45.0
func (x *ListRulesResponse) ProtoReflect() protoreflect.Message
func (*ListRulesResponse) Reset ¶
func (x *ListRulesResponse) Reset()
func (*ListRulesResponse) String ¶
func (x *ListRulesResponse) String() string
type ListRulesResponse_Rule ¶
type ListRulesResponse_Rule struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Purpose string `protobuf:"bytes,2,opt,name=purpose,proto3" json:"purpose,omitempty"` Severity RuleSeverity `protobuf:"varint,3,opt,name=severity,proto3,enum=proto.RuleSeverity" json:"severity,omitempty"` // contains filtered or unexported fields }
func (*ListRulesResponse_Rule) Descriptor
deprecated
func (*ListRulesResponse_Rule) Descriptor() ([]byte, []int)
Deprecated: Use ListRulesResponse_Rule.ProtoReflect.Descriptor instead.
func (*ListRulesResponse_Rule) GetId ¶
func (x *ListRulesResponse_Rule) GetId() string
func (*ListRulesResponse_Rule) GetPurpose ¶
func (x *ListRulesResponse_Rule) GetPurpose() string
func (*ListRulesResponse_Rule) GetSeverity ¶ added in v0.45.0
func (x *ListRulesResponse_Rule) GetSeverity() RuleSeverity
func (*ListRulesResponse_Rule) ProtoMessage ¶
func (*ListRulesResponse_Rule) ProtoMessage()
func (*ListRulesResponse_Rule) ProtoReflect ¶ added in v0.45.0
func (x *ListRulesResponse_Rule) ProtoReflect() protoreflect.Message
func (*ListRulesResponse_Rule) Reset ¶
func (x *ListRulesResponse_Rule) Reset()
func (*ListRulesResponse_Rule) String ¶
func (x *ListRulesResponse_Rule) String() string
type RuleSetServiceClient ¶
type RuleSetServiceClient interface { ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*ListRulesResponse, error) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) }
RuleSetServiceClient is the client API for RuleSetService 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 NewRuleSetServiceClient ¶
func NewRuleSetServiceClient(cc grpc.ClientConnInterface) RuleSetServiceClient
type RuleSetServiceServer ¶
type RuleSetServiceServer interface { ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) // contains filtered or unexported methods }
RuleSetServiceServer is the server API for RuleSetService service. All implementations must embed UnimplementedRuleSetServiceServer for forward compatibility
type RuleSeverity ¶ added in v0.45.0
type RuleSeverity int32
const ( RuleSeverity_RULE_SEVERITY_UNSPECIFIED RuleSeverity = 0 RuleSeverity_RULE_SEVERITY_NOTE RuleSeverity = 1 RuleSeverity_RULE_SEVERITY_WARNING RuleSeverity = 2 RuleSeverity_RULE_SEVERITY_ERROR RuleSeverity = 3 )
func (RuleSeverity) Descriptor ¶ added in v0.45.0
func (RuleSeverity) Descriptor() protoreflect.EnumDescriptor
func (RuleSeverity) Enum ¶ added in v0.45.0
func (x RuleSeverity) Enum() *RuleSeverity
func (RuleSeverity) EnumDescriptor
deprecated
added in
v0.45.0
func (RuleSeverity) EnumDescriptor() ([]byte, []int)
Deprecated: Use RuleSeverity.Descriptor instead.
func (RuleSeverity) Number ¶ added in v0.45.0
func (x RuleSeverity) Number() protoreflect.EnumNumber
func (RuleSeverity) String ¶ added in v0.45.0
func (x RuleSeverity) String() string
func (RuleSeverity) Type ¶ added in v0.45.0
func (RuleSeverity) Type() protoreflect.EnumType
type UnimplementedRuleSetServiceServer ¶ added in v0.45.0
type UnimplementedRuleSetServiceServer struct { }
UnimplementedRuleSetServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRuleSetServiceServer) Apply ¶ added in v0.45.0
func (UnimplementedRuleSetServiceServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
func (UnimplementedRuleSetServiceServer) ListRules ¶ added in v0.45.0
func (UnimplementedRuleSetServiceServer) ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error)
type UnsafeRuleSetServiceServer ¶ added in v0.45.0
type UnsafeRuleSetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRuleSetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RuleSetServiceServer will result in compilation errors.