protob

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MatchType_name = map[int32]string{
	0: "NONE",
	1: "CANONICAL",
	2: "CANONICAL_FULL",
	3: "VIRUS",
	4: "FUZZY",
	5: "PARTIAL",
	6: "PARTIAL_FUZZY",
}
View Source
var MatchType_value = map[string]int32{
	"NONE":           0,
	"CANONICAL":      1,
	"CANONICAL_FULL": 2,
	"VIRUS":          3,
	"FUZZY":          4,
	"PARTIAL":        5,
	"PARTIAL_FUZZY":  6,
}

Functions

func RegisterGNMatcherServer

func RegisterGNMatcherServer(s *grpc.Server, srv GNMatcherServer)

Types

type GNMatcherClient

type GNMatcherClient interface {
	Ping(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Pong, error)
	Ver(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Version, error)
	MatchAry(ctx context.Context, in *Names, opts ...grpc.CallOption) (*Output, error)
}

GNMatcherClient is the client API for GNMatcher service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGNMatcherClient

func NewGNMatcherClient(cc *grpc.ClientConn) GNMatcherClient

type GNMatcherServer

type GNMatcherServer interface {
	Ping(context.Context, *Void) (*Pong, error)
	Ver(context.Context, *Void) (*Version, error)
	MatchAry(context.Context, *Names) (*Output, error)
}

GNMatcherServer is the server API for GNMatcher service.

type MatchItem

type MatchItem struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	MatchStr             string   `protobuf:"bytes,2,opt,name=match_str,json=matchStr,proto3" json:"match_str,omitempty"`
	EditDistance         int32    `protobuf:"varint,3,opt,name=edit_distance,json=editDistance,proto3" json:"edit_distance,omitempty"`
	EditDistanceStem     int32    `protobuf:"varint,4,opt,name=edit_distance_stem,json=editDistanceStem,proto3" json:"edit_distance_stem,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MatchItem) Descriptor

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

func (*MatchItem) GetEditDistance

func (m *MatchItem) GetEditDistance() int32

func (*MatchItem) GetEditDistanceStem

func (m *MatchItem) GetEditDistanceStem() int32

func (*MatchItem) GetId

func (m *MatchItem) GetId() string

func (*MatchItem) GetMatchStr

func (m *MatchItem) GetMatchStr() string

func (*MatchItem) ProtoMessage

func (*MatchItem) ProtoMessage()

func (*MatchItem) Reset

func (m *MatchItem) Reset()

func (*MatchItem) String

func (m *MatchItem) String() string

func (*MatchItem) XXX_DiscardUnknown

func (m *MatchItem) XXX_DiscardUnknown()

func (*MatchItem) XXX_Marshal

func (m *MatchItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MatchItem) XXX_Merge

func (m *MatchItem) XXX_Merge(src proto.Message)

func (*MatchItem) XXX_Size

func (m *MatchItem) XXX_Size() int

func (*MatchItem) XXX_Unmarshal

func (m *MatchItem) XXX_Unmarshal(b []byte) error

type MatchType

type MatchType int32
const (
	MatchType_NONE           MatchType = 0
	MatchType_CANONICAL      MatchType = 1
	MatchType_CANONICAL_FULL MatchType = 2
	MatchType_VIRUS          MatchType = 3
	MatchType_FUZZY          MatchType = 4
	MatchType_PARTIAL        MatchType = 5
	MatchType_PARTIAL_FUZZY  MatchType = 6
)

func (MatchType) EnumDescriptor

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

func (MatchType) String

func (x MatchType) String() string

type Name

type Name struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Name) Descriptor

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

func (*Name) GetName

func (m *Name) GetName() string

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) Reset

func (m *Name) Reset()

func (*Name) String

func (m *Name) String() string

func (*Name) XXX_DiscardUnknown

func (m *Name) XXX_DiscardUnknown()

func (*Name) XXX_Marshal

func (m *Name) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Name) XXX_Merge

func (m *Name) XXX_Merge(src proto.Message)

func (*Name) XXX_Size

func (m *Name) XXX_Size() int

func (*Name) XXX_Unmarshal

func (m *Name) XXX_Unmarshal(b []byte) error

type Names

type Names struct {
	Names                []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Names) Descriptor

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

func (*Names) GetNames

func (m *Names) GetNames() []string

func (*Names) ProtoMessage

func (*Names) ProtoMessage()

func (*Names) Reset

func (m *Names) Reset()

func (*Names) String

func (m *Names) String() string

func (*Names) XXX_DiscardUnknown

func (m *Names) XXX_DiscardUnknown()

func (*Names) XXX_Marshal

func (m *Names) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Names) XXX_Merge

func (m *Names) XXX_Merge(src proto.Message)

func (*Names) XXX_Size

func (m *Names) XXX_Size() int

func (*Names) XXX_Unmarshal

func (m *Names) XXX_Unmarshal(b []byte) error

type Output

type Output struct {
	Results              []*Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Output) Descriptor

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

func (*Output) GetResults

func (m *Output) GetResults() []*Result

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) Reset

func (m *Output) Reset()

func (*Output) String

func (m *Output) String() string

func (*Output) XXX_DiscardUnknown

func (m *Output) XXX_DiscardUnknown()

func (*Output) XXX_Marshal

func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Output) XXX_Merge

func (m *Output) XXX_Merge(src proto.Message)

func (*Output) XXX_Size

func (m *Output) XXX_Size() int

func (*Output) XXX_Unmarshal

func (m *Output) XXX_Unmarshal(b []byte) error

type Pong

type Pong struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Pong) Descriptor

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

func (*Pong) GetValue

func (m *Pong) GetValue() string

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

func (*Pong) XXX_DiscardUnknown

func (m *Pong) XXX_DiscardUnknown()

func (*Pong) XXX_Marshal

func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pong) XXX_Merge

func (m *Pong) XXX_Merge(src proto.Message)

func (*Pong) XXX_Size

func (m *Pong) XXX_Size() int

func (*Pong) XXX_Unmarshal

func (m *Pong) XXX_Unmarshal(b []byte) error

type Result

type Result struct {
	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	MatchType            MatchType    `protobuf:"varint,3,opt,name=match_type,json=matchType,proto3,enum=protob.MatchType" json:"match_type,omitempty"`
	MatchData            []*MatchItem `protobuf:"bytes,4,rep,name=match_data,json=matchData,proto3" json:"match_data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Result) Descriptor

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

func (*Result) GetId

func (m *Result) GetId() string

func (*Result) GetMatchData

func (m *Result) GetMatchData() []*MatchItem

func (*Result) GetMatchType

func (m *Result) GetMatchType() MatchType

func (*Result) GetName

func (m *Result) GetName() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

func (*Result) XXX_DiscardUnknown

func (m *Result) XXX_DiscardUnknown()

func (*Result) XXX_Marshal

func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Result) XXX_Merge

func (m *Result) XXX_Merge(src proto.Message)

func (*Result) XXX_Size

func (m *Result) XXX_Size() int

func (*Result) XXX_Unmarshal

func (m *Result) XXX_Unmarshal(b []byte) error

type Version

type Version struct {
	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Build                string   `protobuf:"bytes,2,opt,name=build,proto3" json:"build,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Version) Descriptor

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

func (*Version) GetBuild

func (m *Version) GetBuild() string

func (*Version) GetVersion

func (m *Version) GetVersion() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) String

func (m *Version) String() string

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

type Void

type Void struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Void) Descriptor

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

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) Reset

func (m *Void) Reset()

func (*Void) String

func (m *Void) String() string

func (*Void) XXX_DiscardUnknown

func (m *Void) XXX_DiscardUnknown()

func (*Void) XXX_Marshal

func (m *Void) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Void) XXX_Merge

func (m *Void) XXX_Merge(src proto.Message)

func (*Void) XXX_Size

func (m *Void) XXX_Size() int

func (*Void) XXX_Unmarshal

func (m *Void) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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