service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrParseBlob is returned when the blob can't be parsed with bblfsh.
	ErrParseBlob = errors.NewKind("unable to parse the given blob using bblfsh: %s")

	// ErrUnmarshalUAST is returned when an error arises unmarshaling UASTs.
	ErrUnmarshalUAST = errors.NewKind("error unmarshaling UAST: %s")

	// ErrMarshalUAST is returned when an error arises marshaling UASTs.
	ErrMarshalUAST = errors.NewKind("error marshaling uast node: %s")
)

Functions

func NewLogger

func NewLogger(env string) *logrus.Logger

NewLogger returns a logrus Logger

Types

type Language added in v0.0.7

type Language struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func DriverManifestsToLangs added in v0.0.7

func DriverManifestsToLangs(drivers []protocol.DriverManifest) []Language

type Node added in v0.0.7

type Node uast.Node

func UnmarshalUAST added in v0.1.5

func UnmarshalUAST(data []byte) ([]*Node, error)

UnmarshalUAST returns UAST nodes from data marshaled by gitbase

func UnmarshalUASTOld added in v0.1.5

func UnmarshalUASTOld(data interface{}) ([]*Node, error)

UnmarshalUASTOld tries to cast data as [][]byte and unmarshall uast node. This is the format returned by gitbase <= v0.16.0

func (*Node) MarshalJSON added in v0.0.7

func (n *Node) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation of the Node

type ParseResponse added in v0.0.7

type ParseResponse protocol.ParseResponse

ParseResponse amends default MarshalJSON to be compatible with frontend

func (*ParseResponse) MarshalJSON added in v0.0.7

func (r *ParseResponse) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation of the protocol.ParseResponse

type SQLDB

type SQLDB interface {
	Close() error
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	Ping() error
	Exec(query string, args ...interface{}) (sql.Result, error)
}

SQLDB describes a *sql.DB

Jump to

Keyboard shortcuts

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