search

package
v0.0.0-...-cda7898 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package search is used to handle all search-service related operations. Handling is implemented with a HTTP router returned from NewRouter and setup its routes using Setup.

Index

Constants

View Source
const (
	// SearchTermQueryKey is the query key for search request.
	SearchTermQueryKey = "q"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is a structure that handles upload requests.

func NewRouter

func NewRouter(
	searchConn *grpcPoolTypes.ConnPool,
	fileConn *grpcPoolTypes.ConnPool,
	permissionConn *grpcPoolTypes.ConnPool,
	logger *logrus.Logger,
) *Router

NewRouter creates a new Router, and initializes clients of search Service and File Service with the given connections. If logger is non-nil then it will be set as-is, otherwise logger would default to logrus.New().

func (*Router) Search

func (r *Router) Search(c *gin.Context)

Search is the request handler for /upload request.

func (*Router) Setup

func (r *Router) Setup(rg *gin.RouterGroup)

Setup sets up r and intializes its routes under rg.

Jump to

Keyboard shortcuts

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