grpc-gateway: Index | Files

package utilities

import ""

Package utilities provides members for internal use in grpc-gateway.


Package Files

doc.go pattern.go readerfactory.go trie.go


const (
    // OpNop does nothing
    OpNop = OpCode(iota)
    // OpPush pushes a component to stack
    // OpLitPush pushes a component to stack if it matches to the literal
    // OpPushM concatenates the remaining components and pushes it to stack
    // OpConcatN pops N items from stack, concatenates them and pushes it back to stack
    // OpCapture pops an item and binds it to the variable
    // OpEnd is the least positive invalid opcode.

These constants are the valid values of OpCode.

func IOReaderFactory Uses

func IOReaderFactory(r io.Reader) (func() io.Reader, error)

IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins at the start of the stream

type DoubleArray Uses

type DoubleArray struct {
    // Encoding keeps an encoding from string to int
    Encoding map[string]int
    // Base is the base array of Double Array
    Base []int
    // Check is the check array of Double Array
    Check []int

DoubleArray is a Double Array implementation of trie on sequences of strings.

func NewDoubleArray Uses

func NewDoubleArray(seqs [][]string) *DoubleArray

NewDoubleArray builds a DoubleArray from a set of sequences of strings.

func (*DoubleArray) HasCommonPrefix Uses

func (da *DoubleArray) HasCommonPrefix(seq []string) bool

HasCommonPrefix determines if any sequence in the DoubleArray is a prefix of the given sequence.

type OpCode Uses

type OpCode int

An OpCode is a opcode of compiled path patterns.

Package utilities imports 4 packages (graph) and is imported by 1076 packages. Updated 2018-11-23. Refresh now. Tools for package owners.