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) Setup ¶
func (r *Router) Setup(rg *gin.RouterGroup)
Setup sets up r and intializes its routes under rg.
Click to show internal directories.
Click to hide internal directories.