Documentation ¶
Index ¶
- func APIHandlerFunc(rp RequestProcessFunc) http.HandlerFunc
- func Export(db service.SQLDB) http.HandlerFunc
- type RequestProcessFunc
- func DetectLanguage() RequestProcessFunc
- func Filter() RequestProcessFunc
- func GetLanguages(bbblfshServerURL string) RequestProcessFunc
- func Parse(bbblfshServerURL string) RequestProcessFunc
- func Query(db service.SQLDB) RequestProcessFunc
- func Schema(db service.SQLDB) RequestProcessFunc
- func Version(version, bbblfshServerURL string, db service.SQLDB) RequestProcessFunc
- type Static
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIHandlerFunc ¶
func APIHandlerFunc(rp RequestProcessFunc) http.HandlerFunc
APIHandlerFunc returns an http.HandlerFunc that will serve the user request taking the serializer.Response and errors from the passed RequestProcessFunc
Types ¶
type RequestProcessFunc ¶
type RequestProcessFunc func(*http.Request) (*serializer.Response, error)
RequestProcessFunc is a function that takes an http.Request, and returns a serializer.Response and an error
func DetectLanguage ¶ added in v0.0.7
func DetectLanguage() RequestProcessFunc
DetectLanguage returns a function that detects language by filename and content
func Filter ¶
func Filter() RequestProcessFunc
Filter returns a function that filters UAST protobuf and returns UAST JSON
func GetLanguages ¶ added in v0.0.7
func GetLanguages(bbblfshServerURL string) RequestProcessFunc
GetLanguages returns a list of supported languages by bblfsh
func Parse ¶
func Parse(bbblfshServerURL string) RequestProcessFunc
Parse returns a function that parses text contents using bblfsh and returns UAST
func Query ¶
func Query(db service.SQLDB) RequestProcessFunc
Query returns a function that forwards an SQL query to gitbase and returns the rows as JSON
func Schema ¶ added in v0.0.3
func Schema(db service.SQLDB) RequestProcessFunc
Schema returns DB schema