sourcegraph

package
v0.0.0-...-cf05d5b Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package sourcegraph is a generated protocol buffer package.

It is generated from these files:

sourcegraph.proto

It has these top-level messages:

Badge
CombinedStatus
Counter
ListOptions
ListResponse
StreamResponse
Discussion
DiscussionComment
Changeset
ChangesetReview
ChangesetEvent
InlineComment
Readme
GitHubRepo
RepoConfig
Repo
BadgeList
CounterList
RepoBadgesCountHitsOp
RepoBadgesCountHitsResult
RepoListOptions
RepoPermissions
RepoRevSpec
RepoSpec
RepoStatus
RepoStatusesCreateOp
RepoList
StorageError
StorageName
StorageReadOp
StorageRead
StorageWriteOp
StorageWrite
StorageFileInfo
StorageStat
StorageReadDir
ReposCreateOp
ReposUpdateOp
ReposListCommitsOp
RepoListCommitsOptions
CommitList
ReposListBranchesOp
RepoListBranchesOptions
BranchList
ReposListTagsOp
ReposListCommittersOp
RepoListCommittersOptions
CommitterList
ChangesetCreateOp
ChangesetCreateReviewOp
ChangesetListReviewsOp
ChangesetSpec
ChangesetUpdateOp
ChangesetMergeOp
ChangesetUpdateAffectedOp
DiscussionSpec
DiscussionListOp
DiscussionCommentCreateOp
DiscussionRatingUpdateOp
RepoListTagsOptions
TagList
MirrorReposRefreshVCSOp
VCSCredentials
MirroredRepoSSHKeysCreateOp
SSHPrivateKey
Build
BuildConfig
BuildCreateOptions
BuildGetLogOptions
BuildListOptions
ChangesetListOp
BuildSpec
BuildTask
BuildTaskListOptions
BuildUpdate
BuildsGetRepoBuildInfoOptions
BuildsGetRepoBuildInfoOp
BuildList
BuildsCreateOp
BuildsUpdateOp
BuildsListBuildTasksOp
BuildTaskList
ChangesetReviewList
ChangesetList
ChangesetEventList
DiscussionList
BuildsCreateTasksOp
BuildsUpdateTaskOp
BuildsGetLogOp
BuildsGetTaskLogOp
BuildsDequeueNextOp
EmailAddr
LogEntries
Org
OrgListMembersOptions
OrgSpec
OrgsListMembersOp
UserList
Person
PersonSpec
RepoBuildInfo
TaskSpec
TaskUpdate
User
UserSpec
UsersListOptions
OrgsListOp
EmailAddrList
OrgList
PasswordResetToken
NewPassword
NewAccount
SSHPublicKey
AuthorizationCodeRequest
AuthorizationCode
LoginCredentials
BearerJWT
AccessTokenRequest
AccessTokenResponse
AuthInfo
AuthorshipInfo
Completions
Def
DefAuthor
DefAuthorship
DefClient
DefDelta
DefGetOptions
DefListAuthorsOptions
DefListClientsOptions
DefListExamplesOptions
DefListOptions
DefListRefsOptions
DefSpec
DefsGetOp
DefList
DefsListRefsOp
RefList
DefsListExamplesOp
ExampleList
DefsListAuthorsOp
DefsListClientsOp
Delta
DeltaAffectedPerson
DeltaDefs
FileDiff
Hunk
DeltaFiles
DeltaFilter
DeltaListAffectedAuthorsOptions
DeltaListAffectedClientsOptions
DeltaListDefsOptions
DeltaListFilesOptions
DeltaListUnitsOptions
DeltaSpec
DeltasListUnitsOp
UnitDeltaList
DeltasListDefsOp
DeltasListFilesOp
DeltasListAffectedAuthorsOp
DeltaAffectedPersonList
DeltasListAffectedClientsOp
Example
FormatResult
MarkdownData
MarkdownOpt
MarkdownRequestBody
MarkdownRenderOp
Ref
RepoTreeGetOptions
RepoTreeSearchOptions
RepoTreeSearchResult
RepoTreeGetOp
RepoTreeSearchOp
RepoTreeListOp
RepoTreeListResult
VCSSearchResultList
TokenSearchOptions
TextSearchOptions
SearchOptions
SearchResults
SuggestionList
SourceCode
SourceCodeLine
SourceCodeToken
TreeEntry
TreeEntrySpec
UnitDelta
UnitListOptions
UnitSpec
RepoSourceUnitList
DefAuthorList
DefClientList
Checklist
FileToken
Plan
RawQuery
RepoToken
ResolvedQuery
RevToken
Suggestion
UnitToken
UserToken
TokenError
PBToken
ServerStatus
ServerConfig
ServerPubKey
RegisteredClient
RegisteredClientSpec
RegisteredClientCredentials
RegisteredClientListOptions
RegisteredClientList
UserPermissions
UserPermissionsList
UserPermissionsOptions
MetricsSnapshot
UserEvent
UserEventList
NotifyGenericEvent

Index

Constants

View Source
const (
	Git = "git"
	Hg  = "hg"
)
View Source
const DefaultPerPage = 10
View Source
const ImportTaskOp = "import"

Build task ops.

Variables

Cache is the gRPC cache used to cache API responses.

View Source
var DiscussionListOrder_name = map[int32]string{
	0: "Date",
	1: "Top",
}
View Source
var DiscussionListOrder_value = map[string]int32{
	"Date": 0,
	"Top":  1,
}
View Source
var ErrBuildNotFound = errors.New("build not found")
View Source
var GRPCCodec gogoCodec

GRPCCodec is the codec used for gRPC.

View Source
var RegisteredClientType_name = map[int32]string{
	0: "Any",
	1: "Other",
	2: "SourcegraphServer",
}
View Source
var RegisteredClientType_value = map[string]int32{
	"Any":               0,
	"Other":             1,
	"SourcegraphServer": 2,
}
View Source
var RemovePooledGRPCConn = func(ctx context.Context) {
	grpcEndpoint := GRPCEndpoint(ctx)
	removeConnFromPool(grpcEndpoint.Host)
}

RemovePooledGRPCConn removes the pooled grpc.ClientConnection to the gRPC endpoint in the context. The result of calling this function is that the pooled connection for this endpoint will be reset, so the subsequent call to NewClientFromContext() would have to dial a new gRPC connection to this endpoint.

View Source
var StorageError_Code_name = map[int32]string{
	0: "None",
	1: "EOF",
	2: "NotExist",
	3: "Permission",
}
View Source
var StorageError_Code_value = map[string]int32{
	"None":       0,
	"EOF":        1,
	"NotExist":   2,
	"Permission": 3,
}
View Source
var TelemetryType_name = map[int32]string{
	0: "PrometheusDelimited0dot0dot4",
}
View Source
var TelemetryType_value = map[string]int32{
	"PrometheusDelimited0dot0dot4": 0,
}

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func GRPCEndpoint

func GRPCEndpoint(ctx context.Context) *url.URL

GRPCEndpoint returns the context's gRPC endpoint URL that was previously configured using WithGRPCEndpoint.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func MockNewClientFromContext

func MockNewClientFromContext(f func(ctx context.Context) *Client)

MockNewClientFromContext allows a test to mock out the return value of NewClientFromContext. Note that this is modifying global state, so if your tests run in parallel you may get unexpected results

func ParseRepoAndCommitID

func ParseRepoAndCommitID(repoAndCommitID string) (uri, commitID string)

ParseRepoAndCommitID parses strings like "example.com/repo" and "example.com/repo@myrev".

func RegisterAccountsServer

func RegisterAccountsServer(s *grpc.Server, srv AccountsServer)

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

func RegisterBuildsServer

func RegisterBuildsServer(s *grpc.Server, srv BuildsServer)

func RegisterChangesetsServer

func RegisterChangesetsServer(s *grpc.Server, srv ChangesetsServer)

func RegisterDefsServer

func RegisterDefsServer(s *grpc.Server, srv DefsServer)

func RegisterDeltasServer

func RegisterDeltasServer(s *grpc.Server, srv DeltasServer)

func RegisterDiscussionsServer

func RegisterDiscussionsServer(s *grpc.Server, srv DiscussionsServer)

func RegisterGraphUplinkServer

func RegisterGraphUplinkServer(s *grpc.Server, srv GraphUplinkServer)

func RegisterMarkdownServer

func RegisterMarkdownServer(s *grpc.Server, srv MarkdownServer)

func RegisterMetaServer

func RegisterMetaServer(s *grpc.Server, srv MetaServer)

func RegisterMirrorReposServer

func RegisterMirrorReposServer(s *grpc.Server, srv MirrorReposServer)

func RegisterMirroredRepoSSHKeysServer

func RegisterMirroredRepoSSHKeysServer(s *grpc.Server, srv MirroredRepoSSHKeysServer)

func RegisterNotifyServer

func RegisterNotifyServer(s *grpc.Server, srv NotifyServer)

func RegisterOrgsServer

func RegisterOrgsServer(s *grpc.Server, srv OrgsServer)

func RegisterPeopleServer

func RegisterPeopleServer(s *grpc.Server, srv PeopleServer)

func RegisterRegisteredClientsServer

func RegisterRegisteredClientsServer(s *grpc.Server, srv RegisteredClientsServer)

func RegisterRepoBadgesServer

func RegisterRepoBadgesServer(s *grpc.Server, srv RepoBadgesServer)

func RegisterRepoStatusesServer

func RegisterRepoStatusesServer(s *grpc.Server, srv RepoStatusesServer)

func RegisterRepoTreeServer

func RegisterRepoTreeServer(s *grpc.Server, srv RepoTreeServer)

func RegisterReposServer

func RegisterReposServer(s *grpc.Server, srv ReposServer)

func RegisterSearchServer

func RegisterSearchServer(s *grpc.Server, srv SearchServer)

func RegisterStorageServer

func RegisterStorageServer(s *grpc.Server, srv StorageServer)

func RegisterUnitsServer

func RegisterUnitsServer(s *grpc.Server, srv UnitsServer)

func RegisterUserKeysServer

func RegisterUserKeysServer(s *grpc.Server, srv UserKeysServer)

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

func RestoreNewClientFromContext

func RestoreNewClientFromContext()

RestoreNewClientFromContext removes the mock and returns the correct implementation

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func TokenType

func TokenType(tok Token) string

func WithClientMetadata

func WithClientMetadata(parent context.Context, md map[string]string) context.Context

WithClientMetadata returns a copy of the parent context that merges in the specified metadata to future API clients constructed using this context (with NewClientFromContext). It replaces (shadows) any previously set metadata in the context.

func WithCredentials

func WithCredentials(parent context.Context, cred Credentials) context.Context

WithCredentials returns a copy of the parent context that uses cred as the credentials for future API clients constructed using this context (with NewClientFromContext). It replaces (shadows) any previously set credentials in the context.

It can be used to add, e.g., trace/span ID metadata for request tracing.

func WithGRPCEndpoint

func WithGRPCEndpoint(parent context.Context, url *url.URL) context.Context

WithGRPCEndpoint returns a copy of parent whose clients (obtained using FromContext) communicate with the given gRPC API endpoint URL.

Types

type AccessTokenRequest

type AccessTokenRequest struct {
	// See http://tools.ietf.org/html/rfc6749#section-1.3 for more
	// information on OAuth2 authorization grant types.
	//
	// Types that are valid to be assigned to AuthorizationGrant:
	//	*AccessTokenRequest_AuthorizationCode
	//	*AccessTokenRequest_ResourceOwnerPassword
	//	*AccessTokenRequest_BearerJWT
	AuthorizationGrant isAccessTokenRequest_AuthorizationGrant `protobuf_oneof:"authorization_grant"`
	// TokenURL is the token endpoint URL on the OAuth2 authorization
	// server that the client is requesting an access token from.
	TokenURL string   `protobuf:"bytes,9,opt,name=token_url,proto3" json:"token_url,omitempty"`
	Scope    []string `protobuf:"bytes,17,rep,name=scope" json:"scope,omitempty"`
}

AccessTokenRequest contains the information necessary to request an OAuth2 access token. It supports a subset of authorization grant types specified in http://tools.ietf.org/html/rfc6749#section-4.

func (*AccessTokenRequest) GetAuthorizationCode

func (m *AccessTokenRequest) GetAuthorizationCode() *AuthorizationCode

func (*AccessTokenRequest) GetAuthorizationGrant

func (m *AccessTokenRequest) GetAuthorizationGrant() isAccessTokenRequest_AuthorizationGrant

func (*AccessTokenRequest) GetBearerJWT

func (m *AccessTokenRequest) GetBearerJWT() *BearerJWT

func (*AccessTokenRequest) GetResourceOwnerPassword

func (m *AccessTokenRequest) GetResourceOwnerPassword() *LoginCredentials

func (*AccessTokenRequest) ProtoMessage

func (*AccessTokenRequest) ProtoMessage()

func (*AccessTokenRequest) Reset

func (m *AccessTokenRequest) Reset()

func (*AccessTokenRequest) String

func (m *AccessTokenRequest) String() string

func (*AccessTokenRequest) XXX_OneofFuncs

func (*AccessTokenRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type AccessTokenRequest_AuthorizationCode

type AccessTokenRequest_AuthorizationCode struct {
	AuthorizationCode *AuthorizationCode `protobuf:"bytes,1,opt,name=authorization_code,oneof"`
}

type AccessTokenRequest_BearerJWT

type AccessTokenRequest_BearerJWT struct {
	BearerJWT *BearerJWT `protobuf:"bytes,3,opt,name=bearer_jwt,oneof"`
}

type AccessTokenRequest_ResourceOwnerPassword

type AccessTokenRequest_ResourceOwnerPassword struct {
	ResourceOwnerPassword *LoginCredentials `protobuf:"bytes,2,opt,name=resource_owner_password,oneof"`
}

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken  string   `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"`
	TokenType    string   `protobuf:"bytes,2,opt,name=token_type,proto3" json:"token_type,omitempty"`
	ExpiresInSec int32    `protobuf:"varint,3,opt,name=expires_in_sec,proto3" json:"expires_in_sec,omitempty"`
	RefreshToken string   `protobuf:"bytes,4,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"`
	Scope        []string `protobuf:"bytes,5,rep,name=scope" json:"scope,omitempty"`
}

AccessTokenResponse is a successful access token response. See http://tools.ietf.org/html/rfc6749#section-5.1 for more information.

func (*AccessTokenResponse) ProtoMessage

func (*AccessTokenResponse) ProtoMessage()

func (*AccessTokenResponse) Reset

func (m *AccessTokenResponse) Reset()

func (*AccessTokenResponse) String

func (m *AccessTokenResponse) String() string

type AccountsClient

type AccountsClient interface {
	// Create creates a new user account.
	Create(ctx context.Context, in *NewAccount, opts ...grpc.CallOption) (*UserSpec, error)
	// RequestPasswordReset stores a password reset token in the database, to
	// later verify the authenticity of a user using CheckResetToken
	RequestPasswordReset(ctx context.Context, in *EmailAddr, opts ...grpc.CallOption) (*User, error)
	// CheckResetToken verifies a password reset token is authentic and valid
	ResetPassword(ctx context.Context, in *NewPassword, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// Update profile of existing account.
	Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewAccountsClient

func NewAccountsClient(cc *grpc.ClientConn) AccountsClient

type AccountsServer

type AccountsServer interface {
	// Create creates a new user account.
	Create(context.Context, *NewAccount) (*UserSpec, error)
	// RequestPasswordReset stores a password reset token in the database, to
	// later verify the authenticity of a user using CheckResetToken
	RequestPasswordReset(context.Context, *EmailAddr) (*User, error)
	// CheckResetToken verifies a password reset token is authentic and valid
	ResetPassword(context.Context, *NewPassword) (*pbtypes1.Void, error)
	// Update profile of existing account.
	Update(context.Context, *User) (*pbtypes1.Void, error)
}

type AnyToken

type AnyToken string

An AnyToken is a token that has not yet been resolved into another token type. It resolves to Term if it can't be resolved to another token type.

func (AnyToken) Token

func (u AnyToken) Token() string

type AuthClient

type AuthClient interface {
	// GetAuthorizationCodeGrant gets an OAuth2 authorization code
	// grant from the server that can be traded in for an access token
	// by calling GetAccessToken. See
	// https://tools.ietf.org/html/rfc6749#section-4.1 for more
	// information.
	GetAuthorizationCode(ctx context.Context, in *AuthorizationCodeRequest, opts ...grpc.CallOption) (*AuthorizationCode, error)
	// GetAccessToken requests the server to issue an access token
	// using the credentials provided in the AccessTokenRequest.
	//
	// If this call is requesting an access token for a
	// client_credentials grant (i.e., the access token would identify
	// the client, not any specific user), then the request must not
	// be authenticated. If the call is requesting an access token to
	// identify a user, the request must be authenticated using the
	// client's credentials.
	//
	// If the credentials are invalid, grpc.PermissionDenied is
	// returned.
	GetAccessToken(ctx context.Context, in *AccessTokenRequest, opts ...grpc.CallOption) (*AccessTokenResponse, error)
	// Identify describes the currently authenticated user and/or
	// client (if any). It is akin to "whoami".
	Identify(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*AuthInfo, error)
	// GetPermissions returns the currently authenticated user's
	// authorization levels on the client.
	GetPermissions(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*UserPermissions, error)
}

func NewAuthClient

func NewAuthClient(cc *grpc.ClientConn) AuthClient

type AuthInfo

type AuthInfo struct {
	// ClientID is the client ID of the currently authenticated
	// client. If a user is authenticated using an access token,
	// ClientID is the client ID of the registered client that the
	// access token was granted to.
	ClientID string `protobuf:"bytes,1,opt,name=client_id,proto3" json:"client_id,omitempty"`
	// UID is the UID of the currently authenticated user (if any).
	UID int32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	// Domain is the domain of the currently authenticated user (if
	// any), or blank if the user account was registered on the
	// current server.
	Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
	// Login is the login of the currently authenticated user (if any).
	Login string `protobuf:"bytes,4,opt,name=login,proto3" json:"login,omitempty"`
}

AuthInfo describes the currently authenticated client and/or user (if any).

func (*AuthInfo) ProtoMessage

func (*AuthInfo) ProtoMessage()

func (*AuthInfo) Reset

func (m *AuthInfo) Reset()

func (*AuthInfo) String

func (m *AuthInfo) String() string

func (AuthInfo) UserSpec

func (a AuthInfo) UserSpec() *UserSpec

UserSpec returns a UserSpec that refers to the user identified by a. If a.UID == 0, nil is returned.

type AuthServer

type AuthServer interface {
	// GetAuthorizationCodeGrant gets an OAuth2 authorization code
	// grant from the server that can be traded in for an access token
	// by calling GetAccessToken. See
	// https://tools.ietf.org/html/rfc6749#section-4.1 for more
	// information.
	GetAuthorizationCode(context.Context, *AuthorizationCodeRequest) (*AuthorizationCode, error)
	// GetAccessToken requests the server to issue an access token
	// using the credentials provided in the AccessTokenRequest.
	//
	// If this call is requesting an access token for a
	// client_credentials grant (i.e., the access token would identify
	// the client, not any specific user), then the request must not
	// be authenticated. If the call is requesting an access token to
	// identify a user, the request must be authenticated using the
	// client's credentials.
	//
	// If the credentials are invalid, grpc.PermissionDenied is
	// returned.
	GetAccessToken(context.Context, *AccessTokenRequest) (*AccessTokenResponse, error)
	// Identify describes the currently authenticated user and/or
	// client (if any). It is akin to "whoami".
	Identify(context.Context, *pbtypes1.Void) (*AuthInfo, error)
	// GetPermissions returns the currently authenticated user's
	// authorization levels on the client.
	GetPermissions(context.Context, *pbtypes1.Void) (*UserPermissions, error)
}

type AuthorizationCode

type AuthorizationCode struct {
	Code        string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	RedirectURI string `protobuf:"bytes,2,opt,name=redirect_uri,proto3" json:"redirect_uri,omitempty"`
}

AuthorizationCode represents an access token request using the authorization_code OAuth2 grant type. See http://tools.ietf.org/html/rfc6749#section-4.1.3 for more information.

The client_id field is not set in this message; it is taken from the authenticated client for the request (which must exist).

func (*AuthorizationCode) ProtoMessage

func (*AuthorizationCode) ProtoMessage()

func (*AuthorizationCode) Reset

func (m *AuthorizationCode) Reset()

func (*AuthorizationCode) String

func (m *AuthorizationCode) String() string

type AuthorizationCodeRequest

type AuthorizationCodeRequest struct {
	ResponseType string   `protobuf:"bytes,1,opt,name=response_type,proto3" json:"response_type,omitempty"`
	ClientID     string   `protobuf:"bytes,2,opt,name=client_id,proto3" json:"client_id,omitempty"`
	RedirectURI  string   `protobuf:"bytes,3,opt,name=redirect_uri,proto3" json:"redirect_uri,omitempty"`
	Scope        []string `protobuf:"bytes,4,rep,name=scope" json:"scope,omitempty"`
	// UID is the UID of the user who will be presented with the code.
	UID int32 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"`
}

AuthorizationCodeRequest: see https://tools.ietf.org/html/rfc6749#section-4.1.1.

func (*AuthorizationCodeRequest) ProtoMessage

func (*AuthorizationCodeRequest) ProtoMessage()

func (*AuthorizationCodeRequest) Reset

func (m *AuthorizationCodeRequest) Reset()

func (*AuthorizationCodeRequest) String

func (m *AuthorizationCodeRequest) String() string

type AuthorshipInfo

type AuthorshipInfo struct {
	AuthorEmail    string            `protobuf:"bytes,1,opt,name=author_email,proto3" json:"author_email,omitempty"`
	LastCommitDate pbtypes.Timestamp `protobuf:"bytes,2,opt,name=last_commit_date" json:"last_commit_date"`
	// LastCommitID is the commit ID of the last commit that this author made to the
	// thing that this info describes.
	LastCommitID string `protobuf:"bytes,3,opt,name=last_commit_id,proto3" json:"last_commit_id,omitempty"`
}

func (*AuthorshipInfo) ProtoMessage

func (*AuthorshipInfo) ProtoMessage()

func (*AuthorshipInfo) Reset

func (m *AuthorshipInfo) Reset()

func (*AuthorshipInfo) String

func (m *AuthorshipInfo) String() string

type Badge

type Badge struct {
	Name              string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	ImageURL          string `protobuf:"bytes,3,opt,name=image_url,proto3" json:"image_url,omitempty"`
	UncountedImageURL string `protobuf:"bytes,4,opt,name=uncounted_image_url,proto3" json:"uncounted_image_url,omitempty"`
	Markdown          string `protobuf:"bytes,5,opt,name=markdown,proto3" json:"markdown,omitempty"`
}

func (*Badge) HTML

func (b *Badge) HTML() string

func (*Badge) ProtoMessage

func (*Badge) ProtoMessage()

func (*Badge) Reset

func (m *Badge) Reset()

func (*Badge) String

func (m *Badge) String() string

type BadgeList

type BadgeList struct {
	Badges []*Badge `protobuf:"bytes,1,rep,name=badges" json:"badges,omitempty"`
}

func (*BadgeList) ProtoMessage

func (*BadgeList) ProtoMessage()

func (*BadgeList) Reset

func (m *BadgeList) Reset()

func (*BadgeList) String

func (m *BadgeList) String() string

type BearerJWT

type BearerJWT struct {
	// Assertion is a JWT.
	Assertion string `protobuf:"bytes,1,opt,name=assertion,proto3" json:"assertion,omitempty"`
}

BearerJWT is a Bearer JSON Web Token, which is used for client authentication during an authentication grant. See https://tools.ietf.org/html/draft-ietf-oauth-jwt-bearer-12#section-2.1 for more information.

func (*BearerJWT) ProtoMessage

func (*BearerJWT) ProtoMessage()

func (*BearerJWT) Reset

func (m *BearerJWT) Reset()

func (*BearerJWT) String

func (m *BearerJWT) String() string

type BranchList

type BranchList struct {
	Branches       []*vcs.Branch `protobuf:"bytes,1,rep,name=branches" json:"branches,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*BranchList) ProtoMessage

func (*BranchList) ProtoMessage()

func (*BranchList) Reset

func (m *BranchList) Reset()

func (*BranchList) String

func (m *BranchList) String() string

type Build

type Build struct {
	// Attempt is the 1-indexed number representing sequential attempts at building
	// this repository.
	Attempt uint32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"`
	// Repo is the URI of the repository this build is for.
	Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	// CommitID is the full resolved commit ID to build.
	CommitID    string             `protobuf:"bytes,3,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	CreatedAt   pbtypes.Timestamp  `protobuf:"bytes,4,opt,name=created_at" json:"created_at"`
	StartedAt   *pbtypes.Timestamp `protobuf:"bytes,5,opt,name=started_at" json:"started_at,omitempty"`
	EndedAt     *pbtypes.Timestamp `protobuf:"bytes,6,opt,name=ended_at" json:"ended_at,omitempty"`
	HeartbeatAt *pbtypes.Timestamp `protobuf:"bytes,7,opt,name=heartbeat_at" json:"heartbeat_at,omitempty"`
	Success     bool               `protobuf:"varint,8,opt,name=success,proto3" json:"success,omitempty"`
	Failure     bool               `protobuf:"varint,9,opt,name=failure,proto3" json:"failure,omitempty"`
	// Killed is true if this build's worker didn't exit on its own accord. It is
	// generally set when no heartbeat has been received within a certain interval. If
	// Killed is true, then Failure must also always be set to true. Unqueued builds
	// are never killed for lack of a heartbeat.
	Killed bool `protobuf:"varint,10,opt,name=killed,proto3" json:"killed,omitempty"`
	// Host is the hostname of the machine that is working on this build.
	Host        string `protobuf:"bytes,11,opt,name=host,proto3" json:"host,omitempty"`
	Purged      bool   `protobuf:"varint,12,opt,name=purged,proto3" json:"purged,omitempty"`
	BuildConfig `protobuf:"bytes,13,opt,name=build_config,embedded=build_config" json:"build_config"`
}

A Build represents a scheduled, completed, or failed repository analysis and import job.

A build is composed of many tasks. The worker that is responsible for a build or task determines whether a task failure causes the whole build to fail. (Keep reading to see how we determine who is responsible for a build or task.) There is no single kind of worker; currently there are 2 things that could be considered workers because they build builds or perform tasks: the builders on Sourcegraph.com, and anyone who runs `src push` locally.

Each task has logs associated with it, and each task can be associated with a single source unit (or not).

Builds have a Queue bool field. If a process creates a build that has Queue=true, that means that it relinquishes responsibility for it; some other queue workers (on the server, for example) will dequeue and complete it. If Queue=false, then the process that created it is responsible for completing it. The only exception to this is that after a certain timeout (on the order of 45 minutes), started but unfinished builds are marked as failed.

Builds and tasks are simple "build"ing blocks (no pun intended) with simple behavior. As we encounter new requirements for the build system, they may evolve.

func (*Build) ProtoMessage

func (*Build) ProtoMessage()

func (*Build) Reset

func (m *Build) Reset()

func (*Build) Spec

func (b *Build) Spec() BuildSpec

func (*Build) String

func (m *Build) String() string

type BuildConfig

type BuildConfig struct {
	// Import is whether to import the build data into the database
	// when the build is complete. The data must be imported for
	// Sourcegraph's web app or API to use it.
	Import bool `protobuf:"varint,1,opt,name=import,proto3" json:"import,omitempty"`
	// Queue is whether this build should be enqueued. If enqueued, any worker may
	// begin running this build. If not enqueued, it is up to the client to run the
	// build and update it accordingly.
	Queue bool `protobuf:"varint,2,opt,name=queue,proto3" json:"queue,omitempty"`
	// UseCache is whether to use cached build data files. If false, the
	// .sourcegraph-data directory will be wiped out before the build begins.
	//
	// Regardless of the value of UseCache, the build data files will be uploaded to
	// the central cache after the build ends.
	UseCache bool `protobuf:"varint,3,opt,name=use_cache,proto3" json:"use_cache,omitempty"`
	// Priority of the build in the queue (higher numbers mean the build is dequeued
	// sooner).
	Priority int32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
}

BuildConfig configures a repository build.

func (*BuildConfig) ProtoMessage

func (*BuildConfig) ProtoMessage()

func (*BuildConfig) Reset

func (m *BuildConfig) Reset()

func (*BuildConfig) String

func (m *BuildConfig) String() string

type BuildCreateOptions

type BuildCreateOptions struct {
	BuildConfig `protobuf:"bytes,1,opt,name=build_config,embedded=build_config" json:"build_config"`
	// Force creation of build. If false, the build will not be created if a build for
	// the same repository and with the same BuildConfig exists.
	//
	// TODO(bliu): test this
	Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
}

func (*BuildCreateOptions) ProtoMessage

func (*BuildCreateOptions) ProtoMessage()

func (*BuildCreateOptions) Reset

func (m *BuildCreateOptions) Reset()

func (*BuildCreateOptions) String

func (m *BuildCreateOptions) String() string

type BuildGetLogOptions

type BuildGetLogOptions struct {
	// MinID indicates that only log entries whose monotonically increasing ID is
	// greater than MinID should be returned.
	//
	// To "tail -f" or watch a log for updates, set each subsequent request's MinID to
	// the MaxID of the previous request.
	MinID string `protobuf:"bytes,1,opt,name=min_id,proto3" json:"min_id,omitempty"`
}

BuildGetLogOptions specifies options for build log API methods.

func (*BuildGetLogOptions) ProtoMessage

func (*BuildGetLogOptions) ProtoMessage()

func (*BuildGetLogOptions) Reset

func (m *BuildGetLogOptions) Reset()

func (*BuildGetLogOptions) String

func (m *BuildGetLogOptions) String() string

type BuildList

type BuildList struct {
	Builds         []*Build `protobuf:"bytes,1,rep,name=builds" json:"builds,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*BuildList) ProtoMessage

func (*BuildList) ProtoMessage()

func (*BuildList) Reset

func (m *BuildList) Reset()

func (*BuildList) String

func (m *BuildList) String() string

type BuildListOptions

type BuildListOptions struct {
	Queued      bool   `protobuf:"varint,1,opt,name=queued,proto3" json:"queued,omitempty" url:",omitempty"`
	Active      bool   `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty" url:",omitempty"`
	Ended       bool   `protobuf:"varint,3,opt,name=ended,proto3" json:"ended,omitempty" url:",omitempty"`
	Succeeded   bool   `protobuf:"varint,4,opt,name=succeeded,proto3" json:"succeeded,omitempty" url:",omitempty"`
	Failed      bool   `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty" url:",omitempty"`
	Purged      bool   `protobuf:"varint,6,opt,name=purged,proto3" json:"purged,omitempty" url:",omitempty"`
	Repo        string `protobuf:"bytes,7,opt,name=repo,proto3" json:"repo,omitempty" url:",omitempty"`
	CommitID    string `protobuf:"bytes,8,opt,name=commit_id,proto3" json:"commit_id,omitempty" url:",omitempty"`
	Sort        string `protobuf:"bytes,9,opt,name=sort,proto3" json:"sort,omitempty" url:",omitempty"`
	Direction   string `protobuf:"bytes,10,opt,name=direction,proto3" json:"direction,omitempty" url:",omitempty"`
	ListOptions `protobuf:"bytes,11,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*BuildListOptions) ProtoMessage

func (*BuildListOptions) ProtoMessage()

func (*BuildListOptions) Reset

func (m *BuildListOptions) Reset()

func (*BuildListOptions) String

func (m *BuildListOptions) String() string

type BuildSpec

type BuildSpec struct {
	CommitID string   `protobuf:"bytes,1,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	Attempt  uint32   `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"`
	Repo     RepoSpec `protobuf:"bytes,3,opt,name=repo" json:"repo"`
}

func (BuildSpec) IDString

func (b BuildSpec) IDString() string

IDString returns a succinct string that uniquely identifies this build.

func (*BuildSpec) ProtoMessage

func (*BuildSpec) ProtoMessage()

func (*BuildSpec) Reset

func (m *BuildSpec) Reset()

func (*BuildSpec) RouteVars

func (s *BuildSpec) RouteVars() map[string]string

func (*BuildSpec) String

func (m *BuildSpec) String() string

type BuildTask

type BuildTask struct {
	// TaskID is the unique ID of this task. It is unique over all tasks, not just
	// tasks in the same build.
	TaskID int64 `protobuf:"varint,1,opt,name=task_id,proto3" json:"task_id,omitempty"`
	// Repo is the URI of the repository that this task's build is for.
	Repo     string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	CommitID string `protobuf:"bytes,3,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	Attempt  uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"`
	// UnitType is the srclib source unit type of the source unit that this task is
	// associated with.
	UnitType string `protobuf:"bytes,5,opt,name=unit_type,proto3" json:"unit_type,omitempty"`
	// Unit is the srclib source unit name of the source unit that this task is
	// associated with.
	Unit string `protobuf:"bytes,6,opt,name=unit,proto3" json:"unit,omitempty"`
	// Op is the srclib toolchain operation (graph, depresolve, etc.) that this task
	// performs.
	Op string `protobuf:"bytes,7,opt,name=op,proto3" json:"op,omitempty"`
	// Order is the order in which this task is performed, relative to other tasks in
	// the same build. Lower-number-ordered tasks are built first. Multiple tasks may
	// have the same order.
	Order int32 `protobuf:"varint,8,opt,name=order,proto3" json:"order,omitempty"`
	// CreatedAt is when this task was initially created.
	CreatedAt pbtypes.Timestamp `protobuf:"bytes,9,opt,name=created_at" json:"created_at"`
	// StartedAt is when this task's execution began.
	StartedAt *pbtypes.Timestamp `protobuf:"bytes,10,opt,name=started_at" json:"started_at,omitempty"`
	// EndedAt is when this task's execution ended (whether because it succeeded or
	// failed).
	EndedAt *pbtypes.Timestamp `protobuf:"bytes,11,opt,name=ended_at" json:"ended_at,omitempty"`
	// Success is whether this task's execution succeeded.
	Success bool `protobuf:"varint,13,opt,name=success,proto3" json:"success,omitempty"`
	// Failure is whether this task's execution failed.
	Failure bool `protobuf:"varint,14,opt,name=failure,proto3" json:"failure,omitempty"`
}

A BuildTask represents an individual step of a build.

See the documentation for Build for more information about how builds and tasks relate to each other.

func (*BuildTask) ProtoMessage

func (*BuildTask) ProtoMessage()

func (*BuildTask) Reset

func (m *BuildTask) Reset()

func (*BuildTask) Spec

func (t *BuildTask) Spec() TaskSpec

func (*BuildTask) String

func (m *BuildTask) String() string

type BuildTaskList

type BuildTaskList struct {
	BuildTasks []*BuildTask `protobuf:"bytes,1,rep,name=build_tasks" json:"build_tasks,omitempty"`
}

func (*BuildTaskList) ProtoMessage

func (*BuildTaskList) ProtoMessage()

func (*BuildTaskList) Reset

func (m *BuildTaskList) Reset()

func (*BuildTaskList) String

func (m *BuildTaskList) String() string

type BuildTaskListOptions

type BuildTaskListOptions struct {
	ListOptions `protobuf:"bytes,1,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*BuildTaskListOptions) ProtoMessage

func (*BuildTaskListOptions) ProtoMessage()

func (*BuildTaskListOptions) Reset

func (m *BuildTaskListOptions) Reset()

func (*BuildTaskListOptions) String

func (m *BuildTaskListOptions) String() string

type BuildUpdate

type BuildUpdate struct {
	StartedAt   *pbtypes.Timestamp `protobuf:"bytes,1,opt,name=started_at" json:"started_at,omitempty"`
	EndedAt     *pbtypes.Timestamp `protobuf:"bytes,2,opt,name=ended_at" json:"ended_at,omitempty"`
	HeartbeatAt *pbtypes.Timestamp `protobuf:"bytes,3,opt,name=heartbeat_at" json:"heartbeat_at,omitempty"`
	Host        string             `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
	Success     bool               `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
	Purged      bool               `protobuf:"varint,6,opt,name=purged,proto3" json:"purged,omitempty"`
	Failure     bool               `protobuf:"varint,7,opt,name=failure,proto3" json:"failure,omitempty"`
	Killed      bool               `protobuf:"varint,8,opt,name=killed,proto3" json:"killed,omitempty"`
	Priority    int32              `protobuf:"varint,9,opt,name=priority,proto3" json:"priority,omitempty"`
}

A BuildUpdate contains updated information to update on an existing build.

func (*BuildUpdate) ProtoMessage

func (*BuildUpdate) ProtoMessage()

func (*BuildUpdate) Reset

func (m *BuildUpdate) Reset()

func (*BuildUpdate) String

func (m *BuildUpdate) String() string

type BuildsClient

type BuildsClient interface {
	// Get fetches a build.
	Get(ctx context.Context, in *BuildSpec, opts ...grpc.CallOption) (*Build, error)
	// GetRepoBuildInfo gets the best-match build for a specific repo revspec. It
	// returns additional information about the build, such as whether it is exactly
	// up-to-date with the revspec or a few commits behind the revspec. The opt param
	// controls what is returned in this case.
	GetRepoBuildInfo(ctx context.Context, in *BuildsGetRepoBuildInfoOp, opts ...grpc.CallOption) (*RepoBuildInfo, error)
	// List builds.
	List(ctx context.Context, in *BuildListOptions, opts ...grpc.CallOption) (*BuildList, error)
	// Create a new build. The build will run asynchronously (Create does not wait for
	// it to return. To monitor the build's status, use Get.)
	Create(ctx context.Context, in *BuildsCreateOp, opts ...grpc.CallOption) (*Build, error)
	// Update updates information about a build and returns the build after the update
	// has been applied.
	Update(ctx context.Context, in *BuildsUpdateOp, opts ...grpc.CallOption) (*Build, error)
	// ListBuildTasks lists the tasks associated with a build.
	ListBuildTasks(ctx context.Context, in *BuildsListBuildTasksOp, opts ...grpc.CallOption) (*BuildTaskList, error)
	// CreateTasks creates tasks associated with a build and returns them with their
	// TID fields set.
	CreateTasks(ctx context.Context, in *BuildsCreateTasksOp, opts ...grpc.CallOption) (*BuildTaskList, error)
	// UpdateTask updates a task associated with a build.
	UpdateTask(ctx context.Context, in *BuildsUpdateTaskOp, opts ...grpc.CallOption) (*BuildTask, error)
	// GetLog gets log entries associated with a build.
	GetLog(ctx context.Context, in *BuildsGetLogOp, opts ...grpc.CallOption) (*LogEntries, error)
	// GetTaskLog gets log entries associated with a task.
	GetTaskLog(ctx context.Context, in *BuildsGetTaskLogOp, opts ...grpc.CallOption) (*LogEntries, error)
	// DequeueNext returns the next queued build and marks it as
	// having started (atomically). If there are no builds in the
	// queue, a NotFound error is returned.
	DequeueNext(ctx context.Context, in *BuildsDequeueNextOp, opts ...grpc.CallOption) (*Build, error)
}

func NewBuildsClient

func NewBuildsClient(cc *grpc.ClientConn) BuildsClient

type BuildsCreateOp

type BuildsCreateOp struct {
	RepoRev RepoRevSpec         `protobuf:"bytes,1,opt,name=repo_rev" json:"repo_rev"`
	Opt     *BuildCreateOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*BuildsCreateOp) ProtoMessage

func (*BuildsCreateOp) ProtoMessage()

func (*BuildsCreateOp) Reset

func (m *BuildsCreateOp) Reset()

func (*BuildsCreateOp) String

func (m *BuildsCreateOp) String() string

type BuildsCreateTasksOp

type BuildsCreateTasksOp struct {
	Build BuildSpec    `protobuf:"bytes,1,opt,name=build" json:"build"`
	Tasks []*BuildTask `protobuf:"bytes,2,rep,name=tasks" json:"tasks,omitempty"`
}

func (*BuildsCreateTasksOp) ProtoMessage

func (*BuildsCreateTasksOp) ProtoMessage()

func (*BuildsCreateTasksOp) Reset

func (m *BuildsCreateTasksOp) Reset()

func (*BuildsCreateTasksOp) String

func (m *BuildsCreateTasksOp) String() string

type BuildsDequeueNextOp

type BuildsDequeueNextOp struct {
}

func (*BuildsDequeueNextOp) ProtoMessage

func (*BuildsDequeueNextOp) ProtoMessage()

func (*BuildsDequeueNextOp) Reset

func (m *BuildsDequeueNextOp) Reset()

func (*BuildsDequeueNextOp) String

func (m *BuildsDequeueNextOp) String() string

type BuildsGetLogOp

type BuildsGetLogOp struct {
	Build BuildSpec           `protobuf:"bytes,1,opt,name=build" json:"build"`
	Opt   *BuildGetLogOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*BuildsGetLogOp) ProtoMessage

func (*BuildsGetLogOp) ProtoMessage()

func (*BuildsGetLogOp) Reset

func (m *BuildsGetLogOp) Reset()

func (*BuildsGetLogOp) String

func (m *BuildsGetLogOp) String() string

type BuildsGetRepoBuildInfoOp

type BuildsGetRepoBuildInfoOp struct {
	Repo RepoRevSpec                    `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Opt  *BuildsGetRepoBuildInfoOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*BuildsGetRepoBuildInfoOp) ProtoMessage

func (*BuildsGetRepoBuildInfoOp) ProtoMessage()

func (*BuildsGetRepoBuildInfoOp) Reset

func (m *BuildsGetRepoBuildInfoOp) Reset()

func (*BuildsGetRepoBuildInfoOp) String

func (m *BuildsGetRepoBuildInfoOp) String() string

type BuildsGetRepoBuildInfoOptions

type BuildsGetRepoBuildInfoOptions struct {
	// Exact is whether only a build whose commit ID exactly matches the revspec should
	// be returned. (For non-full-commit ID revspecs, such as branches, tags, and
	// partial commit IDs, this means that the build's commit ID matches the resolved
	// revspec's commit ID.)
	//
	// If Exact is false, then builds for older commits that are reachable from the
	// revspec may also be returned. For example, if there's a build for master~1 but
	// no build for master, and your revspec is master, using Exact=false will return
	// the build for master~1.
	//
	// Using Exact=true is faster as the commit and build history never needs to be
	// searched. If the exact build is not found, or the exact build was found but it
	// failed, LastSuccessful and LastSuccessfulCommit for RepoBuildInfo will be nil.
	Exact bool `protobuf:"varint,1,opt,name=exact,proto3" json:"exact,omitempty" url:",omitempty"`
	// IncludeVCSMetadata is whether the returned RepoBuildInfo should
	// set the VCS-related fields (CommitsBehind, LastSuccessfulCommit).
	// These require an extra VCS lookup operation to compute.
	IncludeVCSMetadata bool `protobuf:"varint,2,opt,name=include_vcs_metadata,proto3" json:"include_vcs_metadata,omitempty" url:",omitempty"`
}

BuildsGetRepoBuildInfoOptions sets options for the Repos.GetBuild call.

func (*BuildsGetRepoBuildInfoOptions) ProtoMessage

func (*BuildsGetRepoBuildInfoOptions) ProtoMessage()

func (*BuildsGetRepoBuildInfoOptions) Reset

func (m *BuildsGetRepoBuildInfoOptions) Reset()

func (*BuildsGetRepoBuildInfoOptions) String

type BuildsGetTaskLogOp

type BuildsGetTaskLogOp struct {
	Task TaskSpec            `protobuf:"bytes,1,opt,name=task" json:"task"`
	Opt  *BuildGetLogOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*BuildsGetTaskLogOp) ProtoMessage

func (*BuildsGetTaskLogOp) ProtoMessage()

func (*BuildsGetTaskLogOp) Reset

func (m *BuildsGetTaskLogOp) Reset()

func (*BuildsGetTaskLogOp) String

func (m *BuildsGetTaskLogOp) String() string

type BuildsListBuildTasksOp

type BuildsListBuildTasksOp struct {
	Build BuildSpec             `protobuf:"bytes,1,opt,name=build" json:"build"`
	Opt   *BuildTaskListOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*BuildsListBuildTasksOp) ProtoMessage

func (*BuildsListBuildTasksOp) ProtoMessage()

func (*BuildsListBuildTasksOp) Reset

func (m *BuildsListBuildTasksOp) Reset()

func (*BuildsListBuildTasksOp) String

func (m *BuildsListBuildTasksOp) String() string

type BuildsServer

type BuildsServer interface {
	// Get fetches a build.
	Get(context.Context, *BuildSpec) (*Build, error)
	// GetRepoBuildInfo gets the best-match build for a specific repo revspec. It
	// returns additional information about the build, such as whether it is exactly
	// up-to-date with the revspec or a few commits behind the revspec. The opt param
	// controls what is returned in this case.
	GetRepoBuildInfo(context.Context, *BuildsGetRepoBuildInfoOp) (*RepoBuildInfo, error)
	// List builds.
	List(context.Context, *BuildListOptions) (*BuildList, error)
	// Create a new build. The build will run asynchronously (Create does not wait for
	// it to return. To monitor the build's status, use Get.)
	Create(context.Context, *BuildsCreateOp) (*Build, error)
	// Update updates information about a build and returns the build after the update
	// has been applied.
	Update(context.Context, *BuildsUpdateOp) (*Build, error)
	// ListBuildTasks lists the tasks associated with a build.
	ListBuildTasks(context.Context, *BuildsListBuildTasksOp) (*BuildTaskList, error)
	// CreateTasks creates tasks associated with a build and returns them with their
	// TID fields set.
	CreateTasks(context.Context, *BuildsCreateTasksOp) (*BuildTaskList, error)
	// UpdateTask updates a task associated with a build.
	UpdateTask(context.Context, *BuildsUpdateTaskOp) (*BuildTask, error)
	// GetLog gets log entries associated with a build.
	GetLog(context.Context, *BuildsGetLogOp) (*LogEntries, error)
	// GetTaskLog gets log entries associated with a task.
	GetTaskLog(context.Context, *BuildsGetTaskLogOp) (*LogEntries, error)
	// DequeueNext returns the next queued build and marks it as
	// having started (atomically). If there are no builds in the
	// queue, a NotFound error is returned.
	DequeueNext(context.Context, *BuildsDequeueNextOp) (*Build, error)
}

type BuildsUpdateOp

type BuildsUpdateOp struct {
	Build BuildSpec   `protobuf:"bytes,1,opt,name=build" json:"build"`
	Info  BuildUpdate `protobuf:"bytes,2,opt,name=info" json:"info"`
}

func (*BuildsUpdateOp) ProtoMessage

func (*BuildsUpdateOp) ProtoMessage()

func (*BuildsUpdateOp) Reset

func (m *BuildsUpdateOp) Reset()

func (*BuildsUpdateOp) String

func (m *BuildsUpdateOp) String() string

type BuildsUpdateTaskOp

type BuildsUpdateTaskOp struct {
	Task TaskSpec   `protobuf:"bytes,1,opt,name=task" json:"task"`
	Info TaskUpdate `protobuf:"bytes,2,opt,name=info" json:"info"`
}

func (*BuildsUpdateTaskOp) ProtoMessage

func (*BuildsUpdateTaskOp) ProtoMessage()

func (*BuildsUpdateTaskOp) Reset

func (m *BuildsUpdateTaskOp) Reset()

func (*BuildsUpdateTaskOp) String

func (m *BuildsUpdateTaskOp) String() string

type CachedAccountsClient

type CachedAccountsClient struct {
	AccountsClient
	Cache *grpccache.Cache
}

func (*CachedAccountsClient) Create

func (s *CachedAccountsClient) Create(ctx context.Context, in *NewAccount, opts ...grpc.CallOption) (*UserSpec, error)

func (*CachedAccountsClient) RequestPasswordReset

func (s *CachedAccountsClient) RequestPasswordReset(ctx context.Context, in *EmailAddr, opts ...grpc.CallOption) (*User, error)

func (*CachedAccountsClient) ResetPassword

func (s *CachedAccountsClient) ResetPassword(ctx context.Context, in *NewPassword, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedAccountsClient) Update

func (s *CachedAccountsClient) Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*pbtypes.Void, error)

type CachedAccountsServer

type CachedAccountsServer struct{ AccountsServer }

func (*CachedAccountsServer) Create

func (s *CachedAccountsServer) Create(ctx context.Context, in *NewAccount) (*UserSpec, error)

func (*CachedAccountsServer) RequestPasswordReset

func (s *CachedAccountsServer) RequestPasswordReset(ctx context.Context, in *EmailAddr) (*User, error)

func (*CachedAccountsServer) ResetPassword

func (s *CachedAccountsServer) ResetPassword(ctx context.Context, in *NewPassword) (*pbtypes.Void, error)

func (*CachedAccountsServer) Update

func (s *CachedAccountsServer) Update(ctx context.Context, in *User) (*pbtypes.Void, error)

type CachedAuthClient

type CachedAuthClient struct {
	AuthClient
	Cache *grpccache.Cache
}

func (*CachedAuthClient) GetAccessToken

func (*CachedAuthClient) GetAuthorizationCode

func (s *CachedAuthClient) GetAuthorizationCode(ctx context.Context, in *AuthorizationCodeRequest, opts ...grpc.CallOption) (*AuthorizationCode, error)

func (*CachedAuthClient) GetPermissions

func (s *CachedAuthClient) GetPermissions(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*UserPermissions, error)

func (*CachedAuthClient) Identify

func (s *CachedAuthClient) Identify(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*AuthInfo, error)

type CachedAuthServer

type CachedAuthServer struct{ AuthServer }

func (*CachedAuthServer) GetAccessToken

func (*CachedAuthServer) GetAuthorizationCode

func (s *CachedAuthServer) GetAuthorizationCode(ctx context.Context, in *AuthorizationCodeRequest) (*AuthorizationCode, error)

func (*CachedAuthServer) GetPermissions

func (s *CachedAuthServer) GetPermissions(ctx context.Context, in *pbtypes.Void) (*UserPermissions, error)

func (*CachedAuthServer) Identify

func (s *CachedAuthServer) Identify(ctx context.Context, in *pbtypes.Void) (*AuthInfo, error)

type CachedBuildsClient

type CachedBuildsClient struct {
	BuildsClient
	Cache *grpccache.Cache
}

func (*CachedBuildsClient) Create

func (s *CachedBuildsClient) Create(ctx context.Context, in *BuildsCreateOp, opts ...grpc.CallOption) (*Build, error)

func (*CachedBuildsClient) CreateTasks

func (*CachedBuildsClient) DequeueNext

func (s *CachedBuildsClient) DequeueNext(ctx context.Context, in *BuildsDequeueNextOp, opts ...grpc.CallOption) (*Build, error)

func (*CachedBuildsClient) Get

func (s *CachedBuildsClient) Get(ctx context.Context, in *BuildSpec, opts ...grpc.CallOption) (*Build, error)

func (*CachedBuildsClient) GetLog

func (*CachedBuildsClient) GetRepoBuildInfo

func (s *CachedBuildsClient) GetRepoBuildInfo(ctx context.Context, in *BuildsGetRepoBuildInfoOp, opts ...grpc.CallOption) (*RepoBuildInfo, error)

func (*CachedBuildsClient) GetTaskLog

func (s *CachedBuildsClient) GetTaskLog(ctx context.Context, in *BuildsGetTaskLogOp, opts ...grpc.CallOption) (*LogEntries, error)

func (*CachedBuildsClient) List

func (*CachedBuildsClient) ListBuildTasks

func (*CachedBuildsClient) Update

func (s *CachedBuildsClient) Update(ctx context.Context, in *BuildsUpdateOp, opts ...grpc.CallOption) (*Build, error)

func (*CachedBuildsClient) UpdateTask

func (s *CachedBuildsClient) UpdateTask(ctx context.Context, in *BuildsUpdateTaskOp, opts ...grpc.CallOption) (*BuildTask, error)

type CachedBuildsServer

type CachedBuildsServer struct{ BuildsServer }

func (*CachedBuildsServer) Create

func (s *CachedBuildsServer) Create(ctx context.Context, in *BuildsCreateOp) (*Build, error)

func (*CachedBuildsServer) CreateTasks

func (*CachedBuildsServer) DequeueNext

func (s *CachedBuildsServer) DequeueNext(ctx context.Context, in *BuildsDequeueNextOp) (*Build, error)

func (*CachedBuildsServer) Get

func (s *CachedBuildsServer) Get(ctx context.Context, in *BuildSpec) (*Build, error)

func (*CachedBuildsServer) GetLog

func (*CachedBuildsServer) GetRepoBuildInfo

func (*CachedBuildsServer) GetTaskLog

func (*CachedBuildsServer) List

func (*CachedBuildsServer) ListBuildTasks

func (*CachedBuildsServer) Update

func (s *CachedBuildsServer) Update(ctx context.Context, in *BuildsUpdateOp) (*Build, error)

func (*CachedBuildsServer) UpdateTask

type CachedChangesetsClient

type CachedChangesetsClient struct {
	ChangesetsClient
	Cache *grpccache.Cache
}

func (*CachedChangesetsClient) Create

func (*CachedChangesetsClient) CreateReview

func (*CachedChangesetsClient) Get

func (*CachedChangesetsClient) List

func (*CachedChangesetsClient) ListEvents

func (*CachedChangesetsClient) ListReviews

func (*CachedChangesetsClient) Merge

func (*CachedChangesetsClient) Update

func (*CachedChangesetsClient) UpdateAffected

type CachedChangesetsServer

type CachedChangesetsServer struct{ ChangesetsServer }

func (*CachedChangesetsServer) Create

func (*CachedChangesetsServer) CreateReview

func (*CachedChangesetsServer) Get

func (*CachedChangesetsServer) List

func (*CachedChangesetsServer) ListEvents

func (*CachedChangesetsServer) ListReviews

func (*CachedChangesetsServer) Merge

func (*CachedChangesetsServer) Update

func (*CachedChangesetsServer) UpdateAffected

type CachedDefsClient

type CachedDefsClient struct {
	DefsClient
	Cache *grpccache.Cache
}

func (*CachedDefsClient) Get

func (s *CachedDefsClient) Get(ctx context.Context, in *DefsGetOp, opts ...grpc.CallOption) (*Def, error)

func (*CachedDefsClient) List

func (s *CachedDefsClient) List(ctx context.Context, in *DefListOptions, opts ...grpc.CallOption) (*DefList, error)

func (*CachedDefsClient) ListAuthors

func (s *CachedDefsClient) ListAuthors(ctx context.Context, in *DefsListAuthorsOp, opts ...grpc.CallOption) (*DefAuthorList, error)

func (*CachedDefsClient) ListClients

func (s *CachedDefsClient) ListClients(ctx context.Context, in *DefsListClientsOp, opts ...grpc.CallOption) (*DefClientList, error)

func (*CachedDefsClient) ListExamples

func (s *CachedDefsClient) ListExamples(ctx context.Context, in *DefsListExamplesOp, opts ...grpc.CallOption) (*ExampleList, error)

func (*CachedDefsClient) ListRefs

func (s *CachedDefsClient) ListRefs(ctx context.Context, in *DefsListRefsOp, opts ...grpc.CallOption) (*RefList, error)

type CachedDefsServer

type CachedDefsServer struct{ DefsServer }

func (*CachedDefsServer) Get

func (s *CachedDefsServer) Get(ctx context.Context, in *DefsGetOp) (*Def, error)

func (*CachedDefsServer) List

func (*CachedDefsServer) ListAuthors

func (*CachedDefsServer) ListClients

func (*CachedDefsServer) ListExamples

func (s *CachedDefsServer) ListExamples(ctx context.Context, in *DefsListExamplesOp) (*ExampleList, error)

func (*CachedDefsServer) ListRefs

func (s *CachedDefsServer) ListRefs(ctx context.Context, in *DefsListRefsOp) (*RefList, error)

type CachedDeltasClient

type CachedDeltasClient struct {
	DeltasClient
	Cache *grpccache.Cache
}

func (*CachedDeltasClient) Get

func (s *CachedDeltasClient) Get(ctx context.Context, in *DeltaSpec, opts ...grpc.CallOption) (*Delta, error)

func (*CachedDeltasClient) ListAffectedAuthors

func (*CachedDeltasClient) ListAffectedClients

func (*CachedDeltasClient) ListDefs

func (s *CachedDeltasClient) ListDefs(ctx context.Context, in *DeltasListDefsOp, opts ...grpc.CallOption) (*DeltaDefs, error)

func (*CachedDeltasClient) ListFiles

func (s *CachedDeltasClient) ListFiles(ctx context.Context, in *DeltasListFilesOp, opts ...grpc.CallOption) (*DeltaFiles, error)

func (*CachedDeltasClient) ListUnits

type CachedDeltasServer

type CachedDeltasServer struct{ DeltasServer }

func (*CachedDeltasServer) Get

func (s *CachedDeltasServer) Get(ctx context.Context, in *DeltaSpec) (*Delta, error)

func (*CachedDeltasServer) ListAffectedAuthors

func (*CachedDeltasServer) ListAffectedClients

func (*CachedDeltasServer) ListDefs

func (*CachedDeltasServer) ListFiles

func (*CachedDeltasServer) ListUnits

type CachedDiscussionsClient

type CachedDiscussionsClient struct {
	DiscussionsClient
	Cache *grpccache.Cache
}

func (*CachedDiscussionsClient) Create

func (*CachedDiscussionsClient) CreateComment

func (*CachedDiscussionsClient) Get

func (*CachedDiscussionsClient) List

func (*CachedDiscussionsClient) UpdateRating

type CachedDiscussionsServer

type CachedDiscussionsServer struct{ DiscussionsServer }

func (*CachedDiscussionsServer) Create

func (*CachedDiscussionsServer) CreateComment

func (*CachedDiscussionsServer) Get

func (*CachedDiscussionsServer) List

func (*CachedDiscussionsServer) UpdateRating

type CachedGraphUplinkClient

type CachedGraphUplinkClient struct {
	GraphUplinkClient
	Cache *grpccache.Cache
}

func (*CachedGraphUplinkClient) Push

func (*CachedGraphUplinkClient) PushEvents

func (s *CachedGraphUplinkClient) PushEvents(ctx context.Context, in *UserEventList, opts ...grpc.CallOption) (*pbtypes.Void, error)

type CachedGraphUplinkServer

type CachedGraphUplinkServer struct{ GraphUplinkServer }

func (*CachedGraphUplinkServer) Push

func (*CachedGraphUplinkServer) PushEvents

type CachedMarkdownClient

type CachedMarkdownClient struct {
	MarkdownClient
	Cache *grpccache.Cache
}

func (*CachedMarkdownClient) Render

type CachedMarkdownServer

type CachedMarkdownServer struct{ MarkdownServer }

func (*CachedMarkdownServer) Render

type CachedMetaClient

type CachedMetaClient struct {
	MetaClient
	Cache *grpccache.Cache
}

func (*CachedMetaClient) Config

func (s *CachedMetaClient) Config(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*ServerConfig, error)

func (*CachedMetaClient) PubKey

func (s *CachedMetaClient) PubKey(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*ServerPubKey, error)

func (*CachedMetaClient) Status

func (s *CachedMetaClient) Status(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*ServerStatus, error)

type CachedMetaServer

type CachedMetaServer struct{ MetaServer }

func (*CachedMetaServer) Config

func (s *CachedMetaServer) Config(ctx context.Context, in *pbtypes.Void) (*ServerConfig, error)

func (*CachedMetaServer) PubKey

func (s *CachedMetaServer) PubKey(ctx context.Context, in *pbtypes.Void) (*ServerPubKey, error)

func (*CachedMetaServer) Status

func (s *CachedMetaServer) Status(ctx context.Context, in *pbtypes.Void) (*ServerStatus, error)

type CachedMirrorReposClient

type CachedMirrorReposClient struct {
	MirrorReposClient
	Cache *grpccache.Cache
}

func (*CachedMirrorReposClient) RefreshVCS

type CachedMirrorReposServer

type CachedMirrorReposServer struct{ MirrorReposServer }

func (*CachedMirrorReposServer) RefreshVCS

type CachedMirroredRepoSSHKeysClient

type CachedMirroredRepoSSHKeysClient struct {
	MirroredRepoSSHKeysClient
	Cache *grpccache.Cache
}

func (*CachedMirroredRepoSSHKeysClient) Create

func (*CachedMirroredRepoSSHKeysClient) Delete

func (*CachedMirroredRepoSSHKeysClient) Get

type CachedMirroredRepoSSHKeysServer

type CachedMirroredRepoSSHKeysServer struct{ MirroredRepoSSHKeysServer }

func (*CachedMirroredRepoSSHKeysServer) Create

func (*CachedMirroredRepoSSHKeysServer) Delete

func (*CachedMirroredRepoSSHKeysServer) Get

type CachedNotifyClient

type CachedNotifyClient struct {
	NotifyClient
	Cache *grpccache.Cache
}

func (*CachedNotifyClient) GenericEvent

func (s *CachedNotifyClient) GenericEvent(ctx context.Context, in *NotifyGenericEvent, opts ...grpc.CallOption) (*pbtypes.Void, error)

type CachedNotifyServer

type CachedNotifyServer struct{ NotifyServer }

func (*CachedNotifyServer) GenericEvent

func (s *CachedNotifyServer) GenericEvent(ctx context.Context, in *NotifyGenericEvent) (*pbtypes.Void, error)

type CachedOrgsClient

type CachedOrgsClient struct {
	OrgsClient
	Cache *grpccache.Cache
}

func (*CachedOrgsClient) Get

func (s *CachedOrgsClient) Get(ctx context.Context, in *OrgSpec, opts ...grpc.CallOption) (*Org, error)

func (*CachedOrgsClient) List

func (s *CachedOrgsClient) List(ctx context.Context, in *OrgsListOp, opts ...grpc.CallOption) (*OrgList, error)

func (*CachedOrgsClient) ListMembers

func (s *CachedOrgsClient) ListMembers(ctx context.Context, in *OrgsListMembersOp, opts ...grpc.CallOption) (*UserList, error)

type CachedOrgsServer

type CachedOrgsServer struct{ OrgsServer }

func (*CachedOrgsServer) Get

func (s *CachedOrgsServer) Get(ctx context.Context, in *OrgSpec) (*Org, error)

func (*CachedOrgsServer) List

func (s *CachedOrgsServer) List(ctx context.Context, in *OrgsListOp) (*OrgList, error)

func (*CachedOrgsServer) ListMembers

func (s *CachedOrgsServer) ListMembers(ctx context.Context, in *OrgsListMembersOp) (*UserList, error)

type CachedPeopleClient

type CachedPeopleClient struct {
	PeopleClient
	Cache *grpccache.Cache
}

func (*CachedPeopleClient) Get

func (s *CachedPeopleClient) Get(ctx context.Context, in *PersonSpec, opts ...grpc.CallOption) (*Person, error)

type CachedPeopleServer

type CachedPeopleServer struct{ PeopleServer }

func (*CachedPeopleServer) Get

type CachedRegisteredClientsClient

type CachedRegisteredClientsClient struct {
	RegisteredClientsClient
	Cache *grpccache.Cache
}

func (*CachedRegisteredClientsClient) Create

func (*CachedRegisteredClientsClient) Delete

func (*CachedRegisteredClientsClient) Get

func (*CachedRegisteredClientsClient) GetCurrent

func (*CachedRegisteredClientsClient) GetUserPermissions

func (*CachedRegisteredClientsClient) List

func (*CachedRegisteredClientsClient) ListUserPermissions

func (*CachedRegisteredClientsClient) SetUserPermissions

func (s *CachedRegisteredClientsClient) SetUserPermissions(ctx context.Context, in *UserPermissions, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedRegisteredClientsClient) Update

type CachedRegisteredClientsServer

type CachedRegisteredClientsServer struct{ RegisteredClientsServer }

func (*CachedRegisteredClientsServer) Create

func (*CachedRegisteredClientsServer) Delete

func (*CachedRegisteredClientsServer) Get

func (*CachedRegisteredClientsServer) GetCurrent

func (*CachedRegisteredClientsServer) GetUserPermissions

func (*CachedRegisteredClientsServer) List

func (*CachedRegisteredClientsServer) ListUserPermissions

func (*CachedRegisteredClientsServer) SetUserPermissions

func (s *CachedRegisteredClientsServer) SetUserPermissions(ctx context.Context, in *UserPermissions) (*pbtypes.Void, error)

func (*CachedRegisteredClientsServer) Update

type CachedRepoBadgesClient

type CachedRepoBadgesClient struct {
	RepoBadgesClient
	Cache *grpccache.Cache
}

func (*CachedRepoBadgesClient) CountHits

func (*CachedRepoBadgesClient) ListBadges

func (s *CachedRepoBadgesClient) ListBadges(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*BadgeList, error)

func (*CachedRepoBadgesClient) ListCounters

func (s *CachedRepoBadgesClient) ListCounters(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*CounterList, error)

func (*CachedRepoBadgesClient) RecordHit

func (s *CachedRepoBadgesClient) RecordHit(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes.Void, error)

type CachedRepoBadgesServer

type CachedRepoBadgesServer struct{ RepoBadgesServer }

func (*CachedRepoBadgesServer) CountHits

func (*CachedRepoBadgesServer) ListBadges

func (s *CachedRepoBadgesServer) ListBadges(ctx context.Context, in *RepoSpec) (*BadgeList, error)

func (*CachedRepoBadgesServer) ListCounters

func (s *CachedRepoBadgesServer) ListCounters(ctx context.Context, in *RepoSpec) (*CounterList, error)

func (*CachedRepoBadgesServer) RecordHit

func (s *CachedRepoBadgesServer) RecordHit(ctx context.Context, in *RepoSpec) (*pbtypes.Void, error)

type CachedRepoStatusesClient

type CachedRepoStatusesClient struct {
	RepoStatusesClient
	Cache *grpccache.Cache
}

func (*CachedRepoStatusesClient) Create

func (*CachedRepoStatusesClient) GetCombined

type CachedRepoStatusesServer

type CachedRepoStatusesServer struct{ RepoStatusesServer }

func (*CachedRepoStatusesServer) Create

func (*CachedRepoStatusesServer) GetCombined

type CachedRepoTreeClient

type CachedRepoTreeClient struct {
	RepoTreeClient
	Cache *grpccache.Cache
}

func (*CachedRepoTreeClient) Get

func (*CachedRepoTreeClient) List

func (*CachedRepoTreeClient) Search

type CachedRepoTreeServer

type CachedRepoTreeServer struct{ RepoTreeServer }

func (*CachedRepoTreeServer) Get

func (*CachedRepoTreeServer) List

func (*CachedRepoTreeServer) Search

type CachedReposClient

type CachedReposClient struct {
	ReposClient
	Cache *grpccache.Cache
}

func (*CachedReposClient) Create

func (s *CachedReposClient) Create(ctx context.Context, in *ReposCreateOp, opts ...grpc.CallOption) (*Repo, error)

func (*CachedReposClient) Delete

func (s *CachedReposClient) Delete(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedReposClient) Disable

func (s *CachedReposClient) Disable(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedReposClient) Enable

func (s *CachedReposClient) Enable(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedReposClient) Get

func (s *CachedReposClient) Get(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*Repo, error)

func (*CachedReposClient) GetCommit

func (s *CachedReposClient) GetCommit(ctx context.Context, in *RepoRevSpec, opts ...grpc.CallOption) (*vcs.Commit, error)

func (*CachedReposClient) GetConfig

func (s *CachedReposClient) GetConfig(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*RepoConfig, error)

func (*CachedReposClient) GetReadme

func (s *CachedReposClient) GetReadme(ctx context.Context, in *RepoRevSpec, opts ...grpc.CallOption) (*Readme, error)

func (*CachedReposClient) List

func (*CachedReposClient) ListBranches

func (s *CachedReposClient) ListBranches(ctx context.Context, in *ReposListBranchesOp, opts ...grpc.CallOption) (*BranchList, error)

func (*CachedReposClient) ListCommits

func (s *CachedReposClient) ListCommits(ctx context.Context, in *ReposListCommitsOp, opts ...grpc.CallOption) (*CommitList, error)

func (*CachedReposClient) ListCommitters

func (s *CachedReposClient) ListCommitters(ctx context.Context, in *ReposListCommittersOp, opts ...grpc.CallOption) (*CommitterList, error)

func (*CachedReposClient) ListTags

func (s *CachedReposClient) ListTags(ctx context.Context, in *ReposListTagsOp, opts ...grpc.CallOption) (*TagList, error)

func (*CachedReposClient) Update

func (s *CachedReposClient) Update(ctx context.Context, in *ReposUpdateOp, opts ...grpc.CallOption) (*Repo, error)

type CachedReposServer

type CachedReposServer struct{ ReposServer }

func (*CachedReposServer) Create

func (s *CachedReposServer) Create(ctx context.Context, in *ReposCreateOp) (*Repo, error)

func (*CachedReposServer) Delete

func (s *CachedReposServer) Delete(ctx context.Context, in *RepoSpec) (*pbtypes.Void, error)

func (*CachedReposServer) Disable

func (s *CachedReposServer) Disable(ctx context.Context, in *RepoSpec) (*pbtypes.Void, error)

func (*CachedReposServer) Enable

func (s *CachedReposServer) Enable(ctx context.Context, in *RepoSpec) (*pbtypes.Void, error)

func (*CachedReposServer) Get

func (s *CachedReposServer) Get(ctx context.Context, in *RepoSpec) (*Repo, error)

func (*CachedReposServer) GetCommit

func (s *CachedReposServer) GetCommit(ctx context.Context, in *RepoRevSpec) (*vcs.Commit, error)

func (*CachedReposServer) GetConfig

func (s *CachedReposServer) GetConfig(ctx context.Context, in *RepoSpec) (*RepoConfig, error)

func (*CachedReposServer) GetReadme

func (s *CachedReposServer) GetReadme(ctx context.Context, in *RepoRevSpec) (*Readme, error)

func (*CachedReposServer) List

func (*CachedReposServer) ListBranches

func (s *CachedReposServer) ListBranches(ctx context.Context, in *ReposListBranchesOp) (*BranchList, error)

func (*CachedReposServer) ListCommits

func (s *CachedReposServer) ListCommits(ctx context.Context, in *ReposListCommitsOp) (*CommitList, error)

func (*CachedReposServer) ListCommitters

func (*CachedReposServer) ListTags

func (s *CachedReposServer) ListTags(ctx context.Context, in *ReposListTagsOp) (*TagList, error)

func (*CachedReposServer) Update

func (s *CachedReposServer) Update(ctx context.Context, in *ReposUpdateOp) (*Repo, error)

type CachedSearchClient

type CachedSearchClient struct {
	SearchClient
	Cache *grpccache.Cache
}

func (*CachedSearchClient) Complete

func (s *CachedSearchClient) Complete(ctx context.Context, in *RawQuery, opts ...grpc.CallOption) (*Completions, error)

func (*CachedSearchClient) Search

func (*CachedSearchClient) SearchText

func (*CachedSearchClient) SearchTokens

func (s *CachedSearchClient) SearchTokens(ctx context.Context, in *TokenSearchOptions, opts ...grpc.CallOption) (*DefList, error)

func (*CachedSearchClient) Suggest

func (s *CachedSearchClient) Suggest(ctx context.Context, in *RawQuery, opts ...grpc.CallOption) (*SuggestionList, error)

type CachedSearchServer

type CachedSearchServer struct{ SearchServer }

func (*CachedSearchServer) Complete

func (s *CachedSearchServer) Complete(ctx context.Context, in *RawQuery) (*Completions, error)

func (*CachedSearchServer) Search

func (*CachedSearchServer) SearchText

func (*CachedSearchServer) SearchTokens

func (s *CachedSearchServer) SearchTokens(ctx context.Context, in *TokenSearchOptions) (*DefList, error)

func (*CachedSearchServer) Suggest

type CachedStorageClient

type CachedStorageClient struct {
	StorageClient
	Cache *grpccache.Cache
}

func (*CachedStorageClient) Close

func (*CachedStorageClient) Create

func (*CachedStorageClient) Read

func (*CachedStorageClient) ReadDir

func (*CachedStorageClient) RemoveAll

func (s *CachedStorageClient) RemoveAll(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageError, error)

func (*CachedStorageClient) Stat

func (*CachedStorageClient) Write

type CachedStorageServer

type CachedStorageServer struct{ StorageServer }

func (*CachedStorageServer) Close

func (*CachedStorageServer) Create

func (*CachedStorageServer) Read

func (*CachedStorageServer) ReadDir

func (*CachedStorageServer) RemoveAll

func (s *CachedStorageServer) RemoveAll(ctx context.Context, in *StorageName) (*StorageError, error)

func (*CachedStorageServer) Stat

func (*CachedStorageServer) Write

type CachedUnitsClient

type CachedUnitsClient struct {
	UnitsClient
	Cache *grpccache.Cache
}

func (*CachedUnitsClient) Get

func (*CachedUnitsClient) List

type CachedUnitsServer

type CachedUnitsServer struct{ UnitsServer }

func (*CachedUnitsServer) Get

func (*CachedUnitsServer) List

type CachedUserKeysClient

type CachedUserKeysClient struct {
	UserKeysClient
	Cache *grpccache.Cache
}

func (*CachedUserKeysClient) AddKey

func (*CachedUserKeysClient) DeleteKey

func (s *CachedUserKeysClient) DeleteKey(ctx context.Context, in *pbtypes.Void, opts ...grpc.CallOption) (*pbtypes.Void, error)

func (*CachedUserKeysClient) LookupUser

func (s *CachedUserKeysClient) LookupUser(ctx context.Context, in *SSHPublicKey, opts ...grpc.CallOption) (*UserSpec, error)

type CachedUserKeysServer

type CachedUserKeysServer struct{ UserKeysServer }

func (*CachedUserKeysServer) AddKey

func (*CachedUserKeysServer) DeleteKey

func (s *CachedUserKeysServer) DeleteKey(ctx context.Context, in *pbtypes.Void) (*pbtypes.Void, error)

func (*CachedUserKeysServer) LookupUser

func (s *CachedUserKeysServer) LookupUser(ctx context.Context, in *SSHPublicKey) (*UserSpec, error)

type CachedUsersClient

type CachedUsersClient struct {
	UsersClient
	Cache *grpccache.Cache
}

func (*CachedUsersClient) Get

func (s *CachedUsersClient) Get(ctx context.Context, in *UserSpec, opts ...grpc.CallOption) (*User, error)

func (*CachedUsersClient) GetWithEmail

func (s *CachedUsersClient) GetWithEmail(ctx context.Context, in *EmailAddr, opts ...grpc.CallOption) (*User, error)

func (*CachedUsersClient) List

func (*CachedUsersClient) ListEmails

func (s *CachedUsersClient) ListEmails(ctx context.Context, in *UserSpec, opts ...grpc.CallOption) (*EmailAddrList, error)

type CachedUsersServer

type CachedUsersServer struct{ UsersServer }

func (*CachedUsersServer) Get

func (s *CachedUsersServer) Get(ctx context.Context, in *UserSpec) (*User, error)

func (*CachedUsersServer) GetWithEmail

func (s *CachedUsersServer) GetWithEmail(ctx context.Context, in *EmailAddr) (*User, error)

func (*CachedUsersServer) List

func (*CachedUsersServer) ListEmails

func (s *CachedUsersServer) ListEmails(ctx context.Context, in *UserSpec) (*EmailAddrList, error)

type Changeset

type Changeset struct {
	// ID is the unique identifier for this changeset, relative to the repository
	// that contains it.
	ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Title holds a summary about this changeset.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Description holds the description for this changeset.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Author is the user that initiated this changeset.
	Author UserSpec `protobuf:"bytes,4,opt,name=author" json:"author"`
	// DeltaSpec contains information about the base and head spec for this
	// changeset.
	DeltaSpec *DeltaSpec `protobuf:"bytes,5,opt,name=delta_spec" json:"delta_spec,omitempty"`
	// Merged specifies whether this changeset was merged.
	Merged bool `protobuf:"varint,6,opt,name=merged,proto3" json:"merged,omitempty"`
	// CreatedAt holds the creation time of this changeset.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,7,opt,name=created_at" json:"created_at,omitempty"`
	// ClosedAt holds the time when this changeset was closed or merged.
	ClosedAt *pbtypes.Timestamp `protobuf:"bytes,8,opt,name=closed_at" json:"closed_at,omitempty"`
}

Changeset stores information about a changeset.

func (*Changeset) ProtoMessage

func (*Changeset) ProtoMessage()

func (*Changeset) Reset

func (m *Changeset) Reset()

func (*Changeset) String

func (m *Changeset) String() string

type ChangesetCreateOp

type ChangesetCreateOp struct {
	Repo      RepoSpec   `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Changeset *Changeset `protobuf:"bytes,2,opt,name=changeset" json:"changeset,omitempty"`
}

func (*ChangesetCreateOp) ProtoMessage

func (*ChangesetCreateOp) ProtoMessage()

func (*ChangesetCreateOp) Reset

func (m *ChangesetCreateOp) Reset()

func (*ChangesetCreateOp) String

func (m *ChangesetCreateOp) String() string

type ChangesetCreateReviewOp

type ChangesetCreateReviewOp struct {
	Repo        RepoSpec         `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	ChangesetID int64            `protobuf:"varint,2,opt,name=changeset_id,proto3" json:"changeset_id,omitempty"`
	Review      *ChangesetReview `protobuf:"bytes,3,opt,name=review" json:"review,omitempty"`
}

func (*ChangesetCreateReviewOp) ProtoMessage

func (*ChangesetCreateReviewOp) ProtoMessage()

func (*ChangesetCreateReviewOp) Reset

func (m *ChangesetCreateReviewOp) Reset()

func (*ChangesetCreateReviewOp) String

func (m *ChangesetCreateReviewOp) String() string

type ChangesetEvent

type ChangesetEvent struct {
	// Before holds the changeset as it was before the event.
	Before *Changeset `protobuf:"bytes,2,opt,name=before" json:"before,omitempty"`
	// After holds the changeset as it became after the event.
	After *Changeset `protobuf:"bytes,3,opt,name=after" json:"after,omitempty"`
	// Op holds the update operation that changed the state.
	Op *ChangesetUpdateOp `protobuf:"bytes,4,opt,name=op" json:"op,omitempty"`
	// CreatedAt is the date at which the event was created.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,5,opt,name=created_at" json:"created_at,omitempty"`
}

ChangesetEvent holds information about an update that occurred on the properties of a Changeset.

func (*ChangesetEvent) ProtoMessage

func (*ChangesetEvent) ProtoMessage()

func (*ChangesetEvent) Reset

func (m *ChangesetEvent) Reset()

func (*ChangesetEvent) String

func (m *ChangesetEvent) String() string

type ChangesetEventList

type ChangesetEventList struct {
	Events []*ChangesetEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
}

func (*ChangesetEventList) ProtoMessage

func (*ChangesetEventList) ProtoMessage()

func (*ChangesetEventList) Reset

func (m *ChangesetEventList) Reset()

func (*ChangesetEventList) String

func (m *ChangesetEventList) String() string

type ChangesetList

type ChangesetList struct {
	Changesets []*Changeset `protobuf:"bytes,1,rep,name=changesets" json:"changesets,omitempty"`
}

func (*ChangesetList) ProtoMessage

func (*ChangesetList) ProtoMessage()

func (*ChangesetList) Reset

func (m *ChangesetList) Reset()

func (*ChangesetList) String

func (m *ChangesetList) String() string

type ChangesetListOp

type ChangesetListOp struct {
	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	// Open, when true, will only return open changesets.
	Open bool `protobuf:"varint,2,opt,name=open,proto3" json:"open,omitempty"`
	// Closed, when true, will only return closed changeset.
	Closed bool `protobuf:"varint,3,opt,name=closed,proto3" json:"closed,omitempty"`
	// Head, if set, will restrict the returned list to only changesets
	// that have this branch as head.
	Head string `protobuf:"bytes,4,opt,name=head,proto3" json:"head,omitempty"`
	// Base, when set, will restrict the list to changesets that have this
	// branch as a base.
	Base        string `protobuf:"bytes,5,opt,name=base,proto3" json:"base,omitempty"`
	ListOptions `protobuf:"bytes,11,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*ChangesetListOp) ProtoMessage

func (*ChangesetListOp) ProtoMessage()

func (*ChangesetListOp) Reset

func (m *ChangesetListOp) Reset()

func (*ChangesetListOp) String

func (m *ChangesetListOp) String() string

type ChangesetListReviewsOp

type ChangesetListReviewsOp struct {
	Repo        RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	ChangesetID int64    `protobuf:"varint,2,opt,name=changeset_id,proto3" json:"changeset_id,omitempty"`
}

func (*ChangesetListReviewsOp) ProtoMessage

func (*ChangesetListReviewsOp) ProtoMessage()

func (*ChangesetListReviewsOp) Reset

func (m *ChangesetListReviewsOp) Reset()

func (*ChangesetListReviewsOp) String

func (m *ChangesetListReviewsOp) String() string

type ChangesetMergeOp

type ChangesetMergeOp struct {
	// Repo holds the RepoSpec where the Changeset to be merged is located.
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	// ID holds the ID of the changeset that is to be merged.
	ID int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// Message is a text template used to generate a message for the commit of
	// the resulting merge operation. Any of the fields from the changeset are
	// available to use in the template.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// Squash, if true, will squash the commits of the head branch into a
	// single commit prior to merging.
	Squash bool `protobuf:"varint,4,opt,name=squash,proto3" json:"squash,omitempty"`
}

func (*ChangesetMergeOp) ProtoMessage

func (*ChangesetMergeOp) ProtoMessage()

func (*ChangesetMergeOp) Reset

func (m *ChangesetMergeOp) Reset()

func (*ChangesetMergeOp) String

func (m *ChangesetMergeOp) String() string

type ChangesetReview

type ChangesetReview struct {
	// ID holds the unique identifier (with reference to the changeset) of the
	// review.
	ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Body holds the text description of the review.
	Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// Author is the spec of the user that submitted this review.
	Author UserSpec `protobuf:"bytes,3,opt,name=author" json:"author"`
	// CreatedAt is the date at which this review was submitted.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,4,opt,name=created_at" json:"created_at,omitempty"`
	// EditedAt is the last time at which this review was edited. If the review
	// has never been edited, this value will be nil.
	EditedAt *pbtypes.Timestamp `protobuf:"bytes,5,opt,name=edited_at" json:"edited_at,omitempty"`
	// Comments holds any inline comments that were submitted along with this
	// review.
	Comments []*InlineComment `protobuf:"bytes,6,rep,name=comments" json:"comments,omitempty"`
	// Deleted specifies whether this review has been removed.
	Deleted bool `protobuf:"varint,7,opt,name=deleted,proto3" json:"deleted,omitempty"`
}

ChangesetReview contains information about a review submitted on a changeset.

func (*ChangesetReview) ProtoMessage

func (*ChangesetReview) ProtoMessage()

func (*ChangesetReview) Reset

func (m *ChangesetReview) Reset()

func (*ChangesetReview) String

func (m *ChangesetReview) String() string

type ChangesetReviewList

type ChangesetReviewList struct {
	Reviews []*ChangesetReview `protobuf:"bytes,1,rep,name=reviews" json:"reviews,omitempty"`
}

func (*ChangesetReviewList) ProtoMessage

func (*ChangesetReviewList) ProtoMessage()

func (*ChangesetReviewList) Reset

func (m *ChangesetReviewList) Reset()

func (*ChangesetReviewList) String

func (m *ChangesetReviewList) String() string

type ChangesetSpec

type ChangesetSpec struct {
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	ID   int64    `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (*ChangesetSpec) ProtoMessage

func (*ChangesetSpec) ProtoMessage()

func (*ChangesetSpec) Reset

func (m *ChangesetSpec) Reset()

func (*ChangesetSpec) String

func (m *ChangesetSpec) String() string

type ChangesetUpdateAffectedOp

type ChangesetUpdateAffectedOp struct {
	// Repo holds the RepoSpec which received a commit.
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	// Branch is the name of the branch which was pushed to.
	Branch string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
	// Last is the SHA1 of the last commit on the branch.
	Last string `protobuf:"bytes,3,opt,name=last,proto3" json:"last,omitempty"`
	// Commit is the SHA1 of the tip of the newly pushed commits on the branch.
	Commit string `protobuf:"bytes,4,opt,name=commit,proto3" json:"commit,omitempty"`
}

func (*ChangesetUpdateAffectedOp) ProtoMessage

func (*ChangesetUpdateAffectedOp) ProtoMessage()

func (*ChangesetUpdateAffectedOp) Reset

func (m *ChangesetUpdateAffectedOp) Reset()

func (*ChangesetUpdateAffectedOp) String

func (m *ChangesetUpdateAffectedOp) String() string

type ChangesetUpdateOp

type ChangesetUpdateOp struct {
	// Repo holds the RepoSpec where the Changeset to be updated is located.
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	// ID holds the ID of the changeset that is to be updated.
	ID int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// Title, if non-empty, will be set as the new title of the changeset.
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// Description, if specified, will become the new description of the changeset.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Open, if true, will set the changeset's ClosedAt value to nil.
	Open bool `protobuf:"varint,5,opt,name=open,proto3" json:"open,omitempty"`
	// Close, if true, will set the ClosedAt date.
	Close bool `protobuf:"varint,6,opt,name=close,proto3" json:"close,omitempty"`
	// Merged, if true, will update the changeset to indicate that it was priorly
	// merged.
	Merged bool `protobuf:"varint,7,opt,name=merged,proto3" json:"merged,omitempty"`
	// Author is the user that initiated this event.
	Author UserSpec `protobuf:"bytes,8,opt,name=Author" json:"Author"`
}

func (*ChangesetUpdateOp) ProtoMessage

func (*ChangesetUpdateOp) ProtoMessage()

func (*ChangesetUpdateOp) Reset

func (m *ChangesetUpdateOp) Reset()

func (*ChangesetUpdateOp) String

func (m *ChangesetUpdateOp) String() string

type ChangesetsClient

type ChangesetsClient interface {
	// Create creates a new Changeset and returns it, populating
	// its fields, such as ID and CreatedAt.
	Create(ctx context.Context, in *ChangesetCreateOp, opts ...grpc.CallOption) (*Changeset, error)
	// Get returns the changeset by RepoSpec and ID.
	Get(ctx context.Context, in *ChangesetSpec, opts ...grpc.CallOption) (*Changeset, error)
	// List lists changesets for a repository.
	List(ctx context.Context, in *ChangesetListOp, opts ...grpc.CallOption) (*ChangesetList, error)
	// Update updates a changeset's fields and returns the
	// update event. If no update occurred, it returns nil.
	Update(ctx context.Context, in *ChangesetUpdateOp, opts ...grpc.CallOption) (*ChangesetEvent, error)
	// Merge merges the head branch of a changeset into its base branch and
	// pushes the resulting merged base. It returns the resulting update event.
	// If no merge occurred, it returns nil.
	Merge(ctx context.Context, in *ChangesetMergeOp, opts ...grpc.CallOption) (*ChangesetEvent, error)
	// UpdateAffected updates all changesets which may be affected
	// by new commits to a branch and returns the list of update
	// events for all affected changesets.
	UpdateAffected(ctx context.Context, in *ChangesetUpdateAffectedOp, opts ...grpc.CallOption) (*ChangesetEventList, error)
	// CreateReview creates a new Review and returns it, populating
	// its fields, such as ID and CreatedAt.
	CreateReview(ctx context.Context, in *ChangesetCreateReviewOp, opts ...grpc.CallOption) (*ChangesetReview, error)
	// ListReviews returns all reviews for a given changeset.
	ListReviews(ctx context.Context, in *ChangesetListReviewsOp, opts ...grpc.CallOption) (*ChangesetReviewList, error)
	// ListEvents returns all the events that occurred on a given changeset.
	ListEvents(ctx context.Context, in *ChangesetSpec, opts ...grpc.CallOption) (*ChangesetEventList, error)
}

func NewChangesetsClient

func NewChangesetsClient(cc *grpc.ClientConn) ChangesetsClient

type ChangesetsServer

type ChangesetsServer interface {
	// Create creates a new Changeset and returns it, populating
	// its fields, such as ID and CreatedAt.
	Create(context.Context, *ChangesetCreateOp) (*Changeset, error)
	// Get returns the changeset by RepoSpec and ID.
	Get(context.Context, *ChangesetSpec) (*Changeset, error)
	// List lists changesets for a repository.
	List(context.Context, *ChangesetListOp) (*ChangesetList, error)
	// Update updates a changeset's fields and returns the
	// update event. If no update occurred, it returns nil.
	Update(context.Context, *ChangesetUpdateOp) (*ChangesetEvent, error)
	// Merge merges the head branch of a changeset into its base branch and
	// pushes the resulting merged base. It returns the resulting update event.
	// If no merge occurred, it returns nil.
	Merge(context.Context, *ChangesetMergeOp) (*ChangesetEvent, error)
	// UpdateAffected updates all changesets which may be affected
	// by new commits to a branch and returns the list of update
	// events for all affected changesets.
	UpdateAffected(context.Context, *ChangesetUpdateAffectedOp) (*ChangesetEventList, error)
	// CreateReview creates a new Review and returns it, populating
	// its fields, such as ID and CreatedAt.
	CreateReview(context.Context, *ChangesetCreateReviewOp) (*ChangesetReview, error)
	// ListReviews returns all reviews for a given changeset.
	ListReviews(context.Context, *ChangesetListReviewsOp) (*ChangesetReviewList, error)
	// ListEvents returns all the events that occurred on a given changeset.
	ListEvents(context.Context, *ChangesetSpec) (*ChangesetEventList, error)
}

type Checklist

type Checklist struct {
	// number of tasks to be done (unchecked)
	Todo int32 `protobuf:"varint,1,opt,name=todo,proto3" json:"todo,omitempty"`
	// number of tasks that are done (checked)
	Done int32 `protobuf:"varint,2,opt,name=done,proto3" json:"done,omitempty"`
}

func (*Checklist) ProtoMessage

func (*Checklist) ProtoMessage()

func (*Checklist) Reset

func (m *Checklist) Reset()

func (*Checklist) String

func (m *Checklist) String() string

type Client

type Client struct {
	// Services used to communicate with different parts of the Sourcegraph API.
	Accounts            AccountsClient
	Auth                AuthClient
	Builds              BuildsClient
	Defs                DefsClient
	Deltas              DeltasClient
	Discussions         DiscussionsClient
	GraphUplink         GraphUplinkClient
	Markdown            MarkdownClient
	Meta                MetaClient
	MirrorRepos         MirrorReposClient
	MirroredRepoSSHKeys MirroredRepoSSHKeysClient
	Notify              NotifyClient
	Orgs                OrgsClient
	People              PeopleClient
	RegisteredClients   RegisteredClientsClient
	RepoBadges          RepoBadgesClient
	RepoStatuses        RepoStatusesClient
	RepoTree            RepoTreeClient
	Repos               ReposClient
	Storage             StorageClient
	Changesets          ChangesetsClient
	Search              SearchClient
	Units               UnitsClient
	Users               UsersClient
	UserKeys            UserKeysClient

	// gRPC client connection used to communicate with the Sourcegraph
	// API.
	Conn *grpc.ClientConn
}

A Client communicates with the Sourcegraph API. All communication is done using gRPC over HTTP/2.

func NewClient

func NewClient(conn *grpc.ClientConn) *Client

NewClient returns a Sourcegraph API client.

func NewClientFromContext

func NewClientFromContext(ctx context.Context) *Client

NewClientFromContext returns a Sourcegraph API client that communicates with the Sourcegraph gRPC endpoint in ctx (i.e., GRPCEndpoint(ctx)).

type CombinedStatus

type CombinedStatus struct {
	// Rev is the revision that this status describes. It is set mutually exclusive with CommitID.
	Rev string `protobuf:"bytes,4,opt,name=rev,proto3" json:"rev,omitempty"`
	// CommitID is the full commit ID of the commit this status describes. It is set mutually exclusively with Rev.
	CommitID string `protobuf:"bytes,1,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	// State is the combined status of the repository. Possible values are: failure,
	// pending, or success.
	State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// Statuses are the statuses for each context.
	Statuses []*RepoStatus `protobuf:"bytes,3,rep,name=statuses" json:"statuses,omitempty"`
}

CombinedStatus is the combined status (i.e., incorporating statuses from all contexts) of the repository at a specific rev.

func (*CombinedStatus) ProtoMessage

func (*CombinedStatus) ProtoMessage()

func (*CombinedStatus) Reset

func (m *CombinedStatus) Reset()

func (*CombinedStatus) String

func (m *CombinedStatus) String() string

type CommitList

type CommitList struct {
	Commits        []*vcs.Commit `protobuf:"bytes,1,rep,name=commits" json:"commits,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*CommitList) ProtoMessage

func (*CommitList) ProtoMessage()

func (*CommitList) Reset

func (m *CommitList) Reset()

func (*CommitList) String

func (m *CommitList) String() string

type CommitterList

type CommitterList struct {
	Committers     []*vcs.Committer `protobuf:"bytes,1,rep,name=committers" json:"committers,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*CommitterList) ProtoMessage

func (*CommitterList) ProtoMessage()

func (*CommitterList) Reset

func (m *CommitterList) Reset()

func (*CommitterList) String

func (m *CommitterList) String() string

type Completions

type Completions struct {
	// TokenCompletions are suggested completions for the token at the raw query's
	// InsertionPoint.
	TokenCompletions []PBToken `protobuf:"bytes,1,rep,name=token_completions" json:"token_completions"`
	// ResolvedTokens is the resolution of the original query's tokens used to produce
	// the completions. It is useful for debugging.
	ResolvedTokens  []PBToken    `protobuf:"bytes,2,rep,name=resolved_tokens" json:"resolved_tokens"`
	ResolveErrors   []TokenError `protobuf:"bytes,3,rep,name=resolve_errors" json:"resolve_errors"`
	ResolutionFatal bool         `protobuf:"varint,4,opt,name=resolution_fatal,proto3" json:"resolution_fatal,omitempty"`
}

Completions holds search query completions.

func (*Completions) ProtoMessage

func (*Completions) ProtoMessage()

func (*Completions) Reset

func (m *Completions) Reset()

func (*Completions) String

func (m *Completions) String() string

type Counter

type Counter struct {
	Name              string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	ImageURL          string `protobuf:"bytes,3,opt,name=image_url,proto3" json:"image_url,omitempty"`
	UncountedImageURL string `protobuf:"bytes,4,opt,name=uncounted_image_url,proto3" json:"uncounted_image_url,omitempty"`
	Markdown          string `protobuf:"bytes,5,opt,name=markdown,proto3" json:"markdown,omitempty"`
}

func (*Counter) HTML

func (c *Counter) HTML() string

func (*Counter) ProtoMessage

func (*Counter) ProtoMessage()

func (*Counter) Reset

func (m *Counter) Reset()

func (*Counter) String

func (m *Counter) String() string

type CounterList

type CounterList struct {
	Counters []*Counter `protobuf:"bytes,1,rep,name=counters" json:"counters,omitempty"`
}

func (*CounterList) ProtoMessage

func (*CounterList) ProtoMessage()

func (*CounterList) Reset

func (m *CounterList) Reset()

func (*CounterList) String

func (m *CounterList) String() string

type Credentials

type Credentials interface {
	oauth2.TokenSource
}

Credentials authenticate gRPC requests made by an API client.

func CredentialsFromContext

func CredentialsFromContext(ctx context.Context) Credentials

CredentialsFromContext returns the credentials (if any) previously set in the context by WithCredentials.

type Def

type Def struct {
	graph.Def  `protobuf:"bytes,1,opt,name=def,embedded=def" json:""`
	DocHTML    *pbtypes2.HTML          `protobuf:"bytes,2,opt,name=doc_html" json:"doc_html,omitempty"`
	FmtStrings *graph.DefFormatStrings `protobuf:"bytes,3,opt,name=fmt_strings" json:"fmt_strings,omitempty"`
}

Def is a code def returned by the Sourcegraph API.

func (*Def) DefSpec

func (s *Def) DefSpec() DefSpec

DefSpec returns the DefSpec that specifies s.

func (*Def) ProtoMessage

func (*Def) ProtoMessage()

func (*Def) Reset

func (m *Def) Reset()

func (*Def) String

func (m *Def) String() string

type DefAuthor

type DefAuthor struct {
	UID           int32  `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Email         string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	DefAuthorship `protobuf:"bytes,3,opt,name=def_authorship,embedded=def_authorship" json:"def_authorship"`
}

func (*DefAuthor) ProtoMessage

func (*DefAuthor) ProtoMessage()

func (*DefAuthor) Reset

func (m *DefAuthor) Reset()

func (*DefAuthor) String

func (m *DefAuthor) String() string

type DefAuthorList

type DefAuthorList struct {
	DefAuthors []*DefAuthor `protobuf:"bytes,1,rep,name=def_authors" json:"def_authors,omitempty"`
}

func (*DefAuthorList) ProtoMessage

func (*DefAuthorList) ProtoMessage()

func (*DefAuthorList) Reset

func (m *DefAuthorList) Reset()

func (*DefAuthorList) String

func (m *DefAuthorList) String() string

type DefAuthorsByBytes

type DefAuthorsByBytes []*DefAuthor

func (DefAuthorsByBytes) Len

func (v DefAuthorsByBytes) Len() int

func (DefAuthorsByBytes) Less

func (v DefAuthorsByBytes) Less(i, j int) bool

func (DefAuthorsByBytes) Swap

func (v DefAuthorsByBytes) Swap(i, j int)

type DefAuthorship

type DefAuthorship struct {
	AuthorshipInfo `protobuf:"bytes,1,opt,name=authorship_info,embedded=authorship_info" json:"authorship_info"`
	// Exported is whether the def is exported.
	Exported        bool    `protobuf:"varint,2,opt,name=exported,proto3" json:"exported,omitempty"`
	Bytes           int32   `protobuf:"varint,3,opt,name=bytes,proto3" json:"bytes,omitempty"`
	BytesProportion float64 `protobuf:"fixed64,4,opt,name=bytes_proportion,proto3" json:"bytes_proportion,omitempty"`
}

func (*DefAuthorship) ProtoMessage

func (*DefAuthorship) ProtoMessage()

func (*DefAuthorship) Reset

func (m *DefAuthorship) Reset()

func (*DefAuthorship) String

func (m *DefAuthorship) String() string

type DefClient

type DefClient struct {
	UID            int32  `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Email          string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	AuthorshipInfo `protobuf:"bytes,3,opt,name=authorship_info,embedded=authorship_info" json:"authorship_info"`
	// UseCount is the number of times this person referred to the def.
	UseCount int32 `protobuf:"varint,4,opt,name=use_count,proto3" json:"use_count,omitempty"`
}

func (*DefClient) ProtoMessage

func (*DefClient) ProtoMessage()

func (*DefClient) Reset

func (m *DefClient) Reset()

func (*DefClient) String

func (m *DefClient) String() string

type DefClientList

type DefClientList struct {
	DefClients []*DefClient `protobuf:"bytes,1,rep,name=def_clients" json:"def_clients,omitempty"`
}

func (*DefClientList) ProtoMessage

func (*DefClientList) ProtoMessage()

func (*DefClientList) Reset

func (m *DefClientList) Reset()

func (*DefClientList) String

func (m *DefClientList) String() string

type DefDelta

type DefDelta struct {
	// the def in the base commit (if nil, this def was added in the head)
	Base *Def `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
	// the def in the head commit (if nil, this def was deleted in the head)
	Head *Def `protobuf:"bytes,2,opt,name=head" json:"head,omitempty"`
}

A DefDelta represents a single definition that was changed. It has fields for the before (Base) and after (Head) versions. If both Base and Head are non-nil, then the def was changed from base to head. Otherwise, one of the fields being nil means that the def did not exist in that revision (e.g., it was added or deleted from base to head).

func (DefDelta) Added

func (dd DefDelta) Added() bool

Added is whether this represents an added def (not present in base, present in head).

func (DefDelta) Changed

func (dd DefDelta) Changed() bool

Changed is whether this represents a changed def (present in base, present in head).

func (DefDelta) Deleted

func (dd DefDelta) Deleted() bool

Deleted is whether this represents a deleted def (present in base, not present in head).

func (*DefDelta) ProtoMessage

func (*DefDelta) ProtoMessage()

func (*DefDelta) Reset

func (m *DefDelta) Reset()

func (*DefDelta) String

func (m *DefDelta) String() string

type DefGetOptions

type DefGetOptions struct {
	Doc bool `protobuf:"varint,1,opt,name=doc,proto3" json:"doc,omitempty" url:",omitempty"`
}

DefGetOptions specifies options for DefsService.Get.

func (*DefGetOptions) ProtoMessage

func (*DefGetOptions) ProtoMessage()

func (*DefGetOptions) Reset

func (m *DefGetOptions) Reset()

func (*DefGetOptions) String

func (m *DefGetOptions) String() string

type DefList

type DefList struct {
	Defs         []*Def `protobuf:"bytes,1,rep,name=defs" json:"defs,omitempty"`
	ListResponse `protobuf:"bytes,2,opt,name=list_response,embedded=list_response" json:"list_response"`
}

func (*DefList) ProtoMessage

func (*DefList) ProtoMessage()

func (*DefList) Reset

func (m *DefList) Reset()

func (*DefList) String

func (m *DefList) String() string

type DefListAuthorsOptions

type DefListAuthorsOptions struct {
	ListOptions `protobuf:"bytes,1,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DefListAuthorsOptions specifies options for DefsService.ListAuthors.

func (*DefListAuthorsOptions) ProtoMessage

func (*DefListAuthorsOptions) ProtoMessage()

func (*DefListAuthorsOptions) Reset

func (m *DefListAuthorsOptions) Reset()

func (*DefListAuthorsOptions) String

func (m *DefListAuthorsOptions) String() string

type DefListClientsOptions

type DefListClientsOptions struct {
	ListOptions `protobuf:"bytes,1,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DefListClientsOptions specifies options for DefsService.ListClients.

func (*DefListClientsOptions) ProtoMessage

func (*DefListClientsOptions) ProtoMessage()

func (*DefListClientsOptions) Reset

func (m *DefListClientsOptions) Reset()

func (*DefListClientsOptions) String

func (m *DefListClientsOptions) String() string

type DefListExamplesOptions

type DefListExamplesOptions struct {
	Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty" url:",omitempty"`
	// Filter by a specific Repo URI
	Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty" url:",omitempty"`
	// TokenizedSource requests that the source code be returned as a tokenized data
	// structure rather than an (annotated) string.
	//
	// This is useful when the client wants to take full control of rendering and
	// manipulating the contents.
	TokenizedSource bool `protobuf:"varint,3,opt,name=tokenized_source,proto3" json:"tokenized_source,omitempty" url:",omitempty"`
	ListOptions     `protobuf:"bytes,4,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DefListExamplesOptions specifies options for DefsService.ListExamples.

func (*DefListExamplesOptions) ProtoMessage

func (*DefListExamplesOptions) ProtoMessage()

func (*DefListExamplesOptions) Reset

func (m *DefListExamplesOptions) Reset()

func (*DefListExamplesOptions) String

func (m *DefListExamplesOptions) String() string

type DefListOptions

type DefListOptions struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" url:",omitempty"`
	// Specifies a search query for defs. If specified, then the Sort and Direction
	// options are ignored
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty" url:",omitempty"`
	// ByteStart and ByteEnd will restrict the results to only definitions that overlap
	// with the specified start and end byte offsets. This filter is only applied if
	// both values are set.
	ByteStart uint32 `protobuf:"varint,3,opt,name=byte_start,proto3" json:"byte_start,omitempty"`
	// ByteStart and ByteEnd will restrict the results to only definitions that overlap
	// with the specified start and end byte offsets. This filter is only applied if
	// both values are set.
	ByteEnd uint32 `protobuf:"varint,4,opt,name=byte_end,proto3" json:"byte_end,omitempty"`
	// DefKeys, if set, will return the definitions that match the given DefKey
	DefKeys []*graph.DefKey `protobuf:"bytes,5,rep,name=def_keys" json:"def_keys,omitempty"`
	// RepoRevs constrains the results to a set of repository revisions (given by their
	// URIs plus an optional "@" and a revision specifier). For example,
	// "repo.com/foo@revspec".
	RepoRevs []string `protobuf:"bytes,6,rep,name=repo_revs" json:"repo_revs,omitempty" url:",omitempty,comma"`
	UnitType string   `protobuf:"bytes,7,opt,name=unit_type,proto3" json:"unit_type,omitempty" url:",omitempty"`
	Unit     string   `protobuf:"bytes,8,opt,name=unit,proto3" json:"unit,omitempty" url:",omitempty"`
	Path     string   `protobuf:"bytes,9,opt,name=path,proto3" json:"path,omitempty" url:",omitempty"`
	// File, if specified, will restrict the results to only defs defined in the
	// specified file.
	File string `protobuf:"bytes,10,opt,name=file,proto3" json:"file,omitempty" url:",omitempty"`
	// FilePathPrefix, if specified, will restrict the results to only defs defined in
	// files whose path is underneath the specified prefix.
	FilePathPrefix string   `protobuf:"bytes,11,opt,name=file_path_prefix,proto3" json:"file_path_prefix,omitempty" url:",omitempty"`
	Kinds          []string `protobuf:"bytes,12,rep,name=kinds" json:"kinds,omitempty" url:",omitempty,comma"`
	Exported       bool     `protobuf:"varint,13,opt,name=exported,proto3" json:"exported,omitempty" url:",omitempty"`
	Nonlocal       bool     `protobuf:"varint,14,opt,name=nonlocal,proto3" json:"nonlocal,omitempty" url:",omitempty"`
	// IncludeTest is whether the results should include definitions in test files.
	IncludeTest bool `protobuf:"varint,15,opt,name=include_test,proto3" json:"include_test,omitempty" url:",omitempty"`
	// Enhancements
	Doc   bool `protobuf:"varint,16,opt,name=doc,proto3" json:"doc,omitempty" url:",omitempty"`
	Fuzzy bool `protobuf:"varint,17,opt,name=fuzzy,proto3" json:"fuzzy,omitempty" url:",omitempty"`
	// Sorting
	Sort      string `protobuf:"bytes,18,opt,name=sort,proto3" json:"sort,omitempty" url:",omitempty"`
	Direction string `protobuf:"bytes,19,opt,name=direction,proto3" json:"direction,omitempty" url:",omitempty"`
	// Paging
	ListOptions `protobuf:"bytes,20,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DefListOptions specifies options for DefsService.List.

func (*DefListOptions) DefFilters

func (o *DefListOptions) DefFilters() []store.DefFilter

func (*DefListOptions) ProtoMessage

func (*DefListOptions) ProtoMessage()

func (*DefListOptions) Reset

func (m *DefListOptions) Reset()

func (*DefListOptions) String

func (m *DefListOptions) String() string

type DefListRefsOptions

type DefListRefsOptions struct {
	Authorship  bool   `protobuf:"varint,1,opt,name=authorship,proto3" json:"authorship,omitempty" url:",omitempty"`
	Repo        string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty" url:",omitempty"`
	ListOptions `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*DefListRefsOptions) ProtoMessage

func (*DefListRefsOptions) ProtoMessage()

func (*DefListRefsOptions) Reset

func (m *DefListRefsOptions) Reset()

func (*DefListRefsOptions) String

func (m *DefListRefsOptions) String() string

type DefSpec

type DefSpec struct {
	Repo     string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	CommitID string `protobuf:"bytes,2,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	UnitType string `protobuf:"bytes,3,opt,name=unit_type,proto3" json:"unit_type,omitempty"`
	Unit     string `protobuf:"bytes,4,opt,name=unit,proto3" json:"unit,omitempty"`
	Path     string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
}

DefSpec specifies a def.

func NewDefSpecFromDefKey

func NewDefSpecFromDefKey(key graph.DefKey) DefSpec

NewDefSpecFromDefKey returns a DefSpec that specifies the same def as the given key.

func (*DefSpec) DefKey

func (s *DefSpec) DefKey() graph.DefKey

DefKey returns the def key specified by s, using the Repo, UnitType, Unit, and Path fields of s.

func (*DefSpec) ProtoMessage

func (*DefSpec) ProtoMessage()

func (*DefSpec) Reset

func (m *DefSpec) Reset()

func (*DefSpec) RouteVars

func (s *DefSpec) RouteVars() map[string]string

func (*DefSpec) String

func (m *DefSpec) String() string

type DefsClient

type DefsClient interface {
	// Get fetches a def.
	Get(ctx context.Context, in *DefsGetOp, opts ...grpc.CallOption) (*Def, error)
	// List defs.
	List(ctx context.Context, in *DefListOptions, opts ...grpc.CallOption) (*DefList, error)
	// ListRefs lists references to def.
	ListRefs(ctx context.Context, in *DefsListRefsOp, opts ...grpc.CallOption) (*RefList, error)
	// ListExamples lists examples for def.
	ListExamples(ctx context.Context, in *DefsListExamplesOp, opts ...grpc.CallOption) (*ExampleList, error)
	// ListExamples lists people who committed parts of def's definition.
	ListAuthors(ctx context.Context, in *DefsListAuthorsOp, opts ...grpc.CallOption) (*DefAuthorList, error)
	// ListClients lists people who use def in their code.
	ListClients(ctx context.Context, in *DefsListClientsOp, opts ...grpc.CallOption) (*DefClientList, error)
}

func NewDefsClient

func NewDefsClient(cc *grpc.ClientConn) DefsClient

type DefsGetOp

type DefsGetOp struct {
	Def DefSpec        `protobuf:"bytes,1,opt,name=def" json:"def"`
	Opt *DefGetOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DefsGetOp) ProtoMessage

func (*DefsGetOp) ProtoMessage()

func (*DefsGetOp) Reset

func (m *DefsGetOp) Reset()

func (*DefsGetOp) String

func (m *DefsGetOp) String() string

type DefsListAuthorsOp

type DefsListAuthorsOp struct {
	Def DefSpec                `protobuf:"bytes,1,opt,name=def" json:"def"`
	Opt *DefListAuthorsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DefsListAuthorsOp) ProtoMessage

func (*DefsListAuthorsOp) ProtoMessage()

func (*DefsListAuthorsOp) Reset

func (m *DefsListAuthorsOp) Reset()

func (*DefsListAuthorsOp) String

func (m *DefsListAuthorsOp) String() string

type DefsListClientsOp

type DefsListClientsOp struct {
	Def DefSpec                `protobuf:"bytes,1,opt,name=def" json:"def"`
	Opt *DefListClientsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DefsListClientsOp) ProtoMessage

func (*DefsListClientsOp) ProtoMessage()

func (*DefsListClientsOp) Reset

func (m *DefsListClientsOp) Reset()

func (*DefsListClientsOp) String

func (m *DefsListClientsOp) String() string

type DefsListExamplesOp

type DefsListExamplesOp struct {
	Def DefSpec `protobuf:"bytes,1,opt,name=def" json:"def"`
	// If set, source code in the examples will be linked to this branch, rather
	// than to the commit ID.
	Rev string                  `protobuf:"bytes,2,opt,name=rev,proto3" json:"rev,omitempty"`
	Opt *DefListExamplesOptions `protobuf:"bytes,3,opt,name=opt" json:"opt,omitempty"`
}

func (*DefsListExamplesOp) ProtoMessage

func (*DefsListExamplesOp) ProtoMessage()

func (*DefsListExamplesOp) Reset

func (m *DefsListExamplesOp) Reset()

func (*DefsListExamplesOp) String

func (m *DefsListExamplesOp) String() string

type DefsListRefsOp

type DefsListRefsOp struct {
	Def DefSpec             `protobuf:"bytes,1,opt,name=def" json:"def"`
	Opt *DefListRefsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DefsListRefsOp) ProtoMessage

func (*DefsListRefsOp) ProtoMessage()

func (*DefsListRefsOp) Reset

func (m *DefsListRefsOp) Reset()

func (*DefsListRefsOp) String

func (m *DefsListRefsOp) String() string

type DefsServer

type DefsServer interface {
	// Get fetches a def.
	Get(context.Context, *DefsGetOp) (*Def, error)
	// List defs.
	List(context.Context, *DefListOptions) (*DefList, error)
	// ListRefs lists references to def.
	ListRefs(context.Context, *DefsListRefsOp) (*RefList, error)
	// ListExamples lists examples for def.
	ListExamples(context.Context, *DefsListExamplesOp) (*ExampleList, error)
	// ListExamples lists people who committed parts of def's definition.
	ListAuthors(context.Context, *DefsListAuthorsOp) (*DefAuthorList, error)
	// ListClients lists people who use def in their code.
	ListClients(context.Context, *DefsListClientsOp) (*DefClientList, error)
}

type Delta

type Delta struct {
	Base       RepoRevSpec `protobuf:"bytes,1,opt,name=base" json:"base"`
	Head       RepoRevSpec `protobuf:"bytes,2,opt,name=head" json:"head"`
	BaseCommit *vcs.Commit `protobuf:"bytes,3,opt,name=base_commit" json:"base_commit,omitempty"`
	HeadCommit *vcs.Commit `protobuf:"bytes,4,opt,name=head_commit" json:"head_commit,omitempty"`
	BaseRepo   *Repo       `protobuf:"bytes,5,opt,name=base_repo" json:"base_repo,omitempty"`
	HeadRepo   *Repo       `protobuf:"bytes,6,opt,name=head_repo" json:"head_repo,omitempty"`
	BaseBuild  *Build      `protobuf:"bytes,7,opt,name=base_build" json:"base_build,omitempty"`
	HeadBuild  *Build      `protobuf:"bytes,8,opt,name=head_build" json:"head_build,omitempty"`
}

Delta represents the difference between two commits (possibly in 2 separate repositories).

func (*Delta) BaseAndHeadBuildsSuccessful

func (d *Delta) BaseAndHeadBuildsSuccessful() bool

BaseAndHeadBuildsSuccessful returns true iff both the base and head builds are present and ended successfully.

func (*Delta) DeltaSpec

func (d *Delta) DeltaSpec() DeltaSpec

func (*Delta) ProtoMessage

func (*Delta) ProtoMessage()

func (*Delta) Reset

func (m *Delta) Reset()

func (*Delta) String

func (m *Delta) String() string

type DeltaAffectedPerson

type DeltaAffectedPerson struct {
	// the affected person
	Person `protobuf:"bytes,1,opt,name=person,embedded=person" json:"person"`
	// the defs they authored or use (the reason why they're affected)
	Defs []*Def `protobuf:"bytes,2,rep,name=defs" json:"defs,omitempty"`
}

DeltaAffectedPerson describes a person (registered user or committer email address) that is affected by a delta. It includes fields for the person affected as well as the defs that are the reason why we consider them to be affected.

The person's relationship to the Defs depends on what method returned this DeltaAffectedPerson. If it was returned by a method that lists authors, then the Defs are definitions that the Person committed. If it was returned by a method that lists clients (a.k.a users), then the Defs are definitions that the Person uses.

func (*DeltaAffectedPerson) ProtoMessage

func (*DeltaAffectedPerson) ProtoMessage()

func (*DeltaAffectedPerson) Reset

func (m *DeltaAffectedPerson) Reset()

func (*DeltaAffectedPerson) String

func (m *DeltaAffectedPerson) String() string

type DeltaAffectedPersonList

type DeltaAffectedPersonList struct {
	DeltaAffectedPersons []*DeltaAffectedPerson `protobuf:"bytes,1,rep,name=delta_affected_persons" json:"delta_affected_persons,omitempty"`
}

func (*DeltaAffectedPersonList) ProtoMessage

func (*DeltaAffectedPersonList) ProtoMessage()

func (*DeltaAffectedPersonList) Reset

func (m *DeltaAffectedPersonList) Reset()

func (*DeltaAffectedPersonList) String

func (m *DeltaAffectedPersonList) String() string

type DeltaDefs

type DeltaDefs struct {
	// added/changed/deleted defs
	Defs []*DefDelta `protobuf:"bytes,1,rep,name=defs" json:"defs,omitempty"`
	// overall diffstat (not subject to pagination)
	DiffStat diff.Stat `protobuf:"bytes,2,opt,name=diff_stat" json:"diff_stat"`
}

DeltaDefs describes definitions added/changed/deleted in a delta.

func (DeltaDefs) Len

func (v DeltaDefs) Len() int

func (DeltaDefs) Less

func (v DeltaDefs) Less(i, j int) bool

func (*DeltaDefs) ProtoMessage

func (*DeltaDefs) ProtoMessage()

func (*DeltaDefs) Reset

func (m *DeltaDefs) Reset()

func (*DeltaDefs) String

func (m *DeltaDefs) String() string

func (DeltaDefs) Swap

func (v DeltaDefs) Swap(i, j int)

type DeltaFiles

type DeltaFiles struct {
	FileDiffs []*FileDiff `protobuf:"bytes,1,rep,name=file_diffs" json:"file_diffs,omitempty"`
	Delta     *Delta      `protobuf:"bytes,2,opt,name=delta" json:"delta,omitempty"`
	Stats     diff.Stat   `protobuf:"bytes,3,opt,name=stats" json:"stats"`
	// OverThreshold will be true when the source code contents of the diff
	// have not been tokenized and linked. This occurs when the 'MaxSize'
	// limit in DeltaListFilesOptions has been met.
	OverThreshold bool `protobuf:"varint,4,opt,name=over_threshold,proto3" json:"over_threshold,omitempty"`
}

DeltaFiles describes files added/changed/deleted in a delta.

func (*DeltaFiles) DiffStat

func (d *DeltaFiles) DiffStat() diff.Stat

DiffStat returns a diffstat that is the sum of all of the files' diffstats.

func (*DeltaFiles) ProtoMessage

func (*DeltaFiles) ProtoMessage()

func (*DeltaFiles) Reset

func (m *DeltaFiles) Reset()

func (*DeltaFiles) String

func (m *DeltaFiles) String() string

type DeltaFilter

type DeltaFilter struct {
	Unit     string `protobuf:"bytes,1,opt,name=unit,proto3" json:"unit,omitempty" url:",omitempty"`
	UnitType string `protobuf:"bytes,2,opt,name=unit_type,proto3" json:"unit_type,omitempty" url:",omitempty"`
}

DeltaFilter specifies criteria by which to filter results from DeltaListXxx methods.

func (DeltaFilter) DefFilters

func (f DeltaFilter) DefFilters() []store.DefFilter

func (*DeltaFilter) ProtoMessage

func (*DeltaFilter) ProtoMessage()

func (*DeltaFilter) Reset

func (m *DeltaFilter) Reset()

func (*DeltaFilter) String

func (m *DeltaFilter) String() string

type DeltaListAffectedAuthorsOptions

type DeltaListAffectedAuthorsOptions struct {
	DeltaFilter `protobuf:"bytes,1,opt,name=delta_filter,embedded=delta_filter" json:"delta_filter"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DeltaListAffectedAuthorsOptions specifies options for ListAffectedAuthors.

func (*DeltaListAffectedAuthorsOptions) ProtoMessage

func (*DeltaListAffectedAuthorsOptions) ProtoMessage()

func (*DeltaListAffectedAuthorsOptions) Reset

func (*DeltaListAffectedAuthorsOptions) String

type DeltaListAffectedClientsOptions

type DeltaListAffectedClientsOptions struct {
	DeltaFilter `protobuf:"bytes,1,opt,name=delta_filter,embedded=delta_filter" json:"delta_filter"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DeltaListAffectedClientsOptions specifies options for ListAffectedClients.

func (*DeltaListAffectedClientsOptions) ProtoMessage

func (*DeltaListAffectedClientsOptions) ProtoMessage()

func (*DeltaListAffectedClientsOptions) Reset

func (*DeltaListAffectedClientsOptions) String

type DeltaListDefsOptions

type DeltaListDefsOptions struct {
	DeltaFilter `protobuf:"bytes,1,opt,name=delta_filter,embedded=delta_filter" json:"delta_filter"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

DeltaListDefsOptions specifies options for ListDefs.

func (*DeltaListDefsOptions) ProtoMessage

func (*DeltaListDefsOptions) ProtoMessage()

func (*DeltaListDefsOptions) Reset

func (m *DeltaListDefsOptions) Reset()

func (*DeltaListDefsOptions) String

func (m *DeltaListDefsOptions) String() string

type DeltaListFilesOptions

type DeltaListFilesOptions struct {
	// Formatted is whether the files should have their contents code-formatted
	// (syntax-highlighted and reference-linked) if they contain code.
	Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty" url:",omitempty"`
	// Filter filters the list of returned files to those whose name matches Filter.
	Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty" url:",omitempty"`
	// Tokenized, when set, will tokenize the whole source code
	// contained in the diff, returning 3 versions for each hunk: Head
	// revision, Base revision and Hunk body. For more information,
	// see sourcegraph.Hunk.
	Tokenized bool `protobuf:"varint,3,opt,name=tokenized,proto3" json:"tokenized,omitempty" url:",omitempty"`
	// MaxSize stores the maximum number of bytes that will be accepted for tokenizing
	// the diff. If the size of the diff exceeds this value, the returned structure
	// will not contain the linked and tokenized source code.
	// This option is useful when one wishes to present the data in a browser and it
	// may be too large for that. DeltaFiles structure size can be up to 4 times the
	// size of the raw diff when tokenized and linked.
	MaxSize     int32 `protobuf:"varint,4,opt,name=max_size,proto3" json:"max_size,omitempty" url:",omitempty"`
	DeltaFilter `protobuf:"bytes,5,opt,name=delta_filter,embedded=delta_filter" json:"delta_filter"`
}

DeltaListFilesOptions specifies options for ListFiles.

func (*DeltaListFilesOptions) ProtoMessage

func (*DeltaListFilesOptions) ProtoMessage()

func (*DeltaListFilesOptions) Reset

func (m *DeltaListFilesOptions) Reset()

func (*DeltaListFilesOptions) String

func (m *DeltaListFilesOptions) String() string

type DeltaListUnitsOptions

type DeltaListUnitsOptions struct {
}

DeltaListUnitsOptions specifies options for ListUnits.

func (*DeltaListUnitsOptions) ProtoMessage

func (*DeltaListUnitsOptions) ProtoMessage()

func (*DeltaListUnitsOptions) Reset

func (m *DeltaListUnitsOptions) Reset()

func (*DeltaListUnitsOptions) String

func (m *DeltaListUnitsOptions) String() string

type DeltaSpec

type DeltaSpec struct {
	Base RepoRevSpec `protobuf:"bytes,1,opt,name=base" json:"base"`
	Head RepoRevSpec `protobuf:"bytes,2,opt,name=head" json:"head"`
}

A DeltaSpec specifies a delta.

func UnmarshalDeltaSpec

func UnmarshalDeltaSpec(routeVars map[string]string) (DeltaSpec, error)

UnmarshalDeltaSpec marshals a map containing route variables generated by (*DeltaSpec).RouteVars() and returns the equivalent DeltaSpec struct.

func (*DeltaSpec) ProtoMessage

func (*DeltaSpec) ProtoMessage()

func (*DeltaSpec) Reset

func (m *DeltaSpec) Reset()

func (DeltaSpec) RouteVars

func (s DeltaSpec) RouteVars() map[string]string

RouteVars returns the route variables for generating URLs to the delta specified by this DeltaSpec.

func (*DeltaSpec) String

func (m *DeltaSpec) String() string

type DeltasClient

type DeltasClient interface {
	// Get fetches a summary of a delta.
	Get(ctx context.Context, in *DeltaSpec, opts ...grpc.CallOption) (*Delta, error)
	// ListUnits lists units added/changed/deleted in a delta.
	ListUnits(ctx context.Context, in *DeltasListUnitsOp, opts ...grpc.CallOption) (*UnitDeltaList, error)
	// ListDefs lists definitions added/changed/deleted in a delta.
	ListDefs(ctx context.Context, in *DeltasListDefsOp, opts ...grpc.CallOption) (*DeltaDefs, error)
	// ListFiles fetches the file diff for a delta.
	ListFiles(ctx context.Context, in *DeltasListFilesOp, opts ...grpc.CallOption) (*DeltaFiles, error)
	// ListAffectedAuthors lists authors whose code is added/deleted/changed in a
	// delta.
	ListAffectedAuthors(ctx context.Context, in *DeltasListAffectedAuthorsOp, opts ...grpc.CallOption) (*DeltaAffectedPersonList, error)
	// ListAffectedClients lists clients whose code is affected by a delta.
	ListAffectedClients(ctx context.Context, in *DeltasListAffectedClientsOp, opts ...grpc.CallOption) (*DeltaAffectedPersonList, error)
}

func NewDeltasClient

func NewDeltasClient(cc *grpc.ClientConn) DeltasClient

type DeltasListAffectedAuthorsOp

type DeltasListAffectedAuthorsOp struct {
	Ds  DeltaSpec                        `protobuf:"bytes,1,opt,name=ds" json:"ds"`
	Opt *DeltaListAffectedAuthorsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DeltasListAffectedAuthorsOp) ProtoMessage

func (*DeltasListAffectedAuthorsOp) ProtoMessage()

func (*DeltasListAffectedAuthorsOp) Reset

func (m *DeltasListAffectedAuthorsOp) Reset()

func (*DeltasListAffectedAuthorsOp) String

func (m *DeltasListAffectedAuthorsOp) String() string

type DeltasListAffectedClientsOp

type DeltasListAffectedClientsOp struct {
	Ds  DeltaSpec                        `protobuf:"bytes,1,opt,name=ds" json:"ds"`
	Opt *DeltaListAffectedClientsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DeltasListAffectedClientsOp) ProtoMessage

func (*DeltasListAffectedClientsOp) ProtoMessage()

func (*DeltasListAffectedClientsOp) Reset

func (m *DeltasListAffectedClientsOp) Reset()

func (*DeltasListAffectedClientsOp) String

func (m *DeltasListAffectedClientsOp) String() string

type DeltasListDefsOp

type DeltasListDefsOp struct {
	Ds  DeltaSpec             `protobuf:"bytes,1,opt,name=ds" json:"ds"`
	Opt *DeltaListDefsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DeltasListDefsOp) ProtoMessage

func (*DeltasListDefsOp) ProtoMessage()

func (*DeltasListDefsOp) Reset

func (m *DeltasListDefsOp) Reset()

func (*DeltasListDefsOp) String

func (m *DeltasListDefsOp) String() string

type DeltasListFilesOp

type DeltasListFilesOp struct {
	Ds  DeltaSpec              `protobuf:"bytes,1,opt,name=ds" json:"ds"`
	Opt *DeltaListFilesOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DeltasListFilesOp) ProtoMessage

func (*DeltasListFilesOp) ProtoMessage()

func (*DeltasListFilesOp) Reset

func (m *DeltasListFilesOp) Reset()

func (*DeltasListFilesOp) String

func (m *DeltasListFilesOp) String() string

type DeltasListUnitsOp

type DeltasListUnitsOp struct {
	Ds  DeltaSpec              `protobuf:"bytes,1,opt,name=ds" json:"ds"`
	Opt *DeltaListUnitsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*DeltasListUnitsOp) ProtoMessage

func (*DeltasListUnitsOp) ProtoMessage()

func (*DeltasListUnitsOp) Reset

func (m *DeltasListUnitsOp) Reset()

func (*DeltasListUnitsOp) String

func (m *DeltasListUnitsOp) String() string

type DeltasServer

type DeltasServer interface {
	// Get fetches a summary of a delta.
	Get(context.Context, *DeltaSpec) (*Delta, error)
	// ListUnits lists units added/changed/deleted in a delta.
	ListUnits(context.Context, *DeltasListUnitsOp) (*UnitDeltaList, error)
	// ListDefs lists definitions added/changed/deleted in a delta.
	ListDefs(context.Context, *DeltasListDefsOp) (*DeltaDefs, error)
	// ListFiles fetches the file diff for a delta.
	ListFiles(context.Context, *DeltasListFilesOp) (*DeltaFiles, error)
	// ListAffectedAuthors lists authors whose code is added/deleted/changed in a
	// delta.
	ListAffectedAuthors(context.Context, *DeltasListAffectedAuthorsOp) (*DeltaAffectedPersonList, error)
	// ListAffectedClients lists clients whose code is affected by a delta.
	ListAffectedClients(context.Context, *DeltasListAffectedClientsOp) (*DeltaAffectedPersonList, error)
}

type Discussion

type Discussion struct {
	// ID is the unique identifier for this discussion, relative to the repository
	// that contains it.
	ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Title holds a summary about this discussion.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Description holds the description for this discussion.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Author is the user that initiated this discussion.
	Author UserSpec `protobuf:"bytes,4,opt,name=author" json:"author"`
	// DefKey is the unit the discussion is about. Note that a DefKey
	// contains a commit component, but we track Discussions across
	// commits. So all lookups normalize out the commit component, but the
	// commit component records the commit at the time the Discussion was
	// created.
	DefKey graph.DefKey `protobuf:"bytes,5,opt,name=def_key" json:"def_key"`
	// Ratings contains a list of users who have "starred" the discussion
	Ratings []*UserSpec `protobuf:"bytes,6,rep,name=ratings" json:"ratings,omitempty"`
	// Comments contains comments by users in the discussion
	Comments []*DiscussionComment `protobuf:"bytes,7,rep,name=comments" json:"comments,omitempty"`
	// CreatedAt holds the creation time of this changeset.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,8,opt,name=created_at" json:"created_at,omitempty"`
}

Discussion stores information about a discussion

func (*Discussion) ProtoMessage

func (*Discussion) ProtoMessage()

func (*Discussion) Reset

func (m *Discussion) Reset()

func (*Discussion) String

func (m *Discussion) String() string

type DiscussionComment

type DiscussionComment struct {
	// ID holds the unique identifier (with reference to the Discussion) of the
	// comment.
	ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Body holds the text description of the comment.
	Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// Author is the spec of the user that submitted this comment.
	Author UserSpec `protobuf:"bytes,3,opt,name=author" json:"author"`
	// DefKey is the unit the discussion is about. Note this will be the
	// same as the Discussion's DefKey, except the commit component will
	// be the commit the user submitted on.
	DefKey graph.DefKey `protobuf:"bytes,5,opt,name=def_key" json:"def_key"`
	// CreatedAt is the date at which this comment was submitted.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,6,opt,name=created_at" json:"created_at,omitempty"`
}

DiscussionComment contains information about a single comment by a user.

func (*DiscussionComment) ProtoMessage

func (*DiscussionComment) ProtoMessage()

func (*DiscussionComment) Reset

func (m *DiscussionComment) Reset()

func (*DiscussionComment) String

func (m *DiscussionComment) String() string

type DiscussionCommentCreateOp

type DiscussionCommentCreateOp struct {
	DiscussionID int64              `protobuf:"varint,1,opt,name=discussion_id,proto3" json:"discussion_id,omitempty"`
	Comment      *DiscussionComment `protobuf:"bytes,2,opt,name=comment" json:"comment,omitempty"`
}

func (*DiscussionCommentCreateOp) ProtoMessage

func (*DiscussionCommentCreateOp) ProtoMessage()

func (*DiscussionCommentCreateOp) Reset

func (m *DiscussionCommentCreateOp) Reset()

func (*DiscussionCommentCreateOp) String

func (m *DiscussionCommentCreateOp) String() string

type DiscussionList

type DiscussionList struct {
	Discussions []*Discussion `protobuf:"bytes,1,rep,name=discussions" json:"discussions,omitempty"`
}

func (*DiscussionList) ProtoMessage

func (*DiscussionList) ProtoMessage()

func (*DiscussionList) Reset

func (m *DiscussionList) Reset()

func (*DiscussionList) String

func (m *DiscussionList) String() string

type DiscussionListOp

type DiscussionListOp struct {
	Repo        RepoSpec            `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	DefKey      graph.DefKey        `protobuf:"bytes,2,opt,name=def_key" json:"def_key"`
	Order       DiscussionListOrder `protobuf:"varint,3,opt,name=order,proto3,enum=sourcegraph.DiscussionListOrder" json:"order,omitempty"`
	ListOptions `protobuf:"bytes,4,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*DiscussionListOp) ProtoMessage

func (*DiscussionListOp) ProtoMessage()

func (*DiscussionListOp) Reset

func (m *DiscussionListOp) Reset()

func (*DiscussionListOp) String

func (m *DiscussionListOp) String() string

type DiscussionListOrder

type DiscussionListOrder int32
const (
	// List discussions in reverse chronological order
	DiscussionListOrder_Date DiscussionListOrder = 0
	// List discussion such that highly rated items are in front
	DiscussionListOrder_Top DiscussionListOrder = 1
)

func (DiscussionListOrder) String

func (x DiscussionListOrder) String() string

type DiscussionRatingUpdateOp

type DiscussionRatingUpdateOp struct {
	DiscussionID int64     `protobuf:"varint,1,opt,name=discussion_id,proto3" json:"discussion_id,omitempty"`
	User         *UserSpec `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
}

func (*DiscussionRatingUpdateOp) ProtoMessage

func (*DiscussionRatingUpdateOp) ProtoMessage()

func (*DiscussionRatingUpdateOp) Reset

func (m *DiscussionRatingUpdateOp) Reset()

func (*DiscussionRatingUpdateOp) String

func (m *DiscussionRatingUpdateOp) String() string

type DiscussionSpec

type DiscussionSpec struct {
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	ID   int64    `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (*DiscussionSpec) ProtoMessage

func (*DiscussionSpec) ProtoMessage()

func (*DiscussionSpec) Reset

func (m *DiscussionSpec) Reset()

func (*DiscussionSpec) String

func (m *DiscussionSpec) String() string

type DiscussionsClient

type DiscussionsClient interface {
	// Create creates a new Discussion and returns it, populating its
	// fields, such as ID and CreatedAt.
	Create(ctx context.Context, in *Discussion, opts ...grpc.CallOption) (*Discussion, error)
	// Get returns the Discussion by RepoSpec and ID.
	Get(ctx context.Context, in *DiscussionSpec, opts ...grpc.CallOption) (*Discussion, error)
	// List lists changesets for a DefKey
	List(ctx context.Context, in *DiscussionListOp, opts ...grpc.CallOption) (*DiscussionList, error)
	// CreateComment creates a new DiscussionComment and returns it,
	// populating its fields, such as ID and CreatedAt.
	CreateComment(ctx context.Context, in *DiscussionCommentCreateOp, opts ...grpc.CallOption) (*DiscussionComment, error)
	// UpdateRating either adds or removes a star by a User
	UpdateRating(ctx context.Context, in *DiscussionRatingUpdateOp, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewDiscussionsClient

func NewDiscussionsClient(cc *grpc.ClientConn) DiscussionsClient

type DiscussionsServer

type DiscussionsServer interface {
	// Create creates a new Discussion and returns it, populating its
	// fields, such as ID and CreatedAt.
	Create(context.Context, *Discussion) (*Discussion, error)
	// Get returns the Discussion by RepoSpec and ID.
	Get(context.Context, *DiscussionSpec) (*Discussion, error)
	// List lists changesets for a DefKey
	List(context.Context, *DiscussionListOp) (*DiscussionList, error)
	// CreateComment creates a new DiscussionComment and returns it,
	// populating its fields, such as ID and CreatedAt.
	CreateComment(context.Context, *DiscussionCommentCreateOp) (*DiscussionComment, error)
	// UpdateRating either adds or removes a star by a User
	UpdateRating(context.Context, *DiscussionRatingUpdateOp) (*pbtypes1.Void, error)
}

type EmailAddr

type EmailAddr struct {
	// the email address (case-insensitively compared in the DB and API)
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// whether this email address has been verified
	Verified bool `protobuf:"varint,2,opt,name=verified,proto3" json:"verified,omitempty"`
	// indicates this is the user's primary email (only 1 email can be primary per user)
	Primary bool `protobuf:"varint,3,opt,name=primary,proto3" json:"primary,omitempty"`
	// whether Sourcegraph inferred via public data that this is an email for the user
	Guessed bool `protobuf:"varint,4,opt,name=guessed,proto3" json:"guessed,omitempty"`
	// indicates that this email should not be associated with the user (even if guessed in the future)
	Blacklisted bool `protobuf:"varint,5,opt,name=blacklisted,proto3" json:"blacklisted,omitempty"`
}

EmailAddr is an email address associated with a user.

func (*EmailAddr) ProtoMessage

func (*EmailAddr) ProtoMessage()

func (*EmailAddr) Reset

func (m *EmailAddr) Reset()

func (*EmailAddr) String

func (m *EmailAddr) String() string

type EmailAddrList

type EmailAddrList struct {
	EmailAddrs []*EmailAddr `protobuf:"bytes,1,rep,name=email_addrs" json:"email_addrs,omitempty"`
}

func (*EmailAddrList) ProtoMessage

func (*EmailAddrList) ProtoMessage()

func (*EmailAddrList) Reset

func (m *EmailAddrList) Reset()

func (*EmailAddrList) String

func (m *EmailAddrList) String() string

type Example

type Example struct {
	graph1.Ref `protobuf:"bytes,1,opt,name=ref,embedded=ref" json:""`
	// SrcHTML is the formatted HTML source code of the example, with links to
	// definitions.
	SrcHTML string `protobuf:"bytes,2,opt,name=src_html,proto3" json:"src_html,omitempty"`
	// SourceCode contains the parsed source for this example, if requested via
	// DefListExamplesOptions.
	SourceCode *SourceCode `protobuf:"bytes,3,opt,name=source_code" json:"source_code,omitempty"`
	// The line that the given example starts on
	StartLine int32 `protobuf:"varint,4,opt,name=start_line,proto3" json:"start_line,omitempty"`
	// The line that the given example ends on
	EndLine int32 `protobuf:"varint,5,opt,name=end_line,proto3" json:"end_line,omitempty"`
	// Error is whether an error occurred while fetching this example.
	Error bool `protobuf:"varint,6,opt,name=error,proto3" json:"error,omitempty"`
	// If the example has been requested by revision name (ie. branch, tag), this
	// value will be set.
	Rev string `protobuf:"bytes,7,opt,name=rev,proto3" json:",omitempty"`
}

Example is a usage example of a def.

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) Reset

func (m *Example) Reset()

func (*Example) String

func (m *Example) String() string

type ExampleList

type ExampleList struct {
	Examples       []*Example `protobuf:"bytes,1,rep,name=examples" json:"examples,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*ExampleList) ProtoMessage

func (*ExampleList) ProtoMessage()

func (*ExampleList) Reset

func (m *ExampleList) Reset()

func (*ExampleList) String

func (m *ExampleList) String() string

type Examples

type Examples []*Example

func (Examples) Len

func (vs Examples) Len() int

func (Examples) Less

func (vs Examples) Less(i, j int) bool

func (Examples) Swap

func (vs Examples) Swap(i, j int)

type FileData

type FileData struct {
	// Repo is the repository that contains this file data.
	RepoRev RepoRevSpec

	// File is the file (relative to the repository root directory) that this
	// file data is from.
	File string

	// Start and End is the range of the data in the file.
	Range *Range `json:",omitempty"`

	// EntireFile is true if the data spans the entire file contents.
	EntireFile bool `json:",omitempty"`

	// Annotated (i.e., HTML-marked up) content.
	Annotated template.HTML

	// Raw data.
	Raw []byte
}

FileData represents a range of (possibly annotated) data in a file.

type FileDiff

type FileDiff struct {
	diff.FileDiff `protobuf:"bytes,1,opt,name=file_diff,embedded=file_diff" json:"file_diff"`
	FileDiffHunks []*Hunk `protobuf:"bytes,2,rep,name=file_diff_hunks" json:"file_diff_hunks,omitempty"`
	// PreImage is the CommitID at which this file was before the change occurred.
	PreImage string `protobuf:"bytes,3,opt,name=pre_image,proto3" json:",omitempty"`
	// PostImage is the CommitID at which this file was after the change occurred.
	PostImage string `protobuf:"bytes,4,opt,name=post_image,proto3" json:",omitempty"`
	// Stat contains statistics about additions and deletions to this diff.
	Stats diff.Stat `protobuf:"bytes,5,opt,name=stats" json:"stats"`
}

FileDiff holds data about a diff, and additionally stores extended information about its hunks.

func (*FileDiff) ProtoMessage

func (*FileDiff) ProtoMessage()

func (*FileDiff) Reset

func (m *FileDiff) Reset()

func (*FileDiff) String

func (m *FileDiff) String() string

type FileToken

type FileToken struct {
	Path  string               `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Entry *vcsclient.TreeEntry `protobuf:"bytes,2,opt,name=entry" json:"entry,omitempty"`
}

func (*FileToken) ProtoMessage

func (*FileToken) ProtoMessage()

func (*FileToken) Reset

func (m *FileToken) Reset()

func (*FileToken) String

func (m *FileToken) String() string

func (FileToken) Token

func (t FileToken) Token() string

type FormatResult

type FormatResult struct {
	// TooManyRefs indicates that the file being formatted exceeded the maximum number
	// of refs that are linked. Only the first NumRefs refs are linked.
	TooManyRefs bool `protobuf:"varint,1,opt,name=too_many_refs,proto3" json:"too_many_refs,omitempty"`
	// NumRefs is the number of refs that were linked in this file. If the total number
	// of refs in the file exceeds the (server-defined) limit, NumRefs is capped at the
	// limit.
	NumRefs int32 `protobuf:"varint,2,opt,name=num_refs,proto3" json:"num_refs,omitempty"`
	// LineStartByteOffsets is the byte offset of each line's first byte.
	LineStartByteOffsets []int32 `protobuf:"varint,3,rep,name=line_start_byte_offsets" json:"line_start_byte_offsets,omitempty"`
}

FormatResult contains information about and warnings from the formatting operation (if Formatted is true in the options).

func (*FormatResult) ProtoMessage

func (*FormatResult) ProtoMessage()

func (*FormatResult) Reset

func (m *FormatResult) Reset()

func (*FormatResult) String

func (m *FormatResult) String() string

type GitHubRepo

type GitHubRepo struct {
	Stars int32 `protobuf:"varint,1,opt,name=stars,proto3" json:"stars,omitempty"`
}

GitHubRepo holds additional metadata about GitHub repos.

func (*GitHubRepo) ProtoMessage

func (*GitHubRepo) ProtoMessage()

func (*GitHubRepo) Reset

func (m *GitHubRepo) Reset()

func (*GitHubRepo) String

func (m *GitHubRepo) String() string

type GraphUplinkClient

type GraphUplinkClient interface {
	// Push sends the latest metrics to the upstream instance
	Push(ctx context.Context, in *MetricsSnapshot, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// PushEvents flushes the local event logs to the upstream
	// instance
	PushEvents(ctx context.Context, in *UserEventList, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewGraphUplinkClient

func NewGraphUplinkClient(cc *grpc.ClientConn) GraphUplinkClient

type GraphUplinkServer

type GraphUplinkServer interface {
	// Push sends the latest metrics to the upstream instance
	Push(context.Context, *MetricsSnapshot) (*pbtypes1.Void, error)
	// PushEvents flushes the local event logs to the upstream
	// instance
	PushEvents(context.Context, *UserEventList) (*pbtypes1.Void, error)
}

type Hunk

type Hunk struct {
	diff.Hunk `protobuf:"bytes,1,opt,name=hunk,embedded=hunk" json:"hunk"`
	// LinePrefixes holds a string where each character's index corresponds
	// to a line in the BodySource, and its value reflects whether the line
	// is an addition, deletion, or change ('+', '-', ' ').
	LinePrefixes string `protobuf:"bytes,2,opt,name=line_prefixes,proto3" json:"line_prefixes,omitempty"`
	// BaseSource holds the source code for the original hunk, having all
	// lines starting from the original line down to the end of the hunk.
	BaseSource *SourceCode `protobuf:"bytes,3,opt,name=base_source" json:"base_source,omitempty"`
	// HeadSource contains the source code for the new hunk, holding
	// all consecutive lines from the start to the end.
	HeadSource *SourceCode `protobuf:"bytes,4,opt,name=head_source" json:"head_source,omitempty"`
	// BodySource contains the source code for the Hunk body and is a mix
	// of both additions and deletions.
	BodySource *SourceCode `protobuf:"bytes,5,opt,name=body_source" json:"body_source,omitempty"`
}

Hunk holds data about a hunk in a diff.

func (*Hunk) ProtoMessage

func (*Hunk) ProtoMessage()

func (*Hunk) Reset

func (m *Hunk) Reset()

func (*Hunk) String

func (m *Hunk) String() string

type InlineComment

type InlineComment struct {
	// Filename is the name of the file where this comment was made.
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// LineNumber is the line number relative to the beginning of the file in
	// the specified commit.
	LineNumber int32 `protobuf:"varint,2,opt,name=line_number,proto3" json:"line_number,omitempty"`
	// CommitID is the SHA-1 for the post-image of this file, where the comment
	// was placed. The post-image can be deduced from the file entry in the diff
	// that it belong by extracting it's extended header's index entry.
	CommitID string `protobuf:"bytes,3,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
	// Author is the user that initiated this changeset.
	Author UserSpec `protobuf:"bytes,4,opt,name=author" json:"author"`
	// Body holds the body of this comment.
	Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	// CreatedAt holds the creation date of this comment.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,6,opt,name=created_at" json:"created_at,omitempty"`
	// EditedAt holds the time when this comment was last edited. If no edits occurred,
	// it will be null.
	EditedAt *pbtypes.Timestamp `protobuf:"bytes,7,opt,name=edited_at" json:"edited_at,omitempty"`
	// Deleted indicates whether the comment has been deleted.
	Deleted bool `protobuf:"varint,8,opt,name=deleted,proto3" json:"deleted,omitempty"`
}

InlineComment represents a comment made on a line of code. It is uniquely identified via Filename + LineNumber + CommitID. In a Changeset, the CommitID might vary within the same file based on whether the comment was made on the lines that match the pre-index SHA-1 or the lines that match the post-index SHA-1. Pre and post index values may differ from Base and Head of the diff. For more information on indexes see http://git-scm.com/docs/git-diff-index

func (*InlineComment) ProtoMessage

func (*InlineComment) ProtoMessage()

func (*InlineComment) Reset

func (m *InlineComment) Reset()

func (*InlineComment) String

func (m *InlineComment) String() string

type InvalidOptionsError

type InvalidOptionsError struct{ Reason string }

InvalidOptionsError indicates that the provided XxxOptions (RepoListOptions, DefGetOptions, etc.) was invalid.

func (*InvalidOptionsError) Error

func (e *InvalidOptionsError) Error() string

func (*InvalidOptionsError) HTTPStatusCode

func (e *InvalidOptionsError) HTTPStatusCode() int

type InvalidSpecError

type InvalidSpecError struct{ Reason string }

InvalidSpecError indicates that the provided XxxSpec (RepoSpec, UserSpec, etc.) was invalid.

func (*InvalidSpecError) Error

func (e *InvalidSpecError) Error() string

func (*InvalidSpecError) HTTPStatusCode

func (e *InvalidSpecError) HTTPStatusCode() int

type ListOptions

type ListOptions struct {
	PerPage int32 `protobuf:"varint,1,opt,name=per_page,proto3" json:"per_page,omitempty" url:",omitempty"`
	Page    int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty" url:",omitempty"`
}

ListOptions specifies general pagination options for fetching a list of results.

func (ListOptions) Limit

func (o ListOptions) Limit() int

Limit returns the number of items to fetch.

func (ListOptions) Offset

func (o ListOptions) Offset() int

Offset returns the 0-indexed offset of the first item that appears on this page, based on the PerPage and Page values (which are given default values if they are zero).

func (ListOptions) PageOrDefault

func (o ListOptions) PageOrDefault() int

func (ListOptions) PerPageOrDefault

func (o ListOptions) PerPageOrDefault() int

func (*ListOptions) ProtoMessage

func (*ListOptions) ProtoMessage()

func (*ListOptions) Reset

func (m *ListOptions) Reset()

func (*ListOptions) String

func (m *ListOptions) String() string

type ListResponse

type ListResponse struct {
	// Total is the total number of results in the list.
	Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty" url:",omitempty"`
}

ListResponse specifies a general paginated response when fetching a list of results.

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) String

func (m *ListResponse) String() string

type LogEntries

type LogEntries struct {
	MaxID   string   `protobuf:"bytes,1,opt,name=max_id,proto3" json:"max_id,omitempty"`
	Entries []string `protobuf:"bytes,2,rep,name=entries" json:"entries,omitempty"`
}

func (*LogEntries) ProtoMessage

func (*LogEntries) ProtoMessage()

func (*LogEntries) Reset

func (m *LogEntries) Reset()

func (*LogEntries) String

func (m *LogEntries) String() string

type LoginCredentials

type LoginCredentials struct {
	// Login is the user's claimed login.
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	// Password is the password (possibly) corresponding to the login.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}

LoginCredentials is the information a user submits to log in.

func (*LoginCredentials) ProtoMessage

func (*LoginCredentials) ProtoMessage()

func (*LoginCredentials) Reset

func (m *LoginCredentials) Reset()

func (*LoginCredentials) String

func (m *LoginCredentials) String() string

type MarkdownClient

type MarkdownClient interface {
	Render(ctx context.Context, in *MarkdownRenderOp, opts ...grpc.CallOption) (*MarkdownData, error)
}

func NewMarkdownClient

func NewMarkdownClient(cc *grpc.ClientConn) MarkdownClient

type MarkdownData

type MarkdownData struct {
	Rendered  []byte     `protobuf:"bytes,1,opt,name=rendered,proto3" json:"rendered,omitempty"`
	Checklist *Checklist `protobuf:"bytes,2,opt,name=checklist" json:"checklist,omitempty"`
}

func (*MarkdownData) ProtoMessage

func (*MarkdownData) ProtoMessage()

func (*MarkdownData) Reset

func (m *MarkdownData) Reset()

func (*MarkdownData) String

func (m *MarkdownData) String() string

type MarkdownOpt

type MarkdownOpt struct {
	EnableCheckboxes bool `protobuf:"varint,1,opt,name=enable_checkboxes,proto3" json:"enable_checkboxes,omitempty"`
}

func (*MarkdownOpt) ProtoMessage

func (*MarkdownOpt) ProtoMessage()

func (*MarkdownOpt) Reset

func (m *MarkdownOpt) Reset()

func (*MarkdownOpt) String

func (m *MarkdownOpt) String() string

type MarkdownRenderOp

type MarkdownRenderOp struct {
	Markdown []byte      `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"`
	Opt      MarkdownOpt `protobuf:"bytes,2,opt,name=opt" json:"opt"`
}

func (*MarkdownRenderOp) ProtoMessage

func (*MarkdownRenderOp) ProtoMessage()

func (*MarkdownRenderOp) Reset

func (m *MarkdownRenderOp) Reset()

func (*MarkdownRenderOp) String

func (m *MarkdownRenderOp) String() string

type MarkdownRequestBody

type MarkdownRequestBody struct {
	Markdown    []byte `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"`
	MarkdownOpt `protobuf:"bytes,2,opt,name=markdown_opt,embedded=markdown_opt" json:"markdown_opt"`
}

func (*MarkdownRequestBody) ProtoMessage

func (*MarkdownRequestBody) ProtoMessage()

func (*MarkdownRequestBody) Reset

func (m *MarkdownRequestBody) Reset()

func (*MarkdownRequestBody) String

func (m *MarkdownRequestBody) String() string

type MarkdownServer

type MarkdownServer interface {
	Render(context.Context, *MarkdownRenderOp) (*MarkdownData, error)
}

type MetaClient

type MetaClient interface {
	// Status returns status information from the server's point of
	// view.
	Status(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*ServerStatus, error)
	// Config returns the server's configuration.
	Config(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*ServerConfig, error)
	// PubKey returns the server's public key.
	PubKey(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*ServerPubKey, error)
}

func NewMetaClient

func NewMetaClient(cc *grpc.ClientConn) MetaClient

type MetaServer

type MetaServer interface {
	// Status returns status information from the server's point of
	// view.
	Status(context.Context, *pbtypes1.Void) (*ServerStatus, error)
	// Config returns the server's configuration.
	Config(context.Context, *pbtypes1.Void) (*ServerConfig, error)
	// PubKey returns the server's public key.
	PubKey(context.Context, *pbtypes1.Void) (*ServerPubKey, error)
}

type MetricsSnapshot

type MetricsSnapshot struct {
	// Type is the encoding of TelemetryData
	Type TelemetryType `protobuf:"varint,1,opt,name=type,proto3,enum=sourcegraph.TelemetryType" json:"type,omitempty"`
	// TelemetryData is the encoded metrics
	TelemetryData []byte `protobuf:"bytes,2,opt,name=telemetry_data,proto3" json:"telemetry_data,omitempty"`
}

MetricsSnapshots encodes

func (*MetricsSnapshot) ProtoMessage

func (*MetricsSnapshot) ProtoMessage()

func (*MetricsSnapshot) Reset

func (m *MetricsSnapshot) Reset()

func (*MetricsSnapshot) String

func (m *MetricsSnapshot) String() string

type MirrorReposClient

type MirrorReposClient interface {
	// Refresh fetches the newest VCS data from the repo's origin.
	RefreshVCS(ctx context.Context, in *MirrorReposRefreshVCSOp, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewMirrorReposClient

func NewMirrorReposClient(cc *grpc.ClientConn) MirrorReposClient

type MirrorReposRefreshVCSOp

type MirrorReposRefreshVCSOp struct {
	Repo        RepoSpec        `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Credentials *VCSCredentials `protobuf:"bytes,2,opt,name=credentials" json:"credentials,omitempty"`
}

func (*MirrorReposRefreshVCSOp) ProtoMessage

func (*MirrorReposRefreshVCSOp) ProtoMessage()

func (*MirrorReposRefreshVCSOp) Reset

func (m *MirrorReposRefreshVCSOp) Reset()

func (*MirrorReposRefreshVCSOp) String

func (m *MirrorReposRefreshVCSOp) String() string

type MirrorReposServer

type MirrorReposServer interface {
	// Refresh fetches the newest VCS data from the repo's origin.
	RefreshVCS(context.Context, *MirrorReposRefreshVCSOp) (*pbtypes1.Void, error)
}

type MirroredRepoSSHKeysClient

type MirroredRepoSSHKeysClient interface {
	Create(ctx context.Context, in *MirroredRepoSSHKeysCreateOp, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	Get(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*SSHPrivateKey, error)
	Delete(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewMirroredRepoSSHKeysClient

func NewMirroredRepoSSHKeysClient(cc *grpc.ClientConn) MirroredRepoSSHKeysClient

type MirroredRepoSSHKeysCreateOp

type MirroredRepoSSHKeysCreateOp struct {
	Repo RepoSpec      `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Key  SSHPrivateKey `protobuf:"bytes,2,opt,name=key" json:"key"`
}

func (*MirroredRepoSSHKeysCreateOp) ProtoMessage

func (*MirroredRepoSSHKeysCreateOp) ProtoMessage()

func (*MirroredRepoSSHKeysCreateOp) Reset

func (m *MirroredRepoSSHKeysCreateOp) Reset()

func (*MirroredRepoSSHKeysCreateOp) String

func (m *MirroredRepoSSHKeysCreateOp) String() string

type NewAccount

type NewAccount struct {
	// Login is the desired login for the new user account.
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	// Email is the primary email address for the new user account.
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// Password is the password for the new user account.
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// UID is the desired UID for the new user account.
	UID int32 `protobuf:"varint,4,opt,name=uid,proto3" json:"uid,omitempty"`
}

func (*NewAccount) ProtoMessage

func (*NewAccount) ProtoMessage()

func (*NewAccount) Reset

func (m *NewAccount) Reset()

func (*NewAccount) String

func (m *NewAccount) String() string

type NewPassword

type NewPassword struct {
	// password is the new password for the user who requested the password reset
	// token.
	Password string              `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Token    *PasswordResetToken `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
}

func (*NewPassword) ProtoMessage

func (*NewPassword) ProtoMessage()

func (*NewPassword) Reset

func (m *NewPassword) Reset()

func (*NewPassword) String

func (m *NewPassword) String() string

type NotImplementedError

type NotImplementedError struct{ What string }

NotImplementedError indicates that a not-yet-implemented method was called.

func (*NotImplementedError) Error

func (e *NotImplementedError) Error() string

func (*NotImplementedError) HTTPStatusCode

func (e *NotImplementedError) HTTPStatusCode() int

type NotifyClient

type NotifyClient interface {
	// GenericEvent will notify recipients of an event which happened
	GenericEvent(ctx context.Context, in *NotifyGenericEvent, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewNotifyClient

func NewNotifyClient(cc *grpc.ClientConn) NotifyClient

type NotifyGenericEvent

type NotifyGenericEvent struct {
	// Actor is the User who did the action
	Actor *UserSpec `protobuf:"bytes,1,opt,name=actor" json:"actor,omitempty"`
	// Recipients is who should be notified of the action
	Recipients []*UserSpec `protobuf:"bytes,2,rep,name=recipients" json:"recipients,omitempty"`
	// ActionType example: "reviewed"
	ActionType string `protobuf:"bytes,3,opt,name=action_type,proto3" json:"action_type,omitempty"`
	// ActionContent example: "Please add tests for the new functionality"
	ActionContent string `protobuf:"bytes,4,opt,name=action_content,proto3" json:"action_content,omitempty"`
	// ObjectID example: 71
	ObjectID int64 `protobuf:"varint,5,opt,name=object_id,proto3" json:"object_id,omitempty"`
	// ObjectRepo example: "gorilla/mux"
	ObjectRepo string `protobuf:"bytes,6,opt,name=object_repo,proto3" json:"object_repo,omitempty"`
	// ObjectType example: "changeset"
	ObjectType string `protobuf:"bytes,7,opt,name=object_type,proto3" json:"object_type,omitempty"`
	// ObjectTitle example: "search: Simplify tokenizer"
	ObjectTitle string `protobuf:"bytes,8,opt,name=object_title,proto3" json:"object_title,omitempty"`
	// ObjectURL example: "https://src.sourcegraph.com/sourcegraph/.changesets/71"
	ObjectURL string `protobuf:"bytes,9,opt,name=object_url,proto3" json:"object_url,omitempty"`
	// SlackMsg, if present, will override the Slack message for this event.
	SlackMsg string `protobuf:"bytes,10,opt,name=slack_msg,proto3" json:"slack_msg,omitempty"`
	// EmailHTML, if present, will override the notification email body for this event.
	EmailHTML string `protobuf:"bytes,11,opt,name=email_html,proto3" json:"email_html,omitempty"`
	// NoSlack turns off the Slack notification for this event.
	NoSlack bool `protobuf:"varint,12,opt,name=no_slack,proto3" json:"no_slack,omitempty"`
	// NoEmail turns off the email notification for this event.
	NoEmail bool `protobuf:"varint,13,opt,name=no_email,proto3" json:"no_email,omitempty"`
}

NotifyGenericEvent describes an action being done against an object. For example reviewing a changeset.

func (*NotifyGenericEvent) ProtoMessage

func (*NotifyGenericEvent) ProtoMessage()

func (*NotifyGenericEvent) Reset

func (m *NotifyGenericEvent) Reset()

func (*NotifyGenericEvent) String

func (m *NotifyGenericEvent) String() string

type NotifyServer

type NotifyServer interface {
	// GenericEvent will notify recipients of an event which happened
	GenericEvent(context.Context, *NotifyGenericEvent) (*pbtypes1.Void, error)
}

type Org

type Org struct {
	User `protobuf:"bytes,1,opt,name=user,embedded=user" json:"user"`
}

func (*Org) OrgSpec

func (o *Org) OrgSpec() OrgSpec

OrgSpec returns the OrgSpec that specifies o.

func (*Org) ProtoMessage

func (*Org) ProtoMessage()

func (*Org) Reset

func (m *Org) Reset()

func (*Org) String

func (m *Org) String() string

type OrgList

type OrgList struct {
	Orgs []*Org `protobuf:"bytes,1,rep,name=orgs" json:"orgs,omitempty"`
}

func (*OrgList) ProtoMessage

func (*OrgList) ProtoMessage()

func (*OrgList) Reset

func (m *OrgList) Reset()

func (*OrgList) String

func (m *OrgList) String() string

type OrgListMembersOptions

type OrgListMembersOptions struct {
	ListOptions `protobuf:"bytes,1,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*OrgListMembersOptions) ProtoMessage

func (*OrgListMembersOptions) ProtoMessage()

func (*OrgListMembersOptions) Reset

func (m *OrgListMembersOptions) Reset()

func (*OrgListMembersOptions) String

func (m *OrgListMembersOptions) String() string

type OrgSpec

type OrgSpec struct {
	Org string `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"`
	UID int32  `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
}

OrgSpec specifies an organization. At least one of Email, Login, and UID must be nonempty.

func ParseOrgSpec

func ParseOrgSpec(pathComponent string) (OrgSpec, error)

ParseOrgSpec parses a string generated by (*OrgSpec).String() and returns the equivalent OrgSpec struct.

func (*OrgSpec) ProtoMessage

func (*OrgSpec) ProtoMessage()

func (*OrgSpec) Reset

func (m *OrgSpec) Reset()

func (*OrgSpec) RouteVars

func (s *OrgSpec) RouteVars() map[string]string

func (*OrgSpec) SpecString

func (s *OrgSpec) SpecString() string

SpecString returns the URL path component that specifies the org.

func (*OrgSpec) String

func (m *OrgSpec) String() string

type OrgsClient

type OrgsClient interface {
	// Get fetches an organization.
	Get(ctx context.Context, in *OrgSpec, opts ...grpc.CallOption) (*Org, error)
	// List lists organizations that a user is a member of.
	List(ctx context.Context, in *OrgsListOp, opts ...grpc.CallOption) (*OrgList, error)
	// ListMembers lists members of an organization.
	ListMembers(ctx context.Context, in *OrgsListMembersOp, opts ...grpc.CallOption) (*UserList, error)
}

func NewOrgsClient

func NewOrgsClient(cc *grpc.ClientConn) OrgsClient

type OrgsListMembersOp

type OrgsListMembersOp struct {
	Org OrgSpec                `protobuf:"bytes,1,opt,name=org" json:"org"`
	Opt *OrgListMembersOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*OrgsListMembersOp) ProtoMessage

func (*OrgsListMembersOp) ProtoMessage()

func (*OrgsListMembersOp) Reset

func (m *OrgsListMembersOp) Reset()

func (*OrgsListMembersOp) String

func (m *OrgsListMembersOp) String() string

type OrgsListOp

type OrgsListOp struct {
	Member      UserSpec `protobuf:"bytes,1,opt,name=member" json:"member"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*OrgsListOp) ProtoMessage

func (*OrgsListOp) ProtoMessage()

func (*OrgsListOp) Reset

func (m *OrgsListOp) Reset()

func (*OrgsListOp) String

func (m *OrgsListOp) String() string

type OrgsServer

type OrgsServer interface {
	// Get fetches an organization.
	Get(context.Context, *OrgSpec) (*Org, error)
	// List lists organizations that a user is a member of.
	List(context.Context, *OrgsListOp) (*OrgList, error)
	// ListMembers lists members of an organization.
	ListMembers(context.Context, *OrgsListMembersOp) (*UserList, error)
}

type PBToken

type PBToken struct {
	// Types that are valid to be assigned to Token:
	//	*PBToken_Term
	//	*PBToken_AnyToken
	//	*PBToken_RepoToken
	//	*PBToken_RevToken
	//	*PBToken_UnitToken
	//	*PBToken_FileToken
	//	*PBToken_UserToken
	Token isPBToken_Token `protobuf_oneof:"token"`
}

A PBToken is a protobuf wrapper (hence the prefix "PB") for a search token. Exactly one field must be non-empty.

func PBTokenWrap

func PBTokenWrap(t Token) PBToken

func PBTokensWrap

func PBTokensWrap(toks []Token) []PBToken

func (*PBToken) GetAnyToken

func (m *PBToken) GetAnyToken() string

func (*PBToken) GetFileToken

func (m *PBToken) GetFileToken() *FileToken

func (*PBToken) GetQueryToken

func (t *PBToken) GetQueryToken() Token

GetQueryToken returns the Token that the PBToken wraps.

func (*PBToken) GetRepoToken

func (m *PBToken) GetRepoToken() *RepoToken

func (*PBToken) GetRevToken

func (m *PBToken) GetRevToken() *RevToken

func (*PBToken) GetTerm

func (m *PBToken) GetTerm() string

func (*PBToken) GetToken

func (m *PBToken) GetToken() isPBToken_Token

func (*PBToken) GetUnitToken

func (m *PBToken) GetUnitToken() *UnitToken

func (*PBToken) GetUserToken

func (m *PBToken) GetUserToken() *UserToken

func (PBToken) MarshalJSON

func (t PBToken) MarshalJSON() ([]byte, error)

func (*PBToken) ProtoMessage

func (*PBToken) ProtoMessage()

func (*PBToken) Reset

func (m *PBToken) Reset()

func (*PBToken) String

func (m *PBToken) String() string

func (*PBToken) UnmarshalJSON

func (t *PBToken) UnmarshalJSON(b []byte) error

func (*PBToken) XXX_OneofFuncs

func (*PBToken) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type PBToken_AnyToken

type PBToken_AnyToken struct {
	AnyToken string `protobuf:"bytes,2,opt,name=any_token,proto3,oneof"`
}

type PBToken_FileToken

type PBToken_FileToken struct {
	FileToken *FileToken `protobuf:"bytes,6,opt,name=file_token,oneof"`
}

type PBToken_RepoToken

type PBToken_RepoToken struct {
	RepoToken *RepoToken `protobuf:"bytes,3,opt,name=repo_token,oneof"`
}

type PBToken_RevToken

type PBToken_RevToken struct {
	RevToken *RevToken `protobuf:"bytes,4,opt,name=rev_token,oneof"`
}

type PBToken_Term

type PBToken_Term struct {
	Term string `protobuf:"bytes,1,opt,name=term,proto3,oneof"`
}

type PBToken_UnitToken

type PBToken_UnitToken struct {
	UnitToken *UnitToken `protobuf:"bytes,5,opt,name=unit_token,oneof"`
}

type PBToken_UserToken

type PBToken_UserToken struct {
	UserToken *UserToken `protobuf:"bytes,7,opt,name=user_token,oneof"`
}

type PasswordResetToken

type PasswordResetToken struct {
	// token is the hard to guess token that allows a user to set a new password.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
}

func (*PasswordResetToken) ProtoMessage

func (*PasswordResetToken) ProtoMessage()

func (*PasswordResetToken) Reset

func (m *PasswordResetToken) Reset()

func (*PasswordResetToken) String

func (m *PasswordResetToken) String() string

type PeopleClient

type PeopleClient interface {
	// Get gets a person. If an email is provided and it resolves to a registered user,
	// information about that user is returned. Otherwise a transient person is created
	// and returned.
	Get(ctx context.Context, in *PersonSpec, opts ...grpc.CallOption) (*Person, error)
}

func NewPeopleClient

func NewPeopleClient(cc *grpc.ClientConn) PeopleClient

type PeopleServer

type PeopleServer interface {
	// Get gets a person. If an email is provided and it resolves to a registered user,
	// information about that user is returned. Otherwise a transient person is created
	// and returned.
	Get(context.Context, *PersonSpec) (*Person, error)
}

type Person

type Person struct {
	// PersonSpec is an identifier for the person. If the person was resolved to a
	// user, then both Login and UID are set. Otherwise only Email is set, and it may
	// be obfuscated (to protect privacy).
	PersonSpec `protobuf:"bytes,1,opt,name=person_spec,embedded=person_spec" json:"person_spec"`
	// FullName is the (possibly empty) full name of the person.
	FullName string `protobuf:"bytes,2,opt,name=full_name,proto3" json:"full_name,omitempty"`
	// AvatarURL is the URL to the user's avatar image.
	AvatarURL string `protobuf:"bytes,3,opt,name=avatar_url,proto3" json:"avatar_url,omitempty"`
}

A Person represents either a registered user or a committer to a repository (typically when their commit email can't be resolved to a user).

func (*Person) AvatarURLOfSize

func (p *Person) AvatarURLOfSize(width int) string

AvatarURLOfSize returns the URL to an avatar for the user with the given width (in pixels).

func (*Person) HasProfile

func (p *Person) HasProfile() bool

HasProfile is true if the person has a profile page on Sourcegraph. Transient users currently do not have profile pages.

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) Reset

func (m *Person) Reset()

func (*Person) ShortName

func (p *Person) ShortName() string

ShortName returns the person's Login if nonempty and otherwise returns the portion of Email before the '@'.

func (*Person) String

func (m *Person) String() string

func (*Person) Transient

func (p *Person) Transient() bool

Transient is true if this person was constructed on the fly and is not persisted or resolved to a Sourcegraph/GitHub/etc. user.

type PersonSpec

type PersonSpec struct {
	// Email is a person's email address. It may be obfuscated (to protect privacy).
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// Login is a user's login.
	Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
	// UID is a user's UID.
	UID int32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
}

PersonSpec specifies a person. At least one of Email, Login, and UID must be nonempty.

func (*PersonSpec) ProtoMessage

func (*PersonSpec) ProtoMessage()

func (*PersonSpec) Reset

func (m *PersonSpec) Reset()

func (*PersonSpec) String

func (m *PersonSpec) String() string

type Plan

type Plan struct {
	Repos *RepoListOptions       `protobuf:"bytes,1,opt,name=repos" json:"repos,omitempty"`
	Defs  *DefListOptions        `protobuf:"bytes,2,opt,name=defs" json:"defs,omitempty"`
	Users *UsersListOptions      `protobuf:"bytes,3,opt,name=users" json:"users,omitempty"`
	Tree  *RepoTreeSearchOptions `protobuf:"bytes,4,opt,name=tree" json:"tree,omitempty"`
	// TreeRepoRevs constrains the Tree search results to a set of repository revisions
	// (given by their URIs plus an optional "@" and a revision specifier). For
	// example, "repo.com/foo@revspec".
	//
	// TODO(sqs): gorilla/schema does not respect ",comma" and it has no similar
	// option, so specifying multiple repo revs here does NOT work.
	TreeRepoRevs []string `protobuf:"bytes,5,rep,name=tree_repo_revs" json:"tree_repo_revs,omitempty" url:",omitempty,comma"`
}

A Plan is a query plan that fetches the data necessary to satisfy (and provide autocomplete suggestions for) a query.

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) Reset

func (m *Plan) Reset()

func (*Plan) String

func (m *Plan) String() string

type Range

type Range struct {
	Start, End int
}

Range is a character range within a file.

TODO(sqs): rune range?

type RawQuery

type RawQuery struct {
	// Text is the raw query string from the client.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// InsertionPoint is the 0-indexed character offset of the text insertion cursor on
	// the client.
	InsertionPoint int32 `protobuf:"varint,2,opt,name=insertion_point,proto3" json:"insertion_point,omitempty"`
}

A RawQuery is a raw search query. To obtain the results for the query, it must be tokenized, parsed, resolved, planned, etc.

func Join

func Join(tokens []Token) RawQuery

Join joins tokens to reconstruct a query string (that, when tokenized, would yield the same tokens). It returns the query and the insertion point (which is the position of the active token's last character, or the position after the last token's last character if there is no active token).

func (*RawQuery) ProtoMessage

func (*RawQuery) ProtoMessage()

func (*RawQuery) Reset

func (m *RawQuery) Reset()

func (*RawQuery) String

func (m *RawQuery) String() string

type Readme

type Readme struct {
	// Path is the relative path of this readme file from the repository root.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// HTML is the formatted HTML of this readme.
	HTML string `protobuf:"bytes,2,opt,name=html,proto3" json:"html,omitempty"`
}

A Readme represents a formatted "README"-type file in a repository.

func (*Readme) ProtoMessage

func (*Readme) ProtoMessage()

func (*Readme) Reset

func (m *Readme) Reset()

func (*Readme) String

func (m *Readme) String() string

type Ref

type Ref struct {
	graph1.Ref `protobuf:"bytes,1,opt,name=ref,embedded=ref" json:""`
	Authorship *AuthorshipInfo `protobuf:"bytes,2,opt,name=authorship" json:"authorship,omitempty"`
}

func (*Ref) ProtoMessage

func (*Ref) ProtoMessage()

func (*Ref) Reset

func (m *Ref) Reset()

func (*Ref) String

func (m *Ref) String() string

type RefList

type RefList struct {
	Refs           []*Ref `protobuf:"bytes,1,rep,name=refs" json:"refs,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*RefList) ProtoMessage

func (*RefList) ProtoMessage()

func (*RefList) Reset

func (m *RefList) Reset()

func (*RefList) String

func (m *RefList) String() string

type Refs

type Refs []*Ref

func (Refs) Len

func (vs Refs) Len() int

func (Refs) Less

func (vs Refs) Less(i, j int) bool

func (Refs) Swap

func (vs Refs) Swap(i, j int)

type RegisteredClient

type RegisteredClient struct {
	// ID is a unique identifier for this client.
	ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// RedirectURIs is a list of allowed redirect URIs.
	RedirectURIs []string `protobuf:"bytes,2,rep,name=redirect_uris" json:"redirect_uris,omitempty"`
	// ClientName is the name of the client to be presented to the
	// end-user.
	ClientName string `protobuf:"bytes,3,opt,name=client_name,proto3" json:"client_name,omitempty"`
	// LogoURI is a URL to this client's logo.
	LogoURI string `protobuf:"bytes,4,opt,name=logo_uri,proto3" json:"logo_uri,omitempty"`
	// ClientURI is a URL to this client's homepage.
	ClientURI string `protobuf:"bytes,5,opt,name=client_uri,proto3" json:"client_uri,omitempty"`
	// JWKS is the client's JSON Web Key Set. It contains the client's
	// public keys, if any.
	JWKS string `protobuf:"bytes,6,opt,name=jwks,proto3" json:"jwks,omitempty"`
	// ClientSecret is the secret value that authenticates the
	// client. It may be empty (e.g., if JWKS keys are used for
	// authentication instead).
	ClientSecret string `protobuf:"bytes,7,opt,name=client_secret,proto3" json:"client_secret,omitempty"`
	// Description is a human-readable description of this API client
	// that's shown to the user during, e.g., OAuth2 authentication.
	Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	// Meta holds arbitrary metadata about this API client. The
	// structure is defined by the API client and is opaque to the
	// server.
	Meta map[string]string `` /* 142-byte string literal not displayed */
	// RegisteredClientType describes this client's type.
	Type RegisteredClientType `protobuf:"varint,10,opt,name=type,proto3,enum=sourcegraph.RegisteredClientType" json:"type,omitempty"`
	// CreatedAt is when this API client's record was created.
	CreatedAt pbtypes.Timestamp `protobuf:"bytes,11,opt,name=created_at" json:"created_at"`
	// UpdatedAt is when this API client's record was last updated.
	UpdatedAt pbtypes.Timestamp `protobuf:"bytes,12,opt,name=updated_at" json:"updated_at"`
}

A RegisteredClient is a registered API client.

Many fields correspond to those listed at http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata.

It's called RegisteredClient instead of Client to avoid a name conflict with the existing Client (Go) type.

func (*RegisteredClient) ProtoMessage

func (*RegisteredClient) ProtoMessage()

func (*RegisteredClient) Reset

func (m *RegisteredClient) Reset()

func (*RegisteredClient) Spec

Spec returns c's RegisteredClientSpec.

func (*RegisteredClient) String

func (m *RegisteredClient) String() string

type RegisteredClientCredentials

type RegisteredClientCredentials struct {
	// ID is the client's ID.
	ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Secret is the client's secret.
	Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
}

A RegisteredClientCredentials authenticates a RegisteredClient.

func (*RegisteredClientCredentials) MarshalText

func (c *RegisteredClientCredentials) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*RegisteredClientCredentials) ProtoMessage

func (*RegisteredClientCredentials) ProtoMessage()

func (*RegisteredClientCredentials) Reset

func (m *RegisteredClientCredentials) Reset()

func (*RegisteredClientCredentials) String

func (m *RegisteredClientCredentials) String() string

func (*RegisteredClientCredentials) UnmarshalText

func (c *RegisteredClientCredentials) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextMarshaler.

type RegisteredClientList

type RegisteredClientList struct {
	Clients        []*RegisteredClient `protobuf:"bytes,1,rep,name=clients" json:"clients,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

RegisteredClientList holds a list of clients.

func (*RegisteredClientList) ProtoMessage

func (*RegisteredClientList) ProtoMessage()

func (*RegisteredClientList) Reset

func (m *RegisteredClientList) Reset()

func (*RegisteredClientList) String

func (m *RegisteredClientList) String() string

type RegisteredClientListOptions

type RegisteredClientListOptions struct {
	Type        RegisteredClientType `protobuf:"varint,1,opt,name=type,proto3,enum=sourcegraph.RegisteredClientType" json:"type,omitempty"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

RegisteredClientListOptions configures a call to RegisteredClients.List.

func (*RegisteredClientListOptions) ProtoMessage

func (*RegisteredClientListOptions) ProtoMessage()

func (*RegisteredClientListOptions) Reset

func (m *RegisteredClientListOptions) Reset()

func (*RegisteredClientListOptions) String

func (m *RegisteredClientListOptions) String() string

type RegisteredClientSpec

type RegisteredClientSpec struct {
	// ID is the client's ID.
	ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

A RegisteredClientSpec uniquely identifies a RegisteredClient.

func (*RegisteredClientSpec) ProtoMessage

func (*RegisteredClientSpec) ProtoMessage()

func (*RegisteredClientSpec) Reset

func (m *RegisteredClientSpec) Reset()

func (*RegisteredClientSpec) String

func (m *RegisteredClientSpec) String() string

type RegisteredClientType

type RegisteredClientType int32

RegisteredClientType is the set of kinds of clients.

const (
	// Any is any type of API client. It should only be used when
	// listing and not actually set on a RegisteredClient object.
	RegisteredClientType_Any RegisteredClientType = 0
	// Other is all other kinds of clients that are not
	// SourcegraphServers.
	RegisteredClientType_Other RegisteredClientType = 1
	// SourcegraphServer indicates this client is a Sourcegraph server
	// instance.
	RegisteredClientType_SourcegraphServer RegisteredClientType = 2
)

func (RegisteredClientType) String

func (x RegisteredClientType) String() string

type RegisteredClientsClient

type RegisteredClientsClient interface {
	// Get retrieves an API client's record given its client ID.
	Get(ctx context.Context, in *RegisteredClientSpec, opts ...grpc.CallOption) (*RegisteredClient, error)
	// GetCurrent is equivalent to a call to Get with the client ID of
	// the currently authenticated client.
	GetCurrent(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*RegisteredClient, error)
	// Create registers an API client.
	Create(ctx context.Context, in *RegisteredClient, opts ...grpc.CallOption) (*RegisteredClient, error)
	// Update modifies an API client's record. The RegisteredClient
	// arg's ID must be set (to specify which client to update). Its
	// Secret field is ignored (the secret may not be updated after
	// creation).
	Update(ctx context.Context, in *RegisteredClient, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// Delete removes an API client. Immediately after deletion, it
	// may no longer be used.
	Delete(ctx context.Context, in *RegisteredClientSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// List enumerates API clients according to the options.
	List(ctx context.Context, in *RegisteredClientListOptions, opts ...grpc.CallOption) (*RegisteredClientList, error)
	// Get the permissions of the user on the specified client.
	GetUserPermissions(ctx context.Context, in *UserPermissionsOptions, opts ...grpc.CallOption) (*UserPermissions, error)
	// Set the permissions of the user on the specified client.
	SetUserPermissions(ctx context.Context, in *UserPermissions, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// List the permissions of all users that are registered on this client.
	ListUserPermissions(ctx context.Context, in *RegisteredClientSpec, opts ...grpc.CallOption) (*UserPermissionsList, error)
}

func NewRegisteredClientsClient

func NewRegisteredClientsClient(cc *grpc.ClientConn) RegisteredClientsClient

type RegisteredClientsServer

type RegisteredClientsServer interface {
	// Get retrieves an API client's record given its client ID.
	Get(context.Context, *RegisteredClientSpec) (*RegisteredClient, error)
	// GetCurrent is equivalent to a call to Get with the client ID of
	// the currently authenticated client.
	GetCurrent(context.Context, *pbtypes1.Void) (*RegisteredClient, error)
	// Create registers an API client.
	Create(context.Context, *RegisteredClient) (*RegisteredClient, error)
	// Update modifies an API client's record. The RegisteredClient
	// arg's ID must be set (to specify which client to update). Its
	// Secret field is ignored (the secret may not be updated after
	// creation).
	Update(context.Context, *RegisteredClient) (*pbtypes1.Void, error)
	// Delete removes an API client. Immediately after deletion, it
	// may no longer be used.
	Delete(context.Context, *RegisteredClientSpec) (*pbtypes1.Void, error)
	// List enumerates API clients according to the options.
	List(context.Context, *RegisteredClientListOptions) (*RegisteredClientList, error)
	// Get the permissions of the user on the specified client.
	GetUserPermissions(context.Context, *UserPermissionsOptions) (*UserPermissions, error)
	// Set the permissions of the user on the specified client.
	SetUserPermissions(context.Context, *UserPermissions) (*pbtypes1.Void, error)
	// List the permissions of all users that are registered on this client.
	ListUserPermissions(context.Context, *RegisteredClientSpec) (*UserPermissionsList, error)
}

type Repo

type Repo struct {
	// URI is a normalized identifier for this repository based on its primary clone
	// URL. E.g., "github.com/user/repo".
	URI string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// Origin is populated for repos fetched via federation or
	// discovery. It is the hostname of the host that owns the repo.
	Origin string `protobuf:"bytes,21,opt,name=origin,proto3" json:"origin,omitempty"`
	// Name is the base name (the final path component) of the repository, typically
	// the name of the directory that the repository would be cloned into. (For
	// example, for git://example.com/foo.git, the name is "foo".)
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description is a brief description of the repository.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// VCS is the short name of the VCS system that this repository uses: "git" or
	// "hg".
	VCS string `protobuf:"bytes,4,opt,name=vcs,proto3" json:"vcs,omitempty"`
	// HTTPCloneURL is the HTTPS clone URL of the repository (or the HTTP clone URL, if
	// no HTTPS clone URL is available).
	HTTPCloneURL string `protobuf:"bytes,5,opt,name=http_clone_url,proto3" json:"http_clone_url,omitempty"`
	// SSHCloneURL is the SSH clone URL if the repository, if any.
	SSHCloneURL string `protobuf:"bytes,6,opt,name=ssh_clone_url,proto3" json:"ssh_clone_url,omitempty"`
	// HomepageURL is the URL to the repository's homepage, if any.
	HomepageURL string `protobuf:"bytes,7,opt,name=homepage_url,proto3" json:"homepage_url,omitempty"`
	// DefaultBranch is the default VCS branch used (typically "master" for git
	// repositories and "default" for hg repositories).
	DefaultBranch string `protobuf:"bytes,8,opt,name=default_branch,proto3" json:"default_branch,omitempty"`
	// Language is the primary programming language used in this repository.
	Language string `protobuf:"bytes,9,opt,name=language,proto3" json:"language,omitempty"`
	// Blocked is whether this repo has been blocked by an admin (and
	// will not be returned via the external API).
	Blocked bool `protobuf:"varint,10,opt,name=blocked,proto3" json:"blocked,omitempty"`
	// Deprecated repositories are labeled as such and hidden from global search
	// results.
	Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
	// Fork is whether this repository is a fork.
	Fork bool `protobuf:"varint,12,opt,name=fork,proto3" json:"fork,omitempty"`
	// Mirror indicates whether this repo's canonical location is on
	// another server. Mirror repos track their upstream.
	Mirror bool `protobuf:"varint,13,opt,name=mirror,proto3" json:"mirror,omitempty"`
	// Private is whether this repository is private.
	Private bool `protobuf:"varint,14,opt,name=private,proto3" json:"private,omitempty"`
	// CreatedAt is when this repository was created. If it represents an externally
	// hosted (e.g., GitHub) repository, the creation date is when it was created at
	// that origin.
	CreatedAt pbtypes.Timestamp `protobuf:"bytes,15,opt,name=created_at" json:"created_at"`
	// UpdatedAt is when this repository's metadata was last updated (on its origin if
	// it's an externally hosted repository).
	UpdatedAt pbtypes.Timestamp `protobuf:"bytes,16,opt,name=updated_at" json:"updated_at"`
	// PushedAt is when this repository's was last (VCS-)pushed to.
	PushedAt pbtypes.Timestamp `protobuf:"bytes,17,opt,name=pushed_at" json:"pushed_at"`
	// Permissions describes the permissions that the current user (or anonymous users,
	// if there is no current user) is granted to this repository.
	Permissions *RepoPermissions `protobuf:"bytes,18,opt,name=permissions" json:"permissions,omitempty"`
	GitHub      *GitHubRepo      `protobuf:"bytes,19,opt,name=github" json:"github,omitempty"`
	Config      *RepoConfig      `protobuf:"bytes,20,opt,name=config" json:"config,omitempty"`
}

Repo represents a source code repository.

func (*Repo) CloneURL

func (r *Repo) CloneURL() *url.URL

Returns the repository's canonical clone URL

func (*Repo) GitHubHTMLURL

func (r *Repo) GitHubHTMLURL() string

GitHubHTMLURL returns URL to the GitHub HTML page (e.g., https://github.com/foo/bar, not a clone URL) for this repo, if it's a GitHub repo. Otherwise it returns the empty string.

func (*Repo) IsGitHubRepo

func (r *Repo) IsGitHubRepo() bool

IsGitHubRepo returns true iff this repository is hosted on GitHub.

func (*Repo) ProtoMessage

func (*Repo) ProtoMessage()

func (*Repo) RepoSpec

func (r *Repo) RepoSpec() RepoSpec

RepoSpec returns the RepoSpec that specifies r.

func (*Repo) Reset

func (m *Repo) Reset()

func (*Repo) String

func (m *Repo) String() string

type RepoBadgesClient

type RepoBadgesClient interface {
	// ListBadges lists the available badges for repo.
	ListBadges(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*BadgeList, error)
	// ListCounters lists the available counters for repo.
	ListCounters(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*CounterList, error)
	// RecordHit records a visit to a repo (that will be reflected in
	// its counter).
	RecordHit(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// CountHits returns the hit count (optionally in a recent time
	// period).
	CountHits(ctx context.Context, in *RepoBadgesCountHitsOp, opts ...grpc.CallOption) (*RepoBadgesCountHitsResult, error)
}

func NewRepoBadgesClient

func NewRepoBadgesClient(cc *grpc.ClientConn) RepoBadgesClient

type RepoBadgesCountHitsOp

type RepoBadgesCountHitsOp struct {
	Repo  RepoSpec           `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Since *pbtypes.Timestamp `protobuf:"bytes,2,opt,name=since" json:"since,omitempty"`
}

func (*RepoBadgesCountHitsOp) ProtoMessage

func (*RepoBadgesCountHitsOp) ProtoMessage()

func (*RepoBadgesCountHitsOp) Reset

func (m *RepoBadgesCountHitsOp) Reset()

func (*RepoBadgesCountHitsOp) String

func (m *RepoBadgesCountHitsOp) String() string

type RepoBadgesCountHitsResult

type RepoBadgesCountHitsResult struct {
	Hits int32 `protobuf:"varint,1,opt,name=hits,proto3" json:"hits,omitempty"`
}

func (*RepoBadgesCountHitsResult) ProtoMessage

func (*RepoBadgesCountHitsResult) ProtoMessage()

func (*RepoBadgesCountHitsResult) Reset

func (m *RepoBadgesCountHitsResult) Reset()

func (*RepoBadgesCountHitsResult) String

func (m *RepoBadgesCountHitsResult) String() string

type RepoBadgesServer

type RepoBadgesServer interface {
	// ListBadges lists the available badges for repo.
	ListBadges(context.Context, *RepoSpec) (*BadgeList, error)
	// ListCounters lists the available counters for repo.
	ListCounters(context.Context, *RepoSpec) (*CounterList, error)
	// RecordHit records a visit to a repo (that will be reflected in
	// its counter).
	RecordHit(context.Context, *RepoSpec) (*pbtypes1.Void, error)
	// CountHits returns the hit count (optionally in a recent time
	// period).
	CountHits(context.Context, *RepoBadgesCountHitsOp) (*RepoBadgesCountHitsResult, error)
}

type RepoBuildInfo

type RepoBuildInfo struct {
	Exact                *Build      `protobuf:"bytes,1,opt,name=exact" json:"exact,omitempty"`
	LastSuccessful       *Build      `protobuf:"bytes,2,opt,name=last_successful" json:"last_successful,omitempty"`
	CommitsBehind        int32       `protobuf:"varint,3,opt,name=commits_behind,proto3" json:"commits_behind,omitempty"`
	LastSuccessfulCommit *vcs.Commit `protobuf:"bytes,4,opt,name=last_successful_commit" json:"last_successful_commit,omitempty"`
}

RepoBuildInfo holds a repository build (if one exists for the originally specified revspec) and additional information. It is returned by Repos.GetRepoBuildInfo.

func (*RepoBuildInfo) ProtoMessage

func (*RepoBuildInfo) ProtoMessage()

func (*RepoBuildInfo) Reset

func (m *RepoBuildInfo) Reset()

func (*RepoBuildInfo) String

func (m *RepoBuildInfo) String() string

type RepoConfig

type RepoConfig struct {
	// Enabled is whether this repository has been enabled for use on
	// Sourcegraph by a repository owner or a site admin.
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// LastAdminUID is the UID of the last repo admin user to modify
	// this repo's settings (for mirrored repos only). When
	// Sourcegraph needs to perform actions on mirrored GitHub repos
	// that require OAuth authorization outside of an authorized API
	// request (e.g., during builds or asynchronous operations), it
	// consults the repo's LastAdminUID to determine whose identity it
	// should assume to perform the operation.
	//
	// If the LastAdminUID refers to a user who no longer has
	// permissions to perform the action, GitHub will refuse to
	// perform the operation. In that case, another admin of the
	// repository needs to update the settings so that she will become
	// the new LastAdminUID.
	LastAdminUID int32 `protobuf:"varint,2,opt,name=last_admin_uid,proto3" json:"last_admin_uid,omitempty"`
}

RepoConfig describes a repository's config. This config is Sourcegraph-specific and is persisted locally.

Note: See the RepoOrigins doc for more information on the split between Sourcegraph-specific data and origin-specific data.

func (*RepoConfig) ProtoMessage

func (*RepoConfig) ProtoMessage()

func (*RepoConfig) Reset

func (m *RepoConfig) Reset()

func (*RepoConfig) String

func (m *RepoConfig) String() string

type RepoList

type RepoList struct {
	Repos []*Repo `protobuf:"bytes,1,rep,name=repos" json:"repos,omitempty"`
}

func (*RepoList) ProtoMessage

func (*RepoList) ProtoMessage()

func (*RepoList) Reset

func (m *RepoList) Reset()

func (*RepoList) String

func (m *RepoList) String() string

type RepoListBranchesOptions

type RepoListBranchesOptions struct {
	IncludeCommit     bool   `protobuf:"varint,4,opt,name=include_commit,proto3" json:"include_commit,omitempty"`
	BehindAheadBranch string `protobuf:"bytes,5,opt,name=behind_ahead_branch,proto3" json:"behind_ahead_branch,omitempty"`
	ContainsCommit    string `protobuf:"bytes,6,opt,name=contains_commit,proto3" json:"contains_commit,omitempty"`
	ListOptions       `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*RepoListBranchesOptions) ProtoMessage

func (*RepoListBranchesOptions) ProtoMessage()

func (*RepoListBranchesOptions) Reset

func (m *RepoListBranchesOptions) Reset()

func (*RepoListBranchesOptions) String

func (m *RepoListBranchesOptions) String() string

type RepoListCommitsOptions

type RepoListCommitsOptions struct {
	Head         string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty" url:",omitempty"`
	Base         string `protobuf:"bytes,2,opt,name=base,proto3" json:"base,omitempty" url:",omitempty"`
	ListOptions  `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
	Path         string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty" url:",omitempty"`
	RefreshCache bool   `protobuf:"varint,5,opt,name=refresh_cache,proto3" json:"refresh_cache,omitempty" url:",omitempty"`
}

func (*RepoListCommitsOptions) ProtoMessage

func (*RepoListCommitsOptions) ProtoMessage()

func (*RepoListCommitsOptions) Reset

func (m *RepoListCommitsOptions) Reset()

func (*RepoListCommitsOptions) String

func (m *RepoListCommitsOptions) String() string

type RepoListCommittersOptions

type RepoListCommittersOptions struct {
	Rev         string `protobuf:"bytes,1,opt,name=rev,proto3" json:"rev,omitempty"`
	ListOptions `protobuf:"bytes,2,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*RepoListCommittersOptions) ProtoMessage

func (*RepoListCommittersOptions) ProtoMessage()

func (*RepoListCommittersOptions) Reset

func (m *RepoListCommittersOptions) Reset()

func (*RepoListCommittersOptions) String

func (m *RepoListCommittersOptions) String() string

type RepoListOptions

type RepoListOptions struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" url:",omitempty"`
	// Specifies a search query for repositories. If specified, then the Sort and
	// Direction options are ignored
	Query       string   `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty" url:",omitempty"`
	URIs        []string `protobuf:"bytes,3,rep,name=uri_s" json:"uri_s,omitempty" url:",comma,omitempty"`
	BuiltOnly   bool     `protobuf:"varint,4,opt,name=built_only,proto3" json:"built_only,omitempty" url:",omitempty"`
	Sort        string   `protobuf:"bytes,5,opt,name=sort,proto3" json:"sort,omitempty" url:",omitempty"`
	Direction   string   `protobuf:"bytes,6,opt,name=direction,proto3" json:"direction,omitempty" url:",omitempty"`
	NoFork      bool     `protobuf:"varint,7,opt,name=no_fork,proto3" json:"no_fork,omitempty" url:",omitempty"`
	Type        string   `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty" url:",omitempty"`
	State       string   `protobuf:"bytes,9,opt,name=state,proto3" json:"state,omitempty" url:",omitempty"`
	Owner       string   `protobuf:"bytes,10,opt,name=owner,proto3" json:"owner,omitempty" url:",omitempty"`
	ListOptions `protobuf:"bytes,11,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*RepoListOptions) ProtoMessage

func (*RepoListOptions) ProtoMessage()

func (*RepoListOptions) Reset

func (m *RepoListOptions) Reset()

func (*RepoListOptions) String

func (m *RepoListOptions) String() string

type RepoListTagsOptions

type RepoListTagsOptions struct {
	ListOptions `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*RepoListTagsOptions) ProtoMessage

func (*RepoListTagsOptions) ProtoMessage()

func (*RepoListTagsOptions) Reset

func (m *RepoListTagsOptions) Reset()

func (*RepoListTagsOptions) String

func (m *RepoListTagsOptions) String() string

type RepoPermissions

type RepoPermissions struct {
	Read  bool `protobuf:"varint,1,opt,name=read,proto3" json:"read,omitempty"`
	Write bool `protobuf:"varint,2,opt,name=write,proto3" json:"write,omitempty"`
	Admin bool `protobuf:"varint,3,opt,name=admin,proto3" json:"admin,omitempty"`
}

RepoPermissions describes the possible permissions that a user (or an anonymous user) can be granted to a repository.

func (*RepoPermissions) ProtoMessage

func (*RepoPermissions) ProtoMessage()

func (*RepoPermissions) Reset

func (m *RepoPermissions) Reset()

func (*RepoPermissions) String

func (m *RepoPermissions) String() string

type RepoRevSpec

type RepoRevSpec struct {
	RepoSpec `protobuf:"bytes,1,opt,name=repo_spec,embedded=repo_spec" json:"repo_spec"`
	Rev      string `protobuf:"bytes,2,opt,name=rev,proto3" json:"rev,omitempty"`
	CommitID string `protobuf:"bytes,3,opt,name=commit_id,proto3" json:"commit_id,omitempty"`
}

RepoRevSpec specifies a repository at a specific commit (or revision specifier, such as a branch, which is resolved on the server side to a specific commit).

Filling in CommitID is an optional optimization. It avoids the need for another resolution of Rev. If CommitID is filled in, the "Rev" route variable becomes "Rev===CommitID" (e.g., "master===af4cd6"). Handlers can parse this string to retrieve the pre-resolved commit ID (e.g., "af4cd6") and still return data that constructs URLs using the unresolved revspec (e.g., "master").

Why is it important/useful to pass the resolved commit ID instead of just using a revspec everywhere? Consider this case. Your application wants to make a bunch of requests for resources relating to "master"; for example, it wants to retrieve a source file foo.go at master and all of the definitions and references contained in the file. This may consist of dozens of API calls. If each API call specified just "master", there would be 2 problems: (1) each API call would have to re-resolve "master" to its actual commit ID, which takes a lot of extra work; and (2) if the "master" ref changed during the API calls (if someone pushed in the middle of the API call, for example), then your application would receive data from 2 different commits. The solution is for your application to resolve the revspec once and pass both the original revspec and the resolved commit ID in all API calls it makes.

And why do we want to preserve the unresolved revspec? In this case, your app wants to let the user continue browsing "master". If the API data all referred to a specific commit ID, then the user would cease browsing master the next time she clicked a link on your app. Preserving the revspec gives the user a choice whether to use the absolute commit ID or the revspec (similar to how GitHub lets you canonicalize a URL with 'y' but does not default to using the canonical URL).

func UnmarshalRepoRevSpec

func UnmarshalRepoRevSpec(routeVars map[string]string) (RepoRevSpec, error)

UnmarshalRepoRevSpec marshals a map containing route variables generated by (RepoRevSpec).RouteVars() and returns the equivalent RepoRevSpec struct.

func (*RepoRevSpec) ProtoMessage

func (*RepoRevSpec) ProtoMessage()

func (*RepoRevSpec) Reset

func (m *RepoRevSpec) Reset()

func (RepoRevSpec) Resolved

func (s RepoRevSpec) Resolved() bool

Resolved reports whether the revspec has been fully resolved to an absolute (40-char) commit ID.

func (RepoRevSpec) ResolvedRevString

func (s RepoRevSpec) ResolvedRevString() string

ResolvedRevString encodes the revision and commit ID. If CommitID is set, the return value is "Rev===CommitID"; otherwise, it is just "Rev". See the docstring for RepoRevSpec for an explanation why.

func (RepoRevSpec) RouteVars

func (s RepoRevSpec) RouteVars() map[string]string

RouteVars returns route variables for constructing routes to a repository commit.

func (*RepoRevSpec) String

func (m *RepoRevSpec) String() string

type RepoSourceUnitList

type RepoSourceUnitList struct {
	Units []*unit.RepoSourceUnit `protobuf:"bytes,1,rep,name=units" json:"units,omitempty"`
}

func (*RepoSourceUnitList) ProtoMessage

func (*RepoSourceUnitList) ProtoMessage()

func (*RepoSourceUnitList) Reset

func (m *RepoSourceUnitList) Reset()

func (*RepoSourceUnitList) String

func (m *RepoSourceUnitList) String() string

type RepoSpec

type RepoSpec struct {
	URI string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
}

RepoSpec specifies a repository.

func ParseRepoSpec

func ParseRepoSpec(s string) (RepoSpec, error)

ParseRepoSpec parses a string generated by (RepoSpec).SpecString() and returns the equivalent RepoSpec struct.

func UnmarshalRepoSpec

func UnmarshalRepoSpec(routeVars map[string]string) (RepoSpec, error)

UnmarshalRepoSpec marshals a map containing route variables generated by (*RepoSpec).RouteVars() and returns the equivalent RepoSpec struct.

func (RepoSpec) IsZero

func (s RepoSpec) IsZero() bool

IsZero reports whether s.URI is the zero value.

func (*RepoSpec) ProtoMessage

func (*RepoSpec) ProtoMessage()

func (*RepoSpec) Reset

func (m *RepoSpec) Reset()

func (RepoSpec) RouteVars

func (s RepoSpec) RouteVars() map[string]string

RouteVars returns route variables for constructing repository routes.

func (RepoSpec) SpecString

func (s RepoSpec) SpecString() string

SpecString returns the string representation of the RepoSpec (which is just the URI). If the URI is empty, it panics.

func (*RepoSpec) String

func (m *RepoSpec) String() string

type RepoStatus

type RepoStatus struct {
	// State is the current status of the repository. Possible values are: pending,
	// success, error, or failure.
	State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// TargetURL is the URL of the page representing this status. It will be linked
	// from the UI to allow users to see the source of the status.
	TargetURL string `protobuf:"bytes,3,opt,name=target_url,proto3" json:"target_url,omitempty"`
	// Description is a short, high-level summary of the status.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// A string label to differentiate this status from the statuses of other systems.
	Context   string            `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
	CreatedAt pbtypes.Timestamp `protobuf:"bytes,6,opt,name=created_at" json:"created_at"`
	UpdatedAt pbtypes.Timestamp `protobuf:"bytes,7,opt,name=updated_at" json:"updated_at"`
}

RepoStatus is the status of the repository at a specific rev (in a single context).

func (*RepoStatus) ProtoMessage

func (*RepoStatus) ProtoMessage()

func (*RepoStatus) Reset

func (m *RepoStatus) Reset()

func (*RepoStatus) String

func (m *RepoStatus) String() string

type RepoStatusesClient

type RepoStatusesClient interface {
	// GetCombined fetches the combined repository status for the given commit.
	GetCombined(ctx context.Context, in *RepoRevSpec, opts ...grpc.CallOption) (*CombinedStatus, error)
	// Create creates a repository status for the given commit.
	Create(ctx context.Context, in *RepoStatusesCreateOp, opts ...grpc.CallOption) (*RepoStatus, error)
}

func NewRepoStatusesClient

func NewRepoStatusesClient(cc *grpc.ClientConn) RepoStatusesClient

type RepoStatusesCreateOp

type RepoStatusesCreateOp struct {
	Repo   RepoRevSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Status RepoStatus  `protobuf:"bytes,2,opt,name=status" json:"status"`
}

func (*RepoStatusesCreateOp) ProtoMessage

func (*RepoStatusesCreateOp) ProtoMessage()

func (*RepoStatusesCreateOp) Reset

func (m *RepoStatusesCreateOp) Reset()

func (*RepoStatusesCreateOp) String

func (m *RepoStatusesCreateOp) String() string

type RepoStatusesServer

type RepoStatusesServer interface {
	// GetCombined fetches the combined repository status for the given commit.
	GetCombined(context.Context, *RepoRevSpec) (*CombinedStatus, error)
	// Create creates a repository status for the given commit.
	Create(context.Context, *RepoStatusesCreateOp) (*RepoStatus, error)
}

type RepoToken

type RepoToken struct {
	URI  string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	Repo *Repo  `protobuf:"bytes,2,opt,name=repo" json:"repo,omitempty"`
}

A RepoToken represents a repository, although it does not necessarily uniquely identify the repository. It consists of any number of slash-separated path components, such as "a/b" or "github.com/foo/bar".

func (*RepoToken) ProtoMessage

func (*RepoToken) ProtoMessage()

func (*RepoToken) Reset

func (m *RepoToken) Reset()

func (RepoToken) Spec

func (t RepoToken) Spec() RepoSpec

func (*RepoToken) String

func (m *RepoToken) String() string

func (RepoToken) Token

func (t RepoToken) Token() string

type RepoTreeClient

type RepoTreeClient interface {
	Get(ctx context.Context, in *RepoTreeGetOp, opts ...grpc.CallOption) (*TreeEntry, error)
	Search(ctx context.Context, in *RepoTreeSearchOp, opts ...grpc.CallOption) (*VCSSearchResultList, error)
	// List returns a list of all the files in the repo tree at
	// the given revision.
	List(ctx context.Context, in *RepoTreeListOp, opts ...grpc.CallOption) (*RepoTreeListResult, error)
}

func NewRepoTreeClient

func NewRepoTreeClient(cc *grpc.ClientConn) RepoTreeClient

type RepoTreeGetOp

type RepoTreeGetOp struct {
	Entry TreeEntrySpec       `protobuf:"bytes,1,opt,name=entry" json:"entry"`
	Opt   *RepoTreeGetOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*RepoTreeGetOp) ProtoMessage

func (*RepoTreeGetOp) ProtoMessage()

func (*RepoTreeGetOp) Reset

func (m *RepoTreeGetOp) Reset()

func (*RepoTreeGetOp) String

func (m *RepoTreeGetOp) String() string

type RepoTreeGetOptions

type RepoTreeGetOptions struct {
	// Formatted is whether the specified entry, if it's a file, should have its
	// Contents code-formatted using HTML.
	Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty"`
	// HighlightStrings is a list of fixed strings that should be wrapped in a <span
	// class="highlight"> in the returned HTML. It only takes effect if Formatted is
	// true.
	HighlightStrings []string `protobuf:"bytes,2,rep,name=highlight_strings" json:"highlight_strings,omitempty"`
	// TokenizedSource requests that the source code be returned as a tokenized data
	// structure rather than an (annotated) string.
	//
	// This is useful when the client wants to take full control of rendering and
	// manipulating the contents.
	TokenizedSource          bool `protobuf:"varint,3,opt,name=tokenized_source,proto3" json:"tokenized_source,omitempty" url:",omitempty"`
	ContentsAsString         bool `protobuf:"varint,4,opt,name=contents_as_string,proto3" json:"contents_as_string,omitempty" url:",omitempty"`
	vcsclient.GetFileOptions `protobuf:"bytes,5,opt,name=get_file_options,embedded=get_file_options" json:"get_file_options"`
}

RepoTreeGetOptions specifies options for (RepoTreeService).Get.

func (*RepoTreeGetOptions) ProtoMessage

func (*RepoTreeGetOptions) ProtoMessage()

func (*RepoTreeGetOptions) Reset

func (m *RepoTreeGetOptions) Reset()

func (*RepoTreeGetOptions) String

func (m *RepoTreeGetOptions) String() string

type RepoTreeListOp

type RepoTreeListOp struct {
	Rev RepoRevSpec `protobuf:"bytes,1,opt,name=rev" json:"rev"`
}

func (*RepoTreeListOp) ProtoMessage

func (*RepoTreeListOp) ProtoMessage()

func (*RepoTreeListOp) Reset

func (m *RepoTreeListOp) Reset()

func (*RepoTreeListOp) String

func (m *RepoTreeListOp) String() string

type RepoTreeListResult

type RepoTreeListResult struct {
	Files []string `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"`
}

func (*RepoTreeListResult) ProtoMessage

func (*RepoTreeListResult) ProtoMessage()

func (*RepoTreeListResult) Reset

func (m *RepoTreeListResult) Reset()

func (*RepoTreeListResult) String

func (m *RepoTreeListResult) String() string

type RepoTreeSearchOp

type RepoTreeSearchOp struct {
	Rev RepoRevSpec            `protobuf:"bytes,1,opt,name=rev" json:"rev"`
	Opt *RepoTreeSearchOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*RepoTreeSearchOp) ProtoMessage

func (*RepoTreeSearchOp) ProtoMessage()

func (*RepoTreeSearchOp) Reset

func (m *RepoTreeSearchOp) Reset()

func (*RepoTreeSearchOp) String

func (m *RepoTreeSearchOp) String() string

type RepoTreeSearchOptions

type RepoTreeSearchOptions struct {
	vcs.SearchOptions `protobuf:"bytes,1,opt,name=search_options,embedded=search_options" json:"search_options"`
	Formatted         bool `protobuf:"varint,2,opt,name=formatted,proto3" json:"formatted,omitempty"`
}

func (*RepoTreeSearchOptions) ProtoMessage

func (*RepoTreeSearchOptions) ProtoMessage()

func (*RepoTreeSearchOptions) Reset

func (m *RepoTreeSearchOptions) Reset()

func (*RepoTreeSearchOptions) String

func (m *RepoTreeSearchOptions) String() string

type RepoTreeSearchResult

type RepoTreeSearchResult struct {
	vcs.SearchResult `protobuf:"bytes,1,opt,name=search_result,embedded=search_result" json:"search_result"`
	RepoRev          RepoRevSpec `protobuf:"bytes,2,opt,name=repo_rev" json:"repo_rev"`
}

A RepoTreeSearchResult is a tree search result that includes the repo and rev it came from.

func (*RepoTreeSearchResult) ProtoMessage

func (*RepoTreeSearchResult) ProtoMessage()

func (*RepoTreeSearchResult) Reset

func (m *RepoTreeSearchResult) Reset()

func (*RepoTreeSearchResult) String

func (m *RepoTreeSearchResult) String() string

type RepoTreeServer

type RepoTreeServer interface {
	Get(context.Context, *RepoTreeGetOp) (*TreeEntry, error)
	Search(context.Context, *RepoTreeSearchOp) (*VCSSearchResultList, error)
	// List returns a list of all the files in the repo tree at
	// the given revision.
	List(context.Context, *RepoTreeListOp) (*RepoTreeListResult, error)
}

type ReposClient

type ReposClient interface {
	// Get fetches a repository.
	Get(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*Repo, error)
	// List repositories.
	List(ctx context.Context, in *RepoListOptions, opts ...grpc.CallOption) (*RepoList, error)
	// Create creates a new repository.
	Create(ctx context.Context, in *ReposCreateOp, opts ...grpc.CallOption) (*Repo, error)
	// Update updates a repository.
	Update(ctx context.Context, in *ReposUpdateOp, opts ...grpc.CallOption) (*Repo, error)
	// Delete removes a repository.
	Delete(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// GetReadme fetches the formatted README file for a repository.
	GetReadme(ctx context.Context, in *RepoRevSpec, opts ...grpc.CallOption) (*Readme, error)
	// Enable enables the specified repository.
	Enable(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// Disable disables the specified repository.
	Disable(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// GetConfig retrieves the configuration for a repository. To
	// update the config, use Enable or Disable (direct updating is
	// not currently supported).
	GetConfig(ctx context.Context, in *RepoSpec, opts ...grpc.CallOption) (*RepoConfig, error)
	// TODO(sqs!nodb-ctx): move these to a "VCS" service (not Repos)
	// TODO(slimsag): add google.api.http annotations to these once moved
	GetCommit(ctx context.Context, in *RepoRevSpec, opts ...grpc.CallOption) (*vcs.Commit, error)
	// ListCommits returns the list of commits that span between the revisions
	// specified in the given DeltaSpec. By default, it will return 1 page of
	// commits with a maximum of DefaultPerPage entries. To retrieve all commits
	// the PerPage value can be set to -1.
	ListCommits(ctx context.Context, in *ReposListCommitsOp, opts ...grpc.CallOption) (*CommitList, error)
	ListBranches(ctx context.Context, in *ReposListBranchesOp, opts ...grpc.CallOption) (*BranchList, error)
	ListTags(ctx context.Context, in *ReposListTagsOp, opts ...grpc.CallOption) (*TagList, error)
	// ListCommitters returns the list of authors who have contributed
	// to the main branch of the repo.
	ListCommitters(ctx context.Context, in *ReposListCommittersOp, opts ...grpc.CallOption) (*CommitterList, error)
}

func NewReposClient

func NewReposClient(cc *grpc.ClientConn) ReposClient

type ReposCreateOp

type ReposCreateOp struct {
	// URI is the desired URI of the new repository.
	URI string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// VCS is the desired VCS type of the new repository (only "git"
	// is currently supported).
	VCS string `protobuf:"bytes,2,opt,name=vcs,proto3" json:"vcs,omitempty"`
	// CloneURL is the clone URL of the repository for mirrored
	// repositories. If blank, a new hosted repository is created
	// (i.e., a repo whose origin is on the server). If Mirror is
	// true, a clone URL must be provided.
	CloneURL string `protobuf:"bytes,3,opt,name=clone_url,proto3" json:"clone_url,omitempty"`
	// Mirror is a boolean value indicating whether the newly created
	// repository should be a mirror. Mirror repositories are
	// periodically updated to track their upstream (which is
	// specified using the CloneURL field of this message).
	Mirror bool `protobuf:"varint,4,opt,name=mirror,proto3" json:"mirror,omitempty"`
	// Private is whether this repository is private.
	Private bool `protobuf:"varint,5,opt,name=private,proto3" json:"private,omitempty"`
	// Description is the description of the repository.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// Language is the primary programming language of the repository.
	Language string `protobuf:"bytes,7,opt,name=language,proto3" json:"language,omitempty"`
}

func (*ReposCreateOp) ProtoMessage

func (*ReposCreateOp) ProtoMessage()

func (*ReposCreateOp) Reset

func (m *ReposCreateOp) Reset()

func (*ReposCreateOp) String

func (m *ReposCreateOp) String() string

type ReposListBranchesOp

type ReposListBranchesOp struct {
	Repo RepoSpec                 `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Opt  *RepoListBranchesOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*ReposListBranchesOp) ProtoMessage

func (*ReposListBranchesOp) ProtoMessage()

func (*ReposListBranchesOp) Reset

func (m *ReposListBranchesOp) Reset()

func (*ReposListBranchesOp) String

func (m *ReposListBranchesOp) String() string

type ReposListCommitsOp

type ReposListCommitsOp struct {
	Repo RepoSpec                `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Opt  *RepoListCommitsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*ReposListCommitsOp) ProtoMessage

func (*ReposListCommitsOp) ProtoMessage()

func (*ReposListCommitsOp) Reset

func (m *ReposListCommitsOp) Reset()

func (*ReposListCommitsOp) String

func (m *ReposListCommitsOp) String() string

type ReposListCommittersOp

type ReposListCommittersOp struct {
	Repo RepoSpec                   `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Opt  *RepoListCommittersOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*ReposListCommittersOp) ProtoMessage

func (*ReposListCommittersOp) ProtoMessage()

func (*ReposListCommittersOp) Reset

func (m *ReposListCommittersOp) Reset()

func (*ReposListCommittersOp) String

func (m *ReposListCommittersOp) String() string

type ReposListTagsOp

type ReposListTagsOp struct {
	Repo RepoSpec             `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	Opt  *RepoListTagsOptions `protobuf:"bytes,2,opt,name=opt" json:"opt,omitempty"`
}

func (*ReposListTagsOp) ProtoMessage

func (*ReposListTagsOp) ProtoMessage()

func (*ReposListTagsOp) Reset

func (m *ReposListTagsOp) Reset()

func (*ReposListTagsOp) String

func (m *ReposListTagsOp) String() string

type ReposServer

type ReposServer interface {
	// Get fetches a repository.
	Get(context.Context, *RepoSpec) (*Repo, error)
	// List repositories.
	List(context.Context, *RepoListOptions) (*RepoList, error)
	// Create creates a new repository.
	Create(context.Context, *ReposCreateOp) (*Repo, error)
	// Update updates a repository.
	Update(context.Context, *ReposUpdateOp) (*Repo, error)
	// Delete removes a repository.
	Delete(context.Context, *RepoSpec) (*pbtypes1.Void, error)
	// GetReadme fetches the formatted README file for a repository.
	GetReadme(context.Context, *RepoRevSpec) (*Readme, error)
	// Enable enables the specified repository.
	Enable(context.Context, *RepoSpec) (*pbtypes1.Void, error)
	// Disable disables the specified repository.
	Disable(context.Context, *RepoSpec) (*pbtypes1.Void, error)
	// GetConfig retrieves the configuration for a repository. To
	// update the config, use Enable or Disable (direct updating is
	// not currently supported).
	GetConfig(context.Context, *RepoSpec) (*RepoConfig, error)
	// TODO(sqs!nodb-ctx): move these to a "VCS" service (not Repos)
	// TODO(slimsag): add google.api.http annotations to these once moved
	GetCommit(context.Context, *RepoRevSpec) (*vcs.Commit, error)
	// ListCommits returns the list of commits that span between the revisions
	// specified in the given DeltaSpec. By default, it will return 1 page of
	// commits with a maximum of DefaultPerPage entries. To retrieve all commits
	// the PerPage value can be set to -1.
	ListCommits(context.Context, *ReposListCommitsOp) (*CommitList, error)
	ListBranches(context.Context, *ReposListBranchesOp) (*BranchList, error)
	ListTags(context.Context, *ReposListTagsOp) (*TagList, error)
	// ListCommitters returns the list of authors who have contributed
	// to the main branch of the repo.
	ListCommitters(context.Context, *ReposListCommittersOp) (*CommitterList, error)
}

type ReposUpdateOp

type ReposUpdateOp struct {
	// Repo is the repository to update.
	Repo RepoSpec `protobuf:"bytes,1,opt,name=repo" json:"repo"`
	// Description is the new description of the repository. If empty,
	// the description is not changed.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Language is the new primary programming language of the
	// repository. If empty, the language is not changed.
	Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"`
}

ReposUpdateOp is an operation to update a repository's metadata.

func (*ReposUpdateOp) ProtoMessage

func (*ReposUpdateOp) ProtoMessage()

func (*ReposUpdateOp) Reset

func (m *ReposUpdateOp) Reset()

func (*ReposUpdateOp) String

func (m *ReposUpdateOp) String() string

type ResolvedQuery

type ResolvedQuery struct {
	// Tokens are resolved tokens, each of whose meaning is unambiguous.
	Tokens []PBToken `protobuf:"bytes,1,rep,name=tokens" json:"tokens"`
}

A ResolvedQuery is a query that has been parsed and resolved so that each token is given an unambiguous meaning.

func (*ResolvedQuery) ProtoMessage

func (*ResolvedQuery) ProtoMessage()

func (*ResolvedQuery) Reset

func (m *ResolvedQuery) Reset()

func (*ResolvedQuery) String

func (m *ResolvedQuery) String() string

type RevToken

type RevToken struct {
	// Rev is either a revspec or commit ID
	Rev    string      `protobuf:"bytes,1,opt,name=rev,proto3" json:"rev,omitempty"`
	Commit *vcs.Commit `protobuf:"bytes,2,opt,name=commit" json:"commit,omitempty"`
}

A RevToken represents a specific revision (either a revspec or a commit ID) of a repository (which must be specified by a previous RepoToken in the query).

func (*RevToken) ProtoMessage

func (*RevToken) ProtoMessage()

func (*RevToken) Reset

func (m *RevToken) Reset()

func (*RevToken) String

func (m *RevToken) String() string

func (RevToken) Token

func (t RevToken) Token() string

type SSHPrivateKey

type SSHPrivateKey struct {
	// PEM is the encoded key.
	PEM []byte `protobuf:"bytes,2,opt,name=pem,proto3" json:"pem,omitempty"`
}

An SSHPrivateKey is an SSH key used to access a repository.

func (*SSHPrivateKey) ProtoMessage

func (*SSHPrivateKey) ProtoMessage()

func (*SSHPrivateKey) Reset

func (m *SSHPrivateKey) Reset()

func (*SSHPrivateKey) String

func (m *SSHPrivateKey) String() string

type SSHPublicKey

type SSHPublicKey struct {
	// Key is the serialized key data in SSH wire format, with the name prefix.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

SSHPublicKey that users to authenticate with for SSH git access.

func (*SSHPublicKey) ProtoMessage

func (*SSHPublicKey) ProtoMessage()

func (*SSHPublicKey) Reset

func (m *SSHPublicKey) Reset()

func (*SSHPublicKey) String

func (m *SSHPublicKey) String() string

type SearchClient

type SearchClient interface {
	// Search searches the full index.
	// Deprecated: use one of the more specific search methods below.
	Search(ctx context.Context, in *SearchOptions, opts ...grpc.CallOption) (*SearchResults, error)
	// SearchTokens searches the index of tokens.
	SearchTokens(ctx context.Context, in *TokenSearchOptions, opts ...grpc.CallOption) (*DefList, error)
	// SearchText searches the content of files in the repo tree.
	SearchText(ctx context.Context, in *TextSearchOptions, opts ...grpc.CallOption) (*VCSSearchResultList, error)
	// Complete completes the token at the RawQuery's InsertionPoint.
	Complete(ctx context.Context, in *RawQuery, opts ...grpc.CallOption) (*Completions, error)
	// Suggest suggests queries given an existing query. It can be called with an empty
	// query to get example queries that pertain to the current user's repositories,
	// orgs, etc.
	Suggest(ctx context.Context, in *RawQuery, opts ...grpc.CallOption) (*SuggestionList, error)
}

func NewSearchClient

func NewSearchClient(cc *grpc.ClientConn) SearchClient

type SearchOptions

type SearchOptions struct {
	Query       string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty" url:"q" schema:"q"`
	Defs        bool   `protobuf:"varint,2,opt,name=defs,proto3" json:"defs,omitempty"`
	Repos       bool   `protobuf:"varint,3,opt,name=repos,proto3" json:"repos,omitempty"`
	People      bool   `protobuf:"varint,4,opt,name=people,proto3" json:"people,omitempty"`
	Tree        bool   `protobuf:"varint,5,opt,name=tree,proto3" json:"tree,omitempty"`
	ListOptions `protobuf:"bytes,6,opt,name=list_options,embedded=list_options" json:"list_options"`
}

Deprecated.

func (*SearchOptions) ProtoMessage

func (*SearchOptions) ProtoMessage()

func (*SearchOptions) Reset

func (m *SearchOptions) Reset()

func (*SearchOptions) String

func (m *SearchOptions) String() string

type SearchResults

type SearchResults struct {
	Defs   []*Def                  `protobuf:"bytes,1,rep,name=defs" json:"defs,omitempty"`
	People []*Person               `protobuf:"bytes,2,rep,name=people" json:"people,omitempty"`
	Repos  []*Repo                 `protobuf:"bytes,3,rep,name=repos" json:"repos,omitempty"`
	Tree   []*RepoTreeSearchResult `protobuf:"bytes,4,rep,name=tree" json:"tree,omitempty"`
	// RawQuery is the raw query passed to search.
	RawQuery RawQuery `protobuf:"bytes,5,opt,name=raw_query" json:"raw_query"`
	// Tokens are the unresolved tokens.
	Tokens []PBToken `protobuf:"bytes,6,rep,name=tokens" json:"tokens"`
	// Plan is the query plan used to fetch the results.
	Plan *Plan `protobuf:"bytes,7,opt,name=plan" json:"plan,omitempty"`
	// ResolvedTokens holds the resolved tokens from the original query string.
	ResolvedTokens []PBToken    `protobuf:"bytes,8,rep,name=resolved_tokens" json:"resolved_tokens"`
	ResolveErrors  []TokenError `protobuf:"bytes,9,rep,name=resolve_errors" json:"resolve_errors"`
	// Tips are helpful tips for the user about their query. They are not errors per
	// se, but they use the TokenError type because it allows us to associate a message
	// with a particular token (and JSON de/serialize that).
	Tips []TokenError `protobuf:"bytes,10,rep,name=tips" json:"tips"`
	// Canceled is true if the query was canceled. More information about how to
	// correct the issue can be found in the ResolveErrors and Tips.
	Canceled bool `protobuf:"varint,11,opt,name=canceled,proto3" json:"canceled,omitempty"`
}

Deprecated.

func (*SearchResults) Empty

func (r *SearchResults) Empty() bool

Empty is whether there are no search results for any result type.

func (*SearchResults) ProtoMessage

func (*SearchResults) ProtoMessage()

func (*SearchResults) Reset

func (m *SearchResults) Reset()

func (*SearchResults) String

func (m *SearchResults) String() string

type SearchServer

type SearchServer interface {
	// Search searches the full index.
	// Deprecated: use one of the more specific search methods below.
	Search(context.Context, *SearchOptions) (*SearchResults, error)
	// SearchTokens searches the index of tokens.
	SearchTokens(context.Context, *TokenSearchOptions) (*DefList, error)
	// SearchText searches the content of files in the repo tree.
	SearchText(context.Context, *TextSearchOptions) (*VCSSearchResultList, error)
	// Complete completes the token at the RawQuery's InsertionPoint.
	Complete(context.Context, *RawQuery) (*Completions, error)
	// Suggest suggests queries given an existing query. It can be called with an empty
	// query to get example queries that pertain to the current user's repositories,
	// orgs, etc.
	Suggest(context.Context, *RawQuery) (*SuggestionList, error)
}

type ServerConfig

type ServerConfig struct {
	// Version is the version of Sourcegraph that this server is
	// running.
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// AppURL is the base URL of the user-facing web application
	// (e.g., "https://sourcegraph.com").
	AppURL string `protobuf:"bytes,2,opt,name=app_url,proto3" json:"app_url,omitempty"`
	// FederationRootURL is the --fed.root-url CLI flag's value. It is
	// the URL of the federation root server, or blank if this server
	// is itself a federation root (in which case IsFederationRoot is
	// true).
	FederationRootURL string `protobuf:"bytes,5,opt,name=federation_root_url,proto3" json:"federation_root_url,omitempty"`
	// IsFederationRoot is whether this server is itself a federation
	// root. If true, then FederationRootURL is empty.
	IsFederationRoot bool `protobuf:"varint,6,opt,name=is_federation_root,proto3" json:"is_federation_root,omitempty"`
	// IDKey is the server's identity key (ID key).
	IDKey string `protobuf:"bytes,7,opt,name=id_key,proto3" json:"id_key,omitempty"`
	// AllowAnonymousReaders is whether anonymous (unauthenticated)
	// users may perform "read" operations, such as viewing
	// repositories.
	AllowAnonymousReaders bool `protobuf:"varint,9,opt,name=allow_anonymous_readers,proto3" json:"allow_anonymous_readers,omitempty"`
	// AuthSource is which mode of authentication is set up on the
	// server (local|oauth|ldap).
	AuthSource string `protobuf:"bytes,10,opt,name=auth_source,proto3" json:"auth_source,omitempty"`
}

ServerConfig describes the server's configuration.

DEV NOTE: There is some overlap with Go CLI flag structs. In the future we may consolidate these.

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) Reset

func (m *ServerConfig) Reset()

func (*ServerConfig) String

func (m *ServerConfig) String() string

type ServerPubKey

type ServerPubKey struct {
	// Key contains the server's published public key.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

ServerPubKey holds the server's public key.

func (*ServerPubKey) ProtoMessage

func (*ServerPubKey) ProtoMessage()

func (*ServerPubKey) Reset

func (m *ServerPubKey) Reset()

func (*ServerPubKey) String

func (m *ServerPubKey) String() string

type ServerStatus

type ServerStatus struct {
	// Info contains arbitrary human-readable status information about
	// the server.
	Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
}

ServerStatus describes the server's status.

func (*ServerStatus) ProtoMessage

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) Reset

func (m *ServerStatus) Reset()

func (*ServerStatus) String

func (m *ServerStatus) String() string

type SourceCode

type SourceCode struct {
	// Lines contains all the lines of the contained code snippet.
	Lines       []*SourceCodeLine `protobuf:"bytes,1,rep,name=lines" json:"lines,omitempty"`
	NumRefs     int32             `protobuf:"varint,2,opt,name=num_refs,proto3" json:"num_refs,omitempty"`
	TooManyRefs bool              `protobuf:"varint,3,opt,name=too_many_refs,proto3" json:"too_many_refs,omitempty"`
}

SourceCode contains a snippet of code with linked and classed tokens, along with other information about the contents.

This data structure is useful when one desires to take full control of rendering and manipulating the contents of the requested TreeEntry or snippet, rather than dealing with an (annotated) string or parsing text. To obtain this structure in the TreeEntry, TokenizedSource must be set to "true" in the RepoTreeGetOptions.

func (*SourceCode) ProtoMessage

func (*SourceCode) ProtoMessage()

func (*SourceCode) Reset

func (m *SourceCode) Reset()

func (*SourceCode) String

func (m *SourceCode) String() string

type SourceCodeLine

type SourceCodeLine struct {
	// StartByte and EndByte are the start and end offsets in bytes, in the original
	// file.
	StartByte int32 `protobuf:"varint,1,opt,name=start_byte,proto3" json:"start_byte,omitempty"`
	EndByte   int32 `protobuf:"varint,2,opt,name=end_byte,proto3" json:"end_byte,omitempty"`
	// Tokens contains any tokens that may be on this line, including whitespace. New
	// lines ('\n') are not present.
	Tokens []*SourceCodeToken `protobuf:"bytes,3,rep,name=tokens" json:"tokens,omitempty"`
}

SourceCodeLine contains all tokens on this line along with other information such as byte offsets in original source.

func (*SourceCodeLine) ProtoMessage

func (*SourceCodeLine) ProtoMessage()

func (*SourceCodeLine) Reset

func (m *SourceCodeLine) Reset()

func (*SourceCodeLine) String

func (m *SourceCodeLine) String() string

type SourceCodeToken

type SourceCodeToken struct {
	// Start and end byte offsets in original file.
	StartByte int32 `protobuf:"varint,1,opt,name=start_byte,proto3" json:"-"`
	EndByte   int32 `protobuf:"varint,2,opt,name=end_byte,proto3" json:"-"`
	// If the token is a reference URL contains the DefKey-based URLs for all the
	// definitions at this position.
	URL []string `protobuf:"bytes,3,rep,name=url" json:",omitempty"`
	// IsDef specifies whether the token is a definition.
	IsDef bool `protobuf:"varint,4,opt,name=is_def,proto3" json:",omitempty"`
	// Class specifies the token type as per
	// [google-code-prettify](https://code.google.com/p/google-code-prettify/).
	// All tokens except Whitespace will have this field.
	Class string `protobuf:"bytes,5,opt,name=class,proto3" json:",omitempty"`
	// ExtraClasses may additionally contain other classes for this token, such as
	// for example highlighting in a diff.
	ExtraClasses string `protobuf:"bytes,6,opt,name=extraClasses,proto3" json:",omitempty"`
	// Label is non-whitespace HTML encoded source code.
	Label string `protobuf:"bytes,7,opt,name=label,proto3" json:"label,omitempty"`
}

SourceCodeToken contains information about a code token.

func (*SourceCodeToken) ProtoMessage

func (*SourceCodeToken) ProtoMessage()

func (*SourceCodeToken) Reset

func (m *SourceCodeToken) Reset()

func (*SourceCodeToken) String

func (m *SourceCodeToken) String() string

type Sourcebox

type Sourcebox struct {
	// HTML is the fully linked and rendered HTML of the sourcebox
	// contents and surrounding box UI element.
	HTML template.HTML

	// StylesheetURL is the URL to a CSS stylesheet that must be
	// included on the web page where this sourcebox is shown. It only
	// needs to be included once per web page, even if there are
	// multiple sourceboxes, and all sourceboxes' StylesheetURL is the same.
	StylesheetURL string

	// ScriptURL is the URL to a JavaScript script that must be
	// included and executed on the page in order to display tooltips
	// and certain highlights. It only needs to be included once per
	// web page, even if there are multiple sourceboxes, and all
	// sourceboxes' StylesheetURL is the same.
	ScriptURL string
}

A Sourcebox represents an embeddable code snippet, either for a file (or portion thereof) or for a def.

It is not currently returned by any API client methods, but it is available by changing the ".js" suffix in a Sourcebox embed URL to ".json". This struct is provided for clients that manually construct this URL to decode the response JSON.

type StorageClient

type StorageClient interface {
	// Create creates a new file with the given name. Once you are finished with
	// the file you must call Close.
	Create(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageError, error)
	// RemoveAll deletes the named file or directory recursively.
	RemoveAll(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageError, error)
	// Read reads from an existing file. The file is implicitly opened by Read
	// and a call to Close must be made once you are finished with it.
	Read(ctx context.Context, in *StorageReadOp, opts ...grpc.CallOption) (*StorageRead, error)
	// Write writes to an existing file. The file is implicitly opened by Write
	// and a call to Close must be made once you are finished with it.
	Write(ctx context.Context, in *StorageWriteOp, opts ...grpc.CallOption) (*StorageWrite, error)
	// Stat stats an existing file.
	Stat(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageStat, error)
	// ReadDir reads a directories contents.
	ReadDir(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageReadDir, error)
	// Close closes the named file or directory. You must always call Close once
	// finished performing actions on a file.
	Close(ctx context.Context, in *StorageName, opts ...grpc.CallOption) (*StorageError, error)
}

func NewStorageClient

func NewStorageClient(cc *grpc.ClientConn) StorageClient

type StorageError

type StorageError struct {
	// Code is the error code. If no error code is specified then programatic
	// handling of the error is not advised. The user should be informed of the
	// error message instead.
	Code StorageError_Code `protobuf:"varint,1,opt,name=code,proto3,enum=sourcegraph.StorageError_Code" json:"code,omitempty"`
	// Message is the human-readable error message.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

StorageError represents an error when interacting with the Storage service.

func (*StorageError) ProtoMessage

func (*StorageError) ProtoMessage()

func (*StorageError) Reset

func (m *StorageError) Reset()

func (*StorageError) String

func (m *StorageError) String() string

type StorageError_Code

type StorageError_Code int32

Code represents the type of error for programatic handling.

const (
	// None is the error code used when programatic handling of the error is not
	// advised. It can be assumed that the operation failed, and that a human
	// readable message is also provided.
	StorageError_None StorageError_Code = 0
	// EOF is the error returned by Read when no more input is available.
	// Functions should return EOF only to signal a graceful end of input. If
	// the EOF occurs unexpectedly in a structured data stream, the appropriate
	// error is either UNEXPECTED_EOF or some other error message giving more
	// detail.
	StorageError_EOF StorageError_Code = 1
	// NotExist is the error used when attempting to read/write to an object
	// that does not exist.
	StorageError_NotExist StorageError_Code = 2
	// Permission is the error used when permission to access the given file is
	// not granted to you.
	StorageError_Permission StorageError_Code = 3
)

func (StorageError_Code) String

func (x StorageError_Code) String() string

type StorageFileInfo

type StorageFileInfo struct {
	// Name is the base name of the file.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Size is the length in bytes of the file, or zero.
	Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// ModTime is the file modification time.
	ModTime pbtypes.Timestamp `protobuf:"bytes,3,opt,name=mod_time" json:"mod_time"`
	// IsDir tells if the file is a directory.
	IsDir bool `protobuf:"varint,4,opt,name=is_dir,proto3" json:"is_dir,omitempty"`
}

StorageFileInfo lists information about a file.

func (*StorageFileInfo) ProtoMessage

func (*StorageFileInfo) ProtoMessage()

func (*StorageFileInfo) Reset

func (m *StorageFileInfo) Reset()

func (*StorageFileInfo) String

func (m *StorageFileInfo) String() string

type StorageName

type StorageName struct {
	// AppName is the name of the application whose data you are trying to
	// read/write, applications may read and write to each other's data assuming
	// the admin has not restricted such access.
	AppName string `protobuf:"bytes,1,opt,name=app_name,proto3" json:"app_name,omitempty"`
	// Repo is the repository URI. If specified storage is considered local to the
	// repository. Otherwise it is considered "global" (i.e. shared across all
	// repositories).
	Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	// Name is the name of the file.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}

StorageName is a storage object's name.

func (*StorageName) ProtoMessage

func (*StorageName) ProtoMessage()

func (*StorageName) Reset

func (m *StorageName) Reset()

func (*StorageName) String

func (m *StorageName) String() string

type StorageRead

type StorageRead struct {
	// Error is the error that occurred during reading, if any. In the case of a
	// EOF error, it may be accompanied by data (i.e. EOF and some data).
	Error *StorageError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	// Data is the data that was read from the file. There is no guarantee that
	// the requested number of bytes to read will actually be read, so if you
	// desire more than what is returned here then you should perform a read
	// again.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

StorageRead is the result from reading a file.

func (*StorageRead) ProtoMessage

func (*StorageRead) ProtoMessage()

func (*StorageRead) Reset

func (m *StorageRead) Reset()

func (*StorageRead) String

func (m *StorageRead) String() string

type StorageReadDir

type StorageReadDir struct {
	// Error is the error that occurred during reading, if any.
	Error *StorageError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	// Info is the information for each file in the directory.
	Info []StorageFileInfo `protobuf:"bytes,2,rep,name=info" json:"info"`
}

StorageReadDir is the result from reading a directories contents.

func (*StorageReadDir) ProtoMessage

func (*StorageReadDir) ProtoMessage()

func (*StorageReadDir) Reset

func (m *StorageReadDir) Reset()

func (*StorageReadDir) String

func (m *StorageReadDir) String() string

type StorageReadOp

type StorageReadOp struct {
	Name StorageName `protobuf:"bytes,1,opt,name=name" json:"name"`
	// Offset is the offset in bytes in which to perform the read operation from
	// the start or end of the file, depending on offset_end. You must retain the
	// offset state yourself.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// OffsetEnd causes the offset to act relative to the end of the file, if
	// set (i.e. offset == -100 would mean to read starting 100 bytes from the end
	// of the file).
	OffsetEnd bool `protobuf:"varint,3,opt,name=offset_end,proto3" json:"offset_end,omitempty"`
	// Count is the number of bytes desired to be read. There is no guarantee that
	// this many will be read, however. Instead you should check the size of the
	// data returned.
	Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}

StorageReadOp is the parameters for reading from a file.

func (*StorageReadOp) ProtoMessage

func (*StorageReadOp) ProtoMessage()

func (*StorageReadOp) Reset

func (m *StorageReadOp) Reset()

func (*StorageReadOp) String

func (m *StorageReadOp) String() string

type StorageServer

type StorageServer interface {
	// Create creates a new file with the given name. Once you are finished with
	// the file you must call Close.
	Create(context.Context, *StorageName) (*StorageError, error)
	// RemoveAll deletes the named file or directory recursively.
	RemoveAll(context.Context, *StorageName) (*StorageError, error)
	// Read reads from an existing file. The file is implicitly opened by Read
	// and a call to Close must be made once you are finished with it.
	Read(context.Context, *StorageReadOp) (*StorageRead, error)
	// Write writes to an existing file. The file is implicitly opened by Write
	// and a call to Close must be made once you are finished with it.
	Write(context.Context, *StorageWriteOp) (*StorageWrite, error)
	// Stat stats an existing file.
	Stat(context.Context, *StorageName) (*StorageStat, error)
	// ReadDir reads a directories contents.
	ReadDir(context.Context, *StorageName) (*StorageReadDir, error)
	// Close closes the named file or directory. You must always call Close once
	// finished performing actions on a file.
	Close(context.Context, *StorageName) (*StorageError, error)
}

type StorageStat

type StorageStat struct {
	// Error is the error that occurred during reading, if any.
	Error *StorageError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	// Info is the information for the file.
	Info StorageFileInfo `protobuf:"bytes,2,opt,name=info" json:"info"`
}

StorageStat is the result from statting a file.

func (*StorageStat) ProtoMessage

func (*StorageStat) ProtoMessage()

func (*StorageStat) Reset

func (m *StorageStat) Reset()

func (*StorageStat) String

func (m *StorageStat) String() string

type StorageWrite

type StorageWrite struct {
	// Error is the error that occurred during writing, if any.
	Error *StorageError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	// Wrote is the number of bytes written to the file. If the number of bytes
	// written (as reported by this field) is not the same number of bytes you
	// tried to write, then you should attempt subsequent writes to finish writing
	// the data assuming there was no error.
	Wrote int64 `protobuf:"varint,2,opt,name=wrote,proto3" json:"wrote,omitempty"`
}

StorageWrite is the result from writing to a file.

func (*StorageWrite) ProtoMessage

func (*StorageWrite) ProtoMessage()

func (*StorageWrite) Reset

func (m *StorageWrite) Reset()

func (*StorageWrite) String

func (m *StorageWrite) String() string

type StorageWriteOp

type StorageWriteOp struct {
	Name StorageName `protobuf:"bytes,1,opt,name=name" json:"name"`
	// Offset is the offset in bytes in which to perform the write operation from
	// the start or end of the file, depending on offset_end.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// OffsetEnd causes the offset to act relative to the end of the file, if
	// set (i.e. offset == -100 would mean to write starting 100 bytes from the
	// end of the file).
	OffsetEnd bool `protobuf:"varint,3,opt,name=offset_end,proto3" json:"offset_end,omitempty"`
	// Data is the data to be written. There is no guarantee all of the data will
	// be written, however. Instead you should check the number of bytes written
	// by looking at the StorageWrite.wrote field and attempt writing whatever
	// bytes were not during that write operation.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
}

StorageWriteOp is the parameters for writing to a file.

func (*StorageWriteOp) ProtoMessage

func (*StorageWriteOp) ProtoMessage()

func (*StorageWriteOp) Reset

func (m *StorageWriteOp) Reset()

func (*StorageWriteOp) String

func (m *StorageWriteOp) String() string

type StreamResponse

type StreamResponse struct {
	// HasMore is true if there are more results available after the returned page.
	HasMore bool `protobuf:"varint,1,opt,name=has_more,proto3" json:"has_more,omitempty" url:",omitempty"`
}

StreamResponse specifies a paginated response where the total number of results that can be returned is too expensive to compute, unbounded, or unknown.

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) String

func (m *StreamResponse) String() string

type Suggestion

type Suggestion struct {
	// Query is a suggested query related to the original query.
	Query []PBToken `protobuf:"bytes,1,rep,name=query" json:"query"`
	// QueryString is what the user needs to enter into the search field to search
	// using this suggested query.
	QueryString string `protobuf:"bytes,2,opt,name=query_string,proto3" json:"query_string,omitempty"`
	// Description is the human-readable description of Query (usually generated by
	// calling the Describe func).
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
}

A Suggestion is a possible completion of a query (returned by Suggest method). It does not attempt to "complete" a query but rather indicate to the user what types of queries are possible.

func (*Suggestion) ProtoMessage

func (*Suggestion) ProtoMessage()

func (*Suggestion) Reset

func (m *Suggestion) Reset()

func (*Suggestion) String

func (m *Suggestion) String() string

type SuggestionList

type SuggestionList struct {
	Suggestions []*Suggestion `protobuf:"bytes,1,rep,name=suggestions" json:"suggestions,omitempty"`
}

func (*SuggestionList) ProtoMessage

func (*SuggestionList) ProtoMessage()

func (*SuggestionList) Reset

func (m *SuggestionList) Reset()

func (*SuggestionList) String

func (m *SuggestionList) String() string

type TagList

type TagList struct {
	Tags           []*vcs.Tag `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"`
	StreamResponse `protobuf:"bytes,2,opt,name=stream_response,embedded=stream_response" json:"stream_response"`
}

func (*TagList) ProtoMessage

func (*TagList) ProtoMessage()

func (*TagList) Reset

func (m *TagList) Reset()

func (*TagList) String

func (m *TagList) String() string

type TaskSpec

type TaskSpec struct {
	BuildSpec `protobuf:"bytes,1,opt,name=build_spec,embedded=build_spec" json:"build_spec"`
	TaskID    int64 `protobuf:"varint,2,opt,name=task_id,proto3" json:"task_id,omitempty"`
}

func (TaskSpec) IDString

func (t TaskSpec) IDString() string

IDString returns a succinct string that uniquely identifies this build task.

func (*TaskSpec) ProtoMessage

func (*TaskSpec) ProtoMessage()

func (*TaskSpec) Reset

func (m *TaskSpec) Reset()

func (*TaskSpec) RouteVars

func (s *TaskSpec) RouteVars() map[string]string

func (*TaskSpec) String

func (m *TaskSpec) String() string

type TaskUpdate

type TaskUpdate struct {
	StartedAt *pbtypes.Timestamp `protobuf:"bytes,1,opt,name=started_at" json:"started_at,omitempty"`
	EndedAt   *pbtypes.Timestamp `protobuf:"bytes,2,opt,name=ended_at" json:"ended_at,omitempty"`
	Success   bool               `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
	Failure   bool               `protobuf:"varint,4,opt,name=failure,proto3" json:"failure,omitempty"`
}

A TaskUpdate contains updated information to update on an existing task.

func (*TaskUpdate) ProtoMessage

func (*TaskUpdate) ProtoMessage()

func (*TaskUpdate) Reset

func (m *TaskUpdate) Reset()

func (*TaskUpdate) String

func (m *TaskUpdate) String() string

type TelemetryType

type TelemetryType int32

TelemetryType is the format MetricsSnapshot.TelemetryData is encoded in

const (
	// PrometheusDelimited0dot0dot4 indicates the metrics can be decoded using
	// Prometheus 0.0.4 delimited protobuf format
	TelemetryType_PrometheusDelimited0dot0dot4 TelemetryType = 0
)

func (TelemetryType) String

func (x TelemetryType) String() string

type Term

type Term string

A Term is a query term token. It is either a word or an arbitrary string (if quoted in the raw query).

func (Term) Token

func (t Term) Token() string

func (Term) UnquotedToken

func (t Term) UnquotedToken() string

type TextSearchOptions

type TextSearchOptions struct {
	Query       string      `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty" url:"q" schema:"q"`
	RepoRev     RepoRevSpec `protobuf:"bytes,2,opt,name=repo_rev" json:"repo_rev"`
	ListOptions `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*TextSearchOptions) ProtoMessage

func (*TextSearchOptions) ProtoMessage()

func (*TextSearchOptions) Reset

func (m *TextSearchOptions) Reset()

func (*TextSearchOptions) String

func (m *TextSearchOptions) String() string

type Token

type Token interface {
	// Token returns the string representation of the token.
	Token() string
}

A Token is the smallest indivisible component of a query, either a term or a "field:val" specifier (e.g., "repo:example.com/myrepo").

type TokenError

type TokenError struct {
	// Index is the 1-indexed index of the token that caused the error (0 means not
	// associated with any particular token).
	//
	// NOTE: Index is 1-indexed (not 0-indexed) because some TokenErrors don't pertain
	// to a token, and it's misleading if the Index in the JSON is 0 (which could mean
	// that it pertains to the 1st token if index was 0-indexed).
	Index   int32    `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Token   *PBToken `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
	Message string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}

A TokenError is an error about a specific token.

func (TokenError) Error

func (e TokenError) Error() string

func (TokenError) MarshalJSON

func (e TokenError) MarshalJSON() ([]byte, error)

func (*TokenError) ProtoMessage

func (*TokenError) ProtoMessage()

func (*TokenError) Reset

func (m *TokenError) Reset()

func (*TokenError) String

func (m *TokenError) String() string

func (*TokenError) UnmarshalJSON

func (e *TokenError) UnmarshalJSON(b []byte) error

type TokenSearchOptions

type TokenSearchOptions struct {
	Query       string      `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty" url:"q" schema:"q"`
	RepoRev     RepoRevSpec `protobuf:"bytes,2,opt,name=repo_rev" json:"repo_rev"`
	ListOptions `protobuf:"bytes,3,opt,name=list_options,embedded=list_options" json:"list_options"`
}

func (*TokenSearchOptions) ProtoMessage

func (*TokenSearchOptions) ProtoMessage()

func (*TokenSearchOptions) Reset

func (m *TokenSearchOptions) Reset()

func (*TokenSearchOptions) String

func (m *TokenSearchOptions) String() string

type Tokens

type Tokens []Token

Tokens wraps a list of tokens and adds some helper methods. It also serializes to JSON with "Type" fields added to each token and deserializes that same JSON back into a typed list of tokens.

func PBTokens

func PBTokens(pbtoks []PBToken) Tokens

PBTokens converts []PBToken to Tokens.

func (Tokens) MarshalJSON

func (d Tokens) MarshalJSON() ([]byte, error)

func (Tokens) RawQueryString

func (d Tokens) RawQueryString() string

func (*Tokens) UnmarshalJSON

func (d *Tokens) UnmarshalJSON(b []byte) error

type TreeEntry

type TreeEntry struct {
	*vcsclient.TreeEntry `protobuf:"bytes,1,opt,name=tree_entry,embedded=tree_entry" json:""`
	*vcsclient.FileRange `protobuf:"bytes,2,opt,name=file_range,embedded=file_range" json:"file_range,omitempty"`
	ContentsString       string `protobuf:"bytes,3,opt,name=contents_string,proto3" json:"contents_string,omitempty"`
	// SourceCode is set when TokenizedSource is enabled in RepoTreeGetOptions.
	SourceCode *SourceCode `protobuf:"bytes,4,opt,name=source_code" json:"source_code,omitempty"`
	// FormatResult is only set if this TreeEntry is a file.
	FormatResult *FormatResult `protobuf:"bytes,5,opt,name=format_result" json:"format_result,omitempty"`
}

TreeEntry is a file or directory in a repository, with additional feedback from the formatting operation (if Formatted is true in the options).

func (*TreeEntry) ProtoMessage

func (*TreeEntry) ProtoMessage()

func (*TreeEntry) Reset

func (m *TreeEntry) Reset()

func (*TreeEntry) String

func (m *TreeEntry) String() string

type TreeEntrySpec

type TreeEntrySpec struct {
	RepoRev RepoRevSpec `protobuf:"bytes,1,opt,name=repo_rev" json:"repo_rev"`
	Path    string      `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}

func (*TreeEntrySpec) ProtoMessage

func (*TreeEntrySpec) ProtoMessage()

func (*TreeEntrySpec) Reset

func (m *TreeEntrySpec) Reset()

func (*TreeEntrySpec) RouteVars

func (s *TreeEntrySpec) RouteVars() map[string]string

func (*TreeEntrySpec) String

func (m *TreeEntrySpec) String() string

type UnitDelta

type UnitDelta struct {
	Base *unit.RepoSourceUnit `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
	Head *unit.RepoSourceUnit `protobuf:"bytes,2,opt,name=head" json:"head,omitempty"`
}

A UnitDelta represents a single source unit that was changed. It has fields for the before (Base) and after (Head) versions. If both Base and Head are non-nil, then the unit was changed from base to head. Otherwise, one of the fields being nil means that the unit did not exist in that revision (e.g., it was added or deleted from base to head).

func (UnitDelta) Added

func (ud UnitDelta) Added() bool

Added is whether this represents an added source unit (not present in base, present in head).

func (UnitDelta) Changed

func (ud UnitDelta) Changed() bool

Changed is whether this represents a changed source unit (present in base, present in head).

func (UnitDelta) Deleted

func (ud UnitDelta) Deleted() bool

Deleted is whether this represents a deleted source unit (present in base, not present in head).

func (*UnitDelta) ProtoMessage

func (*UnitDelta) ProtoMessage()

func (*UnitDelta) Reset

func (m *UnitDelta) Reset()

func (*UnitDelta) String

func (m *UnitDelta) String() string

type UnitDeltaList

type UnitDeltaList struct {
	UnitDeltas []*UnitDelta `protobuf:"bytes,1,rep,name=unit_deltas" json:"unit_deltas,omitempty"`
}

func (*UnitDeltaList) ProtoMessage

func (*UnitDeltaList) ProtoMessage()

func (*UnitDeltaList) Reset

func (m *UnitDeltaList) Reset()

func (*UnitDeltaList) String

func (m *UnitDeltaList) String() string

type UnitDeltas

type UnitDeltas []*UnitDelta

func (UnitDeltas) Len

func (v UnitDeltas) Len() int

func (UnitDeltas) Less

func (v UnitDeltas) Less(i, j int) bool

func (UnitDeltas) Swap

func (v UnitDeltas) Swap(i, j int)

type UnitListOptions

type UnitListOptions struct {
	// RepoRevs constrains the results to a set of repository revisions (given by their
	// URIs plus an optional "@" and a revision specifier). For example,
	// "repo.com/foo@revspec".
	RepoRevs []string `protobuf:"bytes,1,rep,name=repo_revs" json:"repo_revs,omitempty" url:",omitempty,comma"`
	UnitType string   `protobuf:"bytes,2,opt,name=unit_type,proto3" json:"unit_type,omitempty" url:",omitempty"`
	Unit     string   `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty" url:",omitempty"`
	// NameQuery specifies a full-text search query over the unit name.
	NameQuery string `protobuf:"bytes,4,opt,name=name_query,proto3" json:"name_query,omitempty" url:",omitempty"`
	// Query specifies a full-text search query over the repo URI, unit name, and unit
	// data.
	Query string `protobuf:"bytes,5,opt,name=query,proto3" json:"query,omitempty" url:",omitempty"`
	// Paging
	ListOptions `protobuf:"bytes,6,opt,name=list_options,embedded=list_options" json:"list_options"`
}

UnitListOptions specifies options for UnitsService.List.

func (*UnitListOptions) ProtoMessage

func (*UnitListOptions) ProtoMessage()

func (*UnitListOptions) Reset

func (m *UnitListOptions) Reset()

func (*UnitListOptions) String

func (m *UnitListOptions) String() string

type UnitSpec

type UnitSpec struct {
	RepoRevSpec `protobuf:"bytes,1,opt,name=repo_rev_spec,embedded=repo_rev_spec" json:"repo_rev_spec"`
	UnitType    string `protobuf:"bytes,2,opt,name=unit_type,proto3" json:"unit_type,omitempty"`
	Unit        string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
}

UnitSpec specifies a source unit.

func NewUnitSpecFromUnit

func NewUnitSpecFromUnit(u *unit.RepoSourceUnit) UnitSpec

func UnmarshalUnitSpec

func UnmarshalUnitSpec(vars map[string]string) (UnitSpec, error)

func (*UnitSpec) ProtoMessage

func (*UnitSpec) ProtoMessage()

func (*UnitSpec) Reset

func (m *UnitSpec) Reset()

func (UnitSpec) RouteVars

func (s UnitSpec) RouteVars() map[string]string

func (*UnitSpec) String

func (m *UnitSpec) String() string

type UnitToken

type UnitToken struct {
	// UnitType is the type of the source unit (e.g., GoPackage).
	UnitType string `protobuf:"bytes,1,opt,name=unit_type,proto3" json:"unit_type,omitempty"`
	// Name is the name of the source unit (e.g., mypkg).
	Name string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Unit *unit.RepoSourceUnit `protobuf:"bytes,3,opt,name=unit" json:"unit,omitempty"`
}

A UnitToken represents a source unit in a repository.

func (*UnitToken) ProtoMessage

func (*UnitToken) ProtoMessage()

func (*UnitToken) Reset

func (m *UnitToken) Reset()

func (*UnitToken) String

func (m *UnitToken) String() string

func (UnitToken) Token

func (t UnitToken) Token() string

type UnitsClient

type UnitsClient interface {
	// Get fetches a unit.
	Get(ctx context.Context, in *UnitSpec, opts ...grpc.CallOption) (*unit.RepoSourceUnit, error)
	// List units.
	List(ctx context.Context, in *UnitListOptions, opts ...grpc.CallOption) (*RepoSourceUnitList, error)
}

func NewUnitsClient

func NewUnitsClient(cc *grpc.ClientConn) UnitsClient

type UnitsServer

type UnitsServer interface {
	// Get fetches a unit.
	Get(context.Context, *UnitSpec) (*unit.RepoSourceUnit, error)
	// List units.
	List(context.Context, *UnitListOptions) (*RepoSourceUnitList, error)
}

type User

type User struct {
	// UID is the numeric primary key for a user.
	UID int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// Login is the user's username.
	Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
	// Domain is the host that the user originates from. If empty, it
	// is assumed to be the domain of the server.
	Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
	// Name is the (possibly empty) full name of the user.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// IsOrganization is whether this user represents an organization.
	IsOrganization bool `protobuf:"varint,5,opt,name=is_organization,proto3" json:"is_organization,omitempty"`
	// AvatarURL is the URL to an avatar image specified by the user.
	AvatarURL string `protobuf:"bytes,6,opt,name=avatar_url,proto3" json:"avatar_url,omitempty"`
	// Location is the user's physical location.
	Location string `protobuf:"bytes,7,opt,name=location,proto3" json:"location,omitempty"`
	// Company is the user's company.
	Company string `protobuf:"bytes,8,opt,name=company,proto3" json:"company,omitempty"`
	// HomepageURL is the user's homepage or blog URL.
	HomepageURL string `protobuf:"bytes,9,opt,name=homepage_url,proto3" json:"homepage_url,omitempty"`
	// Disabled is whether the user account is disabled.
	Disabled bool `protobuf:"varint,10,opt,name=disabled,proto3" json:"disabled,omitempty"`
	// Admin is whether the user is a site admin for the site named by
	// the Domain field.
	Admin bool `protobuf:"varint,12,opt,name=admin,proto3" json:"admin,omitempty"`
	// RegisteredAt is the date that the user registered. If the user has not
	// registered (i.e., we have processed their repos but they haven't signed into
	// Sourcegraph), it is null.
	RegisteredAt *pbtypes.Timestamp `protobuf:"bytes,11,opt,name=registered_at" json:"registered_at,omitempty"`
}

User represents a registered user.

func (*User) AvatarURLOfSize

func (u *User) AvatarURLOfSize(width int) string

AvatarURLOfSize returns the URL to an avatar for the user with the given width (in pixels).

func (*User) Person

func (u *User) Person() *Person

Person returns an equivalent Person.

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) Spec

func (u *User) Spec() UserSpec

func (*User) String

func (m *User) String() string

type UserEvent

type UserEvent struct {
	Type     string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	UID      int32  `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	ClientID string `protobuf:"bytes,3,opt,name=client_id,proto3" json:"client_id,omitempty"`
	Service  string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
	Method   string `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"`
	Result   string `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"`
	// CreatedAt holds the time when this event was logged.
	CreatedAt *pbtypes.Timestamp `protobuf:"bytes,7,opt,name=created_at" json:"created_at,omitempty"`
	Message   string             `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"`
	// Version holds the release version of the Sourcegraph binary.
	Version string `protobuf:"bytes,9,opt,name=version,proto3" json:"version,omitempty"`
	// URL holds the http request url.
	URL string `protobuf:"bytes,10,opt,name=url,proto3" json:"url,omitempty"`
}

UserEvent encodes any user initiated event on the local instance.

func (*UserEvent) ProtoMessage

func (*UserEvent) ProtoMessage()

func (*UserEvent) Reset

func (m *UserEvent) Reset()

func (*UserEvent) String

func (m *UserEvent) String() string

type UserEventList

type UserEventList struct {
	Events []*UserEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
}

func (*UserEventList) ProtoMessage

func (*UserEventList) ProtoMessage()

func (*UserEventList) Reset

func (m *UserEventList) Reset()

func (*UserEventList) String

func (m *UserEventList) String() string

type UserKeysClient

type UserKeysClient interface {
	// AddKey adds an SSH public key for the user, enabling them to use git over SSH.
	AddKey(ctx context.Context, in *SSHPublicKey, opts ...grpc.CallOption) (*pbtypes1.Void, error)
	// LookupUser looks up a user based on the given public key.
	LookupUser(ctx context.Context, in *SSHPublicKey, opts ...grpc.CallOption) (*UserSpec, error)
	// DeleteKey deletes the user's SSH public key.
	DeleteKey(ctx context.Context, in *pbtypes1.Void, opts ...grpc.CallOption) (*pbtypes1.Void, error)
}

func NewUserKeysClient

func NewUserKeysClient(cc *grpc.ClientConn) UserKeysClient

type UserKeysServer

type UserKeysServer interface {
	// AddKey adds an SSH public key for the user, enabling them to use git over SSH.
	AddKey(context.Context, *SSHPublicKey) (*pbtypes1.Void, error)
	// LookupUser looks up a user based on the given public key.
	LookupUser(context.Context, *SSHPublicKey) (*UserSpec, error)
	// DeleteKey deletes the user's SSH public key.
	DeleteKey(context.Context, *pbtypes1.Void) (*pbtypes1.Void, error)
}

type UserList

type UserList struct {
	Users []*User `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"`
}

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) Reset

func (m *UserList) Reset()

func (*UserList) String

func (m *UserList) String() string

type UserPermissions

type UserPermissions struct {
	// UID is a user's UID.
	UID int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// ClientID is the ID of the client whose whitelist is to
	// be fetched and/or modified.
	ClientID string `protobuf:"bytes,2,opt,name=client_id,proto3" json:"client_id,omitempty"`
	// Read is true if the user has read permissions on the client.
	Read bool `protobuf:"varint,3,opt,name=read,proto3" json:"read,omitempty"`
	// Write is true if the user has write permissions on the client.
	Write bool `protobuf:"varint,4,opt,name=write,proto3" json:"write,omitempty"`
	// Admin is true if the user should be considered an admin on
	// the client.
	Admin bool `protobuf:"varint,5,opt,name=admin,proto3" json:"admin,omitempty"`
}

func (*UserPermissions) ProtoMessage

func (*UserPermissions) ProtoMessage()

func (*UserPermissions) Reset

func (m *UserPermissions) Reset()

func (*UserPermissions) String

func (m *UserPermissions) String() string

type UserPermissionsList

type UserPermissionsList struct {
	UserPermissions []*UserPermissions `protobuf:"bytes,1,rep,name=user_permissions" json:"user_permissions,omitempty"`
}

func (*UserPermissionsList) ProtoMessage

func (*UserPermissionsList) ProtoMessage()

func (*UserPermissionsList) Reset

func (m *UserPermissionsList) Reset()

func (*UserPermissionsList) String

func (m *UserPermissionsList) String() string

type UserPermissionsOptions

type UserPermissionsOptions struct {
	ClientSpec *RegisteredClientSpec `protobuf:"bytes,1,opt,name=client_spec" json:"client_spec,omitempty"`
	UID        int32                 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
}

func (*UserPermissionsOptions) ProtoMessage

func (*UserPermissionsOptions) ProtoMessage()

func (*UserPermissionsOptions) Reset

func (m *UserPermissionsOptions) Reset()

func (*UserPermissionsOptions) String

func (m *UserPermissionsOptions) String() string

type UserSpec

type UserSpec struct {
	// Login is a user's login.
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	// UID is a user's UID.
	UID int32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	// Domain is the host that the user originates from. If empty, it
	// is assumed to be the domain of the server.
	Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
}

UserSpec specifies a user. At least one of Login and UID must be nonempty.

func ParseUserSpec

func ParseUserSpec(s string) (UserSpec, error)

ParseUserSpec parses a string generated by (*UserSpec).String() and returns the equivalent UserSpec struct.

func (*UserSpec) ProtoMessage

func (*UserSpec) ProtoMessage()

func (*UserSpec) Reset

func (m *UserSpec) Reset()

func (*UserSpec) RouteVars

func (s *UserSpec) RouteVars() map[string]string

func (*UserSpec) SpecString

func (s *UserSpec) SpecString() string

SpecString returns the UserSpec string.

func (*UserSpec) String

func (m *UserSpec) String() string

type UserToken

type UserToken struct {
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	User  *User  `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
}

A UserToken represents a user or org, although it does not necessarily uniquely identify one. It consists of the string "@" followed by a full or partial user/org login.

func (*UserToken) ProtoMessage

func (*UserToken) ProtoMessage()

func (*UserToken) Reset

func (m *UserToken) Reset()

func (*UserToken) String

func (m *UserToken) String() string

func (UserToken) Token

func (t UserToken) Token() string

type UsersClient

type UsersClient interface {
	// Get fetches a user.
	Get(ctx context.Context, in *UserSpec, opts ...grpc.CallOption) (*User, error)
	// GetWithEmail fetches a user by their primary email.
	GetWithEmail(ctx context.Context, in *EmailAddr, opts ...grpc.CallOption) (*User, error)
	// ListEmails returns a list of a user's email addresses.
	ListEmails(ctx context.Context, in *UserSpec, opts ...grpc.CallOption) (*EmailAddrList, error)
	// List users.
	List(ctx context.Context, in *UsersListOptions, opts ...grpc.CallOption) (*UserList, error)
}

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

type UsersListOptions

type UsersListOptions struct {
	// Query filters the results to only those whose logins match. The search algorithm
	// is an implementation detail (currently it is a prefix match).
	Query       string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty" url:",omitempty"`
	Sort        string `protobuf:"bytes,2,opt,name=sort,proto3" json:"sort,omitempty" url:",omitempty"`
	Direction   string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty" url:",omitempty"`
	ListOptions `protobuf:"bytes,4,opt,name=list_options,embedded=list_options" json:"list_options"`
}

UsersListOptions specifies options for the UsersService.List method.

func (*UsersListOptions) ProtoMessage

func (*UsersListOptions) ProtoMessage()

func (*UsersListOptions) Reset

func (m *UsersListOptions) Reset()

func (*UsersListOptions) String

func (m *UsersListOptions) String() string

type UsersServer

type UsersServer interface {
	// Get fetches a user.
	Get(context.Context, *UserSpec) (*User, error)
	// GetWithEmail fetches a user by their primary email.
	GetWithEmail(context.Context, *EmailAddr) (*User, error)
	// ListEmails returns a list of a user's email addresses.
	ListEmails(context.Context, *UserSpec) (*EmailAddrList, error)
	// List users.
	List(context.Context, *UsersListOptions) (*UserList, error)
}

type VCSCredentials

type VCSCredentials struct {
	// Pass is the password provided to the VCS.
	Pass string `protobuf:"bytes,1,opt,name=pass,proto3" json:"pass,omitempty"`
}

VCSCredentials for authentication during communication with VCS remotes.

func (*VCSCredentials) ProtoMessage

func (*VCSCredentials) ProtoMessage()

func (*VCSCredentials) Reset

func (m *VCSCredentials) Reset()

func (*VCSCredentials) String

func (m *VCSCredentials) String() string

type VCSSearchResultList

type VCSSearchResultList struct {
	SearchResults []*vcs.SearchResult `protobuf:"bytes,1,rep,name=search_results" json:"search_results,omitempty"`
	ListResponse  `protobuf:"bytes,2,opt,name=list_response,embedded=list_response" json:"list_response"`
}

func (*VCSSearchResultList) ProtoMessage

func (*VCSSearchResultList) ProtoMessage()

func (*VCSSearchResultList) Reset

func (m *VCSSearchResultList) Reset()

func (*VCSSearchResultList) String

func (m *VCSSearchResultList) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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