urisearch

package
v8.46.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICache

type APICache struct {
	ID       string
	External bool
	// contains filtered or unexported fields
}

APICache represents an API cache.

func NewAPICache

func NewAPICache(rules []*policy.HTTPRule, id string, external bool) *APICache

NewAPICache creates a new API cache

func (*APICache) Find

func (c *APICache) Find(verb, uri string) (bool, interface{})

Find finds a URI in the cache and returns true and the data if found. If not found it returns false.

type APIStore

type APIStore struct {
	Scopes     map[string][]string
	RegEx      *regexp.Regexp
	RegExNames []string
}

APIStore is a database of API rules.

func NewAPIStore

func NewAPIStore(rules []*policy.HTTPRule) (*APIStore, error)

NewAPIStore creates a database of API rules based on the provided list.

func (*APIStore) Find

func (a *APIStore) Find(verb, api string) ([]string, error)

Find finds an API call in the database.

Jump to

Keyboard shortcuts

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