lint

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_lint_lint_proto protoreflect.FileDescriptor
View Source
var LintProto_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lint.LintProto",
	HandlerType: (*LintProtoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendLint",
			Handler:    _LintProto_SendLint_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "lint/lint.proto",
}

LintProto_ServiceDesc is the grpc.ServiceDesc for LintProto service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLintProtoServer

func RegisterLintProtoServer(s grpc.ServiceRegistrar, srv LintProtoServer)

Types

type Config

type Config struct {
	Lints []config.Lint
}

func DefaultConfig

func DefaultConfig() *Config

type Lint

type Lint interface {
	Run(context.Context, string, string, []string, func(*config.Filter, string, string) bool) ([]proto.Format, error)
}

func New

func New(cfg *Config) Lint

type LintProtoClient

type LintProtoClient interface {
	// Sends lint
	SendLint(ctx context.Context, in *LintRequest, opts ...grpc.CallOption) (*LintReply, error)
}

LintProtoClient is the client API for LintProto 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 NewLintProtoClient

func NewLintProtoClient(cc grpc.ClientConnInterface) LintProtoClient

type LintProtoServer

type LintProtoServer interface {
	// Sends lint
	SendLint(context.Context, *LintRequest) (*LintReply, error)
	// contains filtered or unexported methods
}

LintProtoServer is the server API for LintProto service. All implementations must embed UnimplementedLintProtoServer for forward compatibility

type LintReply

type LintReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The response message.

func (*LintReply) Descriptor deprecated

func (*LintReply) Descriptor() ([]byte, []int)

Deprecated: Use LintReply.ProtoReflect.Descriptor instead.

func (*LintReply) GetMessage

func (x *LintReply) GetMessage() string

func (*LintReply) ProtoMessage

func (*LintReply) ProtoMessage()

func (*LintReply) ProtoReflect

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

func (*LintReply) Reset

func (x *LintReply) Reset()

func (*LintReply) String

func (x *LintReply) String() string

type LintRequest

type LintRequest struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The request message.

func (*LintRequest) Descriptor deprecated

func (*LintRequest) Descriptor() ([]byte, []int)

Deprecated: Use LintRequest.ProtoReflect.Descriptor instead.

func (*LintRequest) GetMessage

func (x *LintRequest) GetMessage() string

func (*LintRequest) ProtoMessage

func (*LintRequest) ProtoMessage()

func (*LintRequest) ProtoReflect

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

func (*LintRequest) Reset

func (x *LintRequest) Reset()

func (*LintRequest) String

func (x *LintRequest) String() string

type UnimplementedLintProtoServer

type UnimplementedLintProtoServer struct {
}

UnimplementedLintProtoServer must be embedded to have forward compatible implementations.

func (UnimplementedLintProtoServer) SendLint

type UnsafeLintProtoServer

type UnsafeLintProtoServer interface {
	// contains filtered or unexported methods
}

UnsafeLintProtoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LintProtoServer will result in compilation errors.

Jump to

Keyboard shortcuts

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