resource

package
v0.0.0-...-01c0eb4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Requests is a map of each Request resource accesseble by it's name.
	Requests = RequestMap{}
)

Functions

func SearchRequests

func SearchRequests(query string) []string

Search searches through the loaded resources to see if there is a match for the given query string. This will in turn call searchRequestVariants to find the variants for that resource.

TODO: Ideally we should not be running this so often as we are (currently on each keypress to CmdBar in DefaultMode for default UI). These return values should be stored somewhere so they can be quickly accessed without having to keep searching through each request and each of it's variants.

Also we might not want to conflate retuning each variant for each request in what's named SearchRequests.

Types

type FilePath

type FilePath string

FilePath represents a given filepath for a resource

func (FilePath) Load

func (fp FilePath) Load() error

Load attempts to load a given resource file and create a new resource based on the 'kind' specefied within the config.

type FilePaths

type FilePaths []FilePath

FilePaths represents multiple filepaths.

type RequestMap

type RequestMap map[string]request.Request

RequestMap represents a list of all requests associated by name with a string.

func (RequestMap) String

func (rm RequestMap) String() string

String returns a list of all requests using the request map, along with any variants that exist within the request spec.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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