search

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Search(context.Context, string, int) ([]project.Backend, error)
}

Backend is the minimal interface for a search backend.

type BackendConfig

type BackendConfig struct {
	// AuthMethod is indicates the method, if one, to be used for authentication
	// by the retrieval backend.
	AuthMethod string

	// SearchMethod is the method of search to be used to find projects.
	SearchMethod Method

	// Client is the http client to be used to connect to the search service.
	Client *http.Client

	// Config is for optional or secondary configuration.
	Config map[string]string
}

BackendConfig contains the configuration parameters for a search backend.

type Factory

type Factory func(context.Context, *BackendConfig) (Backend, error)

Factory is a factory function for constructing a search backend.

type Method

type Method = uint32

Method is the method of search to be used to find projects.

const (
	// Project is a search method for explicitly searching for projects
	// (e.g., by name, etc.).
	Project Method = iota
	// Code is a search method for searching through code to identify projects
	// that meet the code search criteria (e.g., projects written in a language,
	// or that have a specific file or tests, etc.).
	Code
	// Meta is a search method for searching through project meta information
	// (e.g., GitHub topics, GitHub pull requests, etc.).
	Meta
	// Version is a search method for searching through the revision history
	// of a project (e.g., Git commits, GitHub pull requests, etc.).
	Version
)

Jump to

Keyboard shortcuts

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