sourcegraph

package
v0.0.0-...-5288fb2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GraphQLURL = "https://sourcegraph.com/.api/graphql"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalHeaderTransport

type AdditionalHeaderTransport struct {
	T                 http.RoundTripper
	AdditionalHeaders map[string]string
}

func (*AdditionalHeaderTransport) RoundTrip

func (adt *AdditionalHeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Client

type Client interface {
	SearchFiles(query string) ([]FileSearchResult, error)
	GetFile(repository, path string, lines int) (File, error)
}

func NewClient

func NewClient(accessToken string) Client

type File

type File struct {
	Repository string
	Path       string
	Contents   string
	TotalLines int
	Size       int
}

type FileSearchResult

type FileSearchResult struct {
	Repository string
	Path       string
	TotalLines int
}

Jump to

Keyboard shortcuts

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