pb

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Searcher_name = map[int32]string{
		0: "none",
		1: "rg",
		2: "ug",
		3: "ag",
	}
	Searcher_value = map[string]int32{
		"none": 0,
		"rg":   1,
		"ug":   2,
		"ag":   3,
	}
)

Enum value maps for Searcher.

View Source
var File_pb_ack_proto protoreflect.FileDescriptor
View Source
var File_pb_config_proto protoreflect.FileDescriptor
View Source
var File_pb_hit_proto protoreflect.FileDescriptor
View Source
var File_pb_mate_proto protoreflect.FileDescriptor
View Source
var File_pb_query_proto protoreflect.FileDescriptor
View Source
var File_pb_result_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Ack

type Ack struct {
	File  string  `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	Mates []*Mate `protobuf:"bytes,2,rep,name=mates,proto3" json:"mates,omitempty"`
	// contains filtered or unexported fields
}

Ack 格式.

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetFile

func (x *Ack) GetFile() string

func (*Ack) GetMates

func (x *Ack) GetMates() []*Mate

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type Config

type Config struct {
	Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Paths 被选目录.
	Dirs []string `protobuf:"bytes,2,rep,name=dirs,proto3" json:"dirs,omitempty"`
	// contains filtered or unexported fields
}

Config 配置.

func NewConfig

func NewConfig() *Config

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDirs

func (x *Config) GetDirs() []string

func (*Config) GetQuery

func (x *Config) GetQuery() *Query

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) Save

func (p *Config) Save()

func (*Config) String

func (x *Config) String() string

type Hit

type Hit struct {
	Col uint32 `protobuf:"varint,1,opt,name=col,proto3" json:"col,omitempty"`
	Len uint32 `protobuf:"varint,2,opt,name=len,proto3" json:"len,omitempty"`
	// contains filtered or unexported fields
}

Hit.

func (*Hit) Ack

func (p *Hit) Ack() string

func (*Hit) Descriptor deprecated

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

Deprecated: Use Hit.ProtoReflect.Descriptor instead.

func (*Hit) GetCol

func (x *Hit) GetCol() uint32

func (*Hit) GetLen

func (x *Hit) GetLen() uint32

func (*Hit) ProtoMessage

func (*Hit) ProtoMessage()

func (*Hit) ProtoReflect

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

func (*Hit) Reset

func (x *Hit) Reset()

func (*Hit) String

func (x *Hit) String() string

type Mate

type Mate struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	Row  uint32 `protobuf:"varint,2,opt,name=row,proto3" json:"row,omitempty"`
	Hits []*Hit `protobuf:"bytes,3,rep,name=hits,proto3" json:"hits,omitempty"`
	// contains filtered or unexported fields
}

Mate ackmate.

func (*Mate) Ack

func (p *Mate) Ack() string

func (*Mate) Descriptor deprecated

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

Deprecated: Use Mate.ProtoReflect.Descriptor instead.

func (*Mate) GetHits

func (x *Mate) GetHits() []*Hit

func (*Mate) GetRow

func (x *Mate) GetRow() uint32

func (*Mate) GetText

func (x *Mate) GetText() string

func (*Mate) ProtoMessage

func (*Mate) ProtoMessage()

func (*Mate) ProtoReflect

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

func (*Mate) Reset

func (x *Mate) Reset()

func (*Mate) String

func (x *Mate) String() string

type Query

type Query struct {
	Pattern  string   `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
	MaxCount uint32   `protobuf:"varint,2,opt,name=maxCount,proto3" json:"maxCount,omitempty"`
	Searcher Searcher `protobuf:"varint,3,opt,name=searcher,proto3,enum=pb.Searcher" json:"searcher,omitempty"`
	Paths    []string `protobuf:"bytes,4,rep,name=paths,proto3" json:"paths,omitempty"`
	RgTypes  []string `protobuf:"bytes,5,rep,name=rgTypes,proto3" json:"rgTypes,omitempty"`
	AgTypes  []string `protobuf:"bytes,6,rep,name=agTypes,proto3" json:"agTypes,omitempty"`
	UgTypes  []string `protobuf:"bytes,7,rep,name=ugTypes,proto3" json:"ugTypes,omitempty"`
	GrepType string   `protobuf:"bytes,8,opt,name=grepType,proto3" json:"grepType,omitempty"`
	// contains filtered or unexported fields
}

Query .

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetAgTypes

func (x *Query) GetAgTypes() []string

func (*Query) GetGrepType

func (x *Query) GetGrepType() string

func (*Query) GetMaxCount

func (x *Query) GetMaxCount() uint32

func (*Query) GetPaths

func (x *Query) GetPaths() []string

func (*Query) GetPattern

func (x *Query) GetPattern() string

func (*Query) GetRgTypes

func (x *Query) GetRgTypes() []string

func (*Query) GetSearcher

func (x *Query) GetSearcher() Searcher

func (*Query) GetUgTypes

func (x *Query) GetUgTypes() []string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type Result

type Result struct {
	Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Acks  []*Ack `protobuf:"bytes,2,rep,name=acks,proto3" json:"acks,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetAcks

func (x *Result) GetAcks() []*Ack

func (*Result) GetQuery

func (x *Result) GetQuery() *Query

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type Searcher

type Searcher int32
const (
	Searcher_none Searcher = 0
	Searcher_rg   Searcher = 1
	Searcher_ug   Searcher = 2
	Searcher_ag   Searcher = 3
)

func (Searcher) Descriptor

func (Searcher) Descriptor() protoreflect.EnumDescriptor

func (Searcher) Enum

func (x Searcher) Enum() *Searcher

func (Searcher) EnumDescriptor deprecated

func (Searcher) EnumDescriptor() ([]byte, []int)

Deprecated: Use Searcher.Descriptor instead.

func (Searcher) Number

func (x Searcher) Number() protoreflect.EnumNumber

func (Searcher) String

func (x Searcher) String() string

func (Searcher) Type

Jump to

Keyboard shortcuts

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