gcsepb

package
Version: v0.0.0-...-e2ffb22 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: BSD-2-Clause, BSD-3-Clause Imports: 8 Imported by: 9

Documentation

Overview

Package gcsepb is a generated protocol buffer package.

It is generated from these files:

github.com/daviddengcn/gcse/shared/proto/spider.proto
github.com/daviddengcn/gcse/shared/proto/store.proto
github.com/daviddengcn/gcse/shared/proto/stored.proto

It has these top-level messages:

GoFileInfo
RepoInfo
FolderInfo
CrawlingInfo
HistoryEvent
HistoryInfo
Package
PackageInfo
PersonInfo
Repository
PackageCrawlHistoryReq
PackageCrawlHistoryResp

Index

Constants

This section is empty.

Variables

View Source
var GoFileInfo_Status_name = map[int32]string{
	0: "Unknown",
	1: "ParseSuccess",
	2: "ParseFailed",
	3: "ShouldIgnore",
}
View Source
var GoFileInfo_Status_value = map[string]int32{
	"Unknown":      0,
	"ParseSuccess": 1,
	"ParseFailed":  2,
	"ShouldIgnore": 3,
}
View Source
var HistoryEvent_Action_Enum_name = map[int32]string{
	0: "None",
	1: "Success",
	2: "Failed",
	3: "Invalid",
}
View Source
var HistoryEvent_Action_Enum_value = map[string]int32{
	"None":    0,
	"Success": 1,
	"Failed":  2,
	"Invalid": 3,
}

Functions

func RegisterStoreServiceServer

func RegisterStoreServiceServer(s *grpc.Server, srv StoreServiceServer)

Types

type CrawlingInfo

type CrawlingInfo struct {
	// The timestamp the related entry was crawled
	CrawlingTime *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=crawling_time,json=crawlingTime" json:"crawling_time,omitempty"`
	Etag         string                     `protobuf:"bytes,2,opt,name=etag" json:"etag,omitempty"`
}

func (*CrawlingInfo) CrawlingTimeAsTime

func (ci *CrawlingInfo) CrawlingTimeAsTime() time.Time

func (*CrawlingInfo) Descriptor

func (*CrawlingInfo) Descriptor() ([]byte, []int)

func (*CrawlingInfo) GetCrawlingTime

func (m *CrawlingInfo) GetCrawlingTime() *google_protobuf.Timestamp

func (*CrawlingInfo) GetEtag

func (m *CrawlingInfo) GetEtag() string

func (*CrawlingInfo) ProtoMessage

func (*CrawlingInfo) ProtoMessage()

func (*CrawlingInfo) Reset

func (m *CrawlingInfo) Reset()

func (*CrawlingInfo) SetCrawlingTime

func (ci *CrawlingInfo) SetCrawlingTime(t time.Time) *CrawlingInfo

func (*CrawlingInfo) String

func (m *CrawlingInfo) String() string

type FolderInfo

type FolderInfo struct {
	// E.g. "sub"
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// E.g. "spider/sub"
	Path    string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	Sha     string `protobuf:"bytes,3,opt,name=sha" json:"sha,omitempty"`
	HtmlUrl string `protobuf:"bytes,4,opt,name=html_url,json=htmlUrl" json:"html_url,omitempty"`
	// The timestamp this folder-info is crawled
	CrawlingTime *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=crawling_time,json=crawlingTime" json:"crawling_time,omitempty"`
}

Information for a non-repository folder.

func (*FolderInfo) Descriptor

func (*FolderInfo) Descriptor() ([]byte, []int)

func (*FolderInfo) GetCrawlingTime

func (m *FolderInfo) GetCrawlingTime() *google_protobuf.Timestamp

func (*FolderInfo) GetHtmlUrl

func (m *FolderInfo) GetHtmlUrl() string

func (*FolderInfo) GetName

func (m *FolderInfo) GetName() string

func (*FolderInfo) GetPath

func (m *FolderInfo) GetPath() string

func (*FolderInfo) GetSha

func (m *FolderInfo) GetSha() string

func (*FolderInfo) ProtoMessage

func (*FolderInfo) ProtoMessage()

func (*FolderInfo) Reset

func (m *FolderInfo) Reset()

func (*FolderInfo) String

func (m *FolderInfo) String() string

type GoFileInfo

type GoFileInfo struct {
	Status      GoFileInfo_Status `protobuf:"varint,1,opt,name=status,enum=gcse.GoFileInfo_Status" json:"status,omitempty"`
	Name        string            `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Description string            `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	IsTest      bool              `protobuf:"varint,4,opt,name=is_test,json=isTest" json:"is_test,omitempty"`
	Imports     []string          `protobuf:"bytes,5,rep,name=imports" json:"imports,omitempty"`
}

func (*GoFileInfo) Descriptor

func (*GoFileInfo) Descriptor() ([]byte, []int)

func (*GoFileInfo) GetDescription

func (m *GoFileInfo) GetDescription() string

func (*GoFileInfo) GetImports

func (m *GoFileInfo) GetImports() []string

func (*GoFileInfo) GetIsTest

func (m *GoFileInfo) GetIsTest() bool

func (*GoFileInfo) GetName

func (m *GoFileInfo) GetName() string

func (*GoFileInfo) GetStatus

func (m *GoFileInfo) GetStatus() GoFileInfo_Status

func (*GoFileInfo) ProtoMessage

func (*GoFileInfo) ProtoMessage()

func (*GoFileInfo) Reset

func (m *GoFileInfo) Reset()

func (*GoFileInfo) String

func (m *GoFileInfo) String() string

type GoFileInfo_Status

type GoFileInfo_Status int32
const (
	GoFileInfo_Unknown      GoFileInfo_Status = 0
	GoFileInfo_ParseSuccess GoFileInfo_Status = 1
	GoFileInfo_ParseFailed  GoFileInfo_Status = 2
	GoFileInfo_ShouldIgnore GoFileInfo_Status = 3
)

func (GoFileInfo_Status) EnumDescriptor

func (GoFileInfo_Status) EnumDescriptor() ([]byte, []int)

func (GoFileInfo_Status) String

func (x GoFileInfo_Status) String() string

type HistoryEvent

type HistoryEvent struct {
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Action    HistoryEvent_Action_Enum   `protobuf:"varint,2,opt,name=action,enum=gcse.HistoryEvent_Action_Enum" json:"action,omitempty"`
}

func (*HistoryEvent) Descriptor

func (*HistoryEvent) Descriptor() ([]byte, []int)

func (*HistoryEvent) GetAction

func (m *HistoryEvent) GetAction() HistoryEvent_Action_Enum

func (*HistoryEvent) GetTimestamp

func (m *HistoryEvent) GetTimestamp() *google_protobuf.Timestamp

func (*HistoryEvent) ProtoMessage

func (*HistoryEvent) ProtoMessage()

func (*HistoryEvent) Reset

func (m *HistoryEvent) Reset()

func (*HistoryEvent) String

func (m *HistoryEvent) String() string

type HistoryEvent_Action

type HistoryEvent_Action struct {
}

func (*HistoryEvent_Action) Descriptor

func (*HistoryEvent_Action) Descriptor() ([]byte, []int)

func (*HistoryEvent_Action) ProtoMessage

func (*HistoryEvent_Action) ProtoMessage()

func (*HistoryEvent_Action) Reset

func (m *HistoryEvent_Action) Reset()

func (*HistoryEvent_Action) String

func (m *HistoryEvent_Action) String() string

type HistoryEvent_Action_Enum

type HistoryEvent_Action_Enum int32
const (
	HistoryEvent_Action_None    HistoryEvent_Action_Enum = 0
	HistoryEvent_Action_Success HistoryEvent_Action_Enum = 1
	HistoryEvent_Action_Failed  HistoryEvent_Action_Enum = 2
	HistoryEvent_Action_Invalid HistoryEvent_Action_Enum = 3
)

func (HistoryEvent_Action_Enum) EnumDescriptor

func (HistoryEvent_Action_Enum) EnumDescriptor() ([]byte, []int)

func (HistoryEvent_Action_Enum) String

func (x HistoryEvent_Action_Enum) String() string

type HistoryInfo

type HistoryInfo struct {
	Events    []*HistoryEvent            `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
	FoundTime *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=found_time,json=foundTime" json:"found_time,omitempty"`
	// Possible value:
	//   web                  added from web
	//   user:<user>          found from user crawling
	//   parent               found by crawling his parent
	//   imported:<pkg>       imported by a <pkg>
	//   testimported:<pkg>   test imported by a <pkg>
	//   package:<pkg>
	//   reference:<pkg>      referenced in the readme file of <pkg>
	//   godoc                found by godoc.org/api
	FoundWay      string                     `protobuf:"bytes,3,opt,name=found_way,json=foundWay" json:"found_way,omitempty"`
	LatestSuccess *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=latest_success,json=latestSuccess" json:"latest_success,omitempty"`
	LatestFailed  *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=latest_failed,json=latestFailed" json:"latest_failed,omitempty"`
}

func (*HistoryInfo) Descriptor

func (*HistoryInfo) Descriptor() ([]byte, []int)

func (*HistoryInfo) GetEvents

func (m *HistoryInfo) GetEvents() []*HistoryEvent

func (*HistoryInfo) GetFoundTime

func (m *HistoryInfo) GetFoundTime() *google_protobuf.Timestamp

func (*HistoryInfo) GetFoundWay

func (m *HistoryInfo) GetFoundWay() string

func (*HistoryInfo) GetLatestFailed

func (m *HistoryInfo) GetLatestFailed() *google_protobuf.Timestamp

func (*HistoryInfo) GetLatestSuccess

func (m *HistoryInfo) GetLatestSuccess() *google_protobuf.Timestamp

func (*HistoryInfo) ProtoMessage

func (*HistoryInfo) ProtoMessage()

func (*HistoryInfo) Reset

func (m *HistoryInfo) Reset()

func (*HistoryInfo) String

func (m *HistoryInfo) String() string

type Package

type Package struct {
	// package "name"
	Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	// Relative path to the repository, "" for root repository, "/sub" for a sub package.
	// Full path: site + "/" + user + "/" + repo + path
	Path        string `protobuf:"bytes,2,opt,name=Path" json:"Path,omitempty"`
	Synopsis    string `protobuf:"bytes,9,opt,name=Synopsis" json:"Synopsis,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=Description" json:"Description,omitempty"`
	// No directory info
	ReadmeFn string `protobuf:"bytes,4,opt,name=ReadmeFn" json:"ReadmeFn,omitempty"`
	// Raw content, cound be md, txt, etc.
	ReadmeData  string   `protobuf:"bytes,5,opt,name=ReadmeData" json:"ReadmeData,omitempty"`
	Imports     []string `protobuf:"bytes,6,rep,name=Imports" json:"Imports,omitempty"`
	TestImports []string `protobuf:"bytes,7,rep,name=TestImports" json:"TestImports,omitempty"`
	// URL to the package source code.
	Url string `protobuf:"bytes,8,opt,name=url" json:"url,omitempty"`
}

func (*Package) Descriptor

func (*Package) Descriptor() ([]byte, []int)

func (*Package) GetDescription

func (m *Package) GetDescription() string

func (*Package) GetImports

func (m *Package) GetImports() []string

func (*Package) GetName

func (m *Package) GetName() string

func (*Package) GetPath

func (m *Package) GetPath() string

func (*Package) GetReadmeData

func (m *Package) GetReadmeData() string

func (*Package) GetReadmeFn

func (m *Package) GetReadmeFn() string

func (*Package) GetSynopsis

func (m *Package) GetSynopsis() string

func (*Package) GetTestImports

func (m *Package) GetTestImports() []string

func (*Package) GetUrl

func (m *Package) GetUrl() string

func (*Package) ProtoMessage

func (*Package) ProtoMessage()

func (*Package) Reset

func (m *Package) Reset()

func (*Package) String

func (m *Package) String() string

type PackageCrawlHistoryReq

type PackageCrawlHistoryReq struct {
	Package string `protobuf:"bytes,1,opt,name=package" json:"package,omitempty"`
}

func (*PackageCrawlHistoryReq) Descriptor

func (*PackageCrawlHistoryReq) Descriptor() ([]byte, []int)

func (*PackageCrawlHistoryReq) GetPackage

func (m *PackageCrawlHistoryReq) GetPackage() string

func (*PackageCrawlHistoryReq) ProtoMessage

func (*PackageCrawlHistoryReq) ProtoMessage()

func (*PackageCrawlHistoryReq) Reset

func (m *PackageCrawlHistoryReq) Reset()

func (*PackageCrawlHistoryReq) String

func (m *PackageCrawlHistoryReq) String() string

type PackageCrawlHistoryResp

type PackageCrawlHistoryResp struct {
	Info *HistoryInfo `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"`
}

func (*PackageCrawlHistoryResp) Descriptor

func (*PackageCrawlHistoryResp) Descriptor() ([]byte, []int)

func (*PackageCrawlHistoryResp) GetInfo

func (m *PackageCrawlHistoryResp) GetInfo() *HistoryInfo

func (*PackageCrawlHistoryResp) ProtoMessage

func (*PackageCrawlHistoryResp) ProtoMessage()

func (*PackageCrawlHistoryResp) Reset

func (m *PackageCrawlHistoryResp) Reset()

func (*PackageCrawlHistoryResp) String

func (m *PackageCrawlHistoryResp) String() string

type PackageInfo

type PackageInfo struct {
	Name         string        `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Package      string        `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"`
	Author       string        `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"`
	Stars        int32         `protobuf:"varint,4,opt,name=stars" json:"stars,omitempty"`
	Synopsis     string        `protobuf:"bytes,5,opt,name=synopsis" json:"synopsis,omitempty"`
	Description  string        `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"`
	ProjectUrl   string        `protobuf:"bytes,7,opt,name=project_url,json=projectUrl" json:"project_url,omitempty"`
	ReadmeFn     string        `protobuf:"bytes,8,opt,name=readme_fn,json=readmeFn" json:"readme_fn,omitempty"`
	ReadmeData   string        `protobuf:"bytes,9,opt,name=readme_data,json=readmeData" json:"readme_data,omitempty"`
	Imports      []string      `protobuf:"bytes,10,rep,name=imports" json:"imports,omitempty"`
	TestImports  []string      `protobuf:"bytes,11,rep,name=test_imports,json=testImports" json:"test_imports,omitempty"`
	Exported     []string      `protobuf:"bytes,12,rep,name=exported" json:"exported,omitempty"`
	References   []string      `protobuf:"bytes,18,rep,name=references" json:"references,omitempty"`
	CrawlingInfo *CrawlingInfo `protobuf:"bytes,17,opt,name=crawling_info,json=crawlingInfo" json:"crawling_info,omitempty"`
	// Available if the package is not the repo's root.
	FolderInfo *FolderInfo `protobuf:"bytes,14,opt,name=folder_info,json=folderInfo" json:"folder_info,omitempty"`
	// Available if the package is the repo's root.
	RepoInfo *RepoInfo `protobuf:"bytes,15,opt,name=repo_info,json=repoInfo" json:"repo_info,omitempty"`
}

func (*PackageInfo) Descriptor

func (*PackageInfo) Descriptor() ([]byte, []int)

func (*PackageInfo) GetAuthor

func (m *PackageInfo) GetAuthor() string

func (*PackageInfo) GetCrawlingInfo

func (m *PackageInfo) GetCrawlingInfo() *CrawlingInfo

func (*PackageInfo) GetDescription

func (m *PackageInfo) GetDescription() string

func (*PackageInfo) GetExported

func (m *PackageInfo) GetExported() []string

func (*PackageInfo) GetFolderInfo

func (m *PackageInfo) GetFolderInfo() *FolderInfo

func (*PackageInfo) GetImports

func (m *PackageInfo) GetImports() []string

func (*PackageInfo) GetName

func (m *PackageInfo) GetName() string

func (*PackageInfo) GetPackage

func (m *PackageInfo) GetPackage() string

func (*PackageInfo) GetProjectUrl

func (m *PackageInfo) GetProjectUrl() string

func (*PackageInfo) GetReadmeData

func (m *PackageInfo) GetReadmeData() string

func (*PackageInfo) GetReadmeFn

func (m *PackageInfo) GetReadmeFn() string

func (*PackageInfo) GetReferences

func (m *PackageInfo) GetReferences() []string

func (*PackageInfo) GetRepoInfo

func (m *PackageInfo) GetRepoInfo() *RepoInfo

func (*PackageInfo) GetStars

func (m *PackageInfo) GetStars() int32

func (*PackageInfo) GetSynopsis

func (m *PackageInfo) GetSynopsis() string

func (*PackageInfo) GetTestImports

func (m *PackageInfo) GetTestImports() []string

func (*PackageInfo) ProtoMessage

func (*PackageInfo) ProtoMessage()

func (*PackageInfo) Reset

func (m *PackageInfo) Reset()

func (*PackageInfo) String

func (m *PackageInfo) String() string

type PersonInfo

type PersonInfo struct {
	CrawlingInfo *CrawlingInfo `protobuf:"bytes,1,opt,name=crawling_info,json=crawlingInfo" json:"crawling_info,omitempty"`
}

func (*PersonInfo) Descriptor

func (*PersonInfo) Descriptor() ([]byte, []int)

func (*PersonInfo) GetCrawlingInfo

func (m *PersonInfo) GetCrawlingInfo() *CrawlingInfo

func (*PersonInfo) ProtoMessage

func (*PersonInfo) ProtoMessage()

func (*PersonInfo) Reset

func (m *PersonInfo) Reset()

func (*PersonInfo) String

func (m *PersonInfo) String() string

type RepoInfo

type RepoInfo struct {
	// The timestamp this repo-info is crawled
	CrawlingTime *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=crawling_time,json=crawlingTime" json:"crawling_time,omitempty"`
	Stars        int32                      `protobuf:"varint,2,opt,name=stars" json:"stars,omitempty"`
	Description  string                     `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	// Where this project was forked from, full path
	Source string `protobuf:"bytes,5,opt,name=source" json:"source,omitempty"`
	// As far as we know, when this repo was updated
	LastUpdated *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated" json:"last_updated,omitempty"`
}

func (*RepoInfo) Descriptor

func (*RepoInfo) Descriptor() ([]byte, []int)

func (*RepoInfo) GetCrawlingTime

func (m *RepoInfo) GetCrawlingTime() *google_protobuf.Timestamp

func (*RepoInfo) GetDescription

func (m *RepoInfo) GetDescription() string

func (*RepoInfo) GetLastUpdated

func (m *RepoInfo) GetLastUpdated() *google_protobuf.Timestamp

func (*RepoInfo) GetSource

func (m *RepoInfo) GetSource() string

func (*RepoInfo) GetStars

func (m *RepoInfo) GetStars() int32

func (*RepoInfo) ProtoMessage

func (*RepoInfo) ProtoMessage()

func (*RepoInfo) Reset

func (m *RepoInfo) Reset()

func (*RepoInfo) String

func (m *RepoInfo) String() string

type Repository

type Repository struct {
	Branch    string `protobuf:"bytes,6,opt,name=branch" json:"branch,omitempty"`
	Signature string `protobuf:"bytes,7,opt,name=signature" json:"signature,omitempty"`
	// map from relative path, e.g. "proto/store", to Package
	Packages     map[string]*Package `` /* 136-byte string literal not displayed */
	ReadmeFn     string              `protobuf:"bytes,2,opt,name=ReadmeFn" json:"ReadmeFn,omitempty"`
	ReadmeData   string              `protobuf:"bytes,3,opt,name=ReadmeData" json:"ReadmeData,omitempty"`
	Stars        int32               `protobuf:"varint,4,opt,name=stars" json:"stars,omitempty"`
	CrawlingInfo *CrawlingInfo       `protobuf:"bytes,5,opt,name=crawling_info,json=crawlingInfo" json:"crawling_info,omitempty"`
}

func (*Repository) Descriptor

func (*Repository) Descriptor() ([]byte, []int)

func (*Repository) GetBranch

func (m *Repository) GetBranch() string

func (*Repository) GetCrawlingInfo

func (m *Repository) GetCrawlingInfo() *CrawlingInfo

func (*Repository) GetPackages

func (m *Repository) GetPackages() map[string]*Package

func (*Repository) GetReadmeData

func (m *Repository) GetReadmeData() string

func (*Repository) GetReadmeFn

func (m *Repository) GetReadmeFn() string

func (*Repository) GetSignature

func (m *Repository) GetSignature() string

func (*Repository) GetStars

func (m *Repository) GetStars() int32

func (*Repository) ProtoMessage

func (*Repository) ProtoMessage()

func (*Repository) PutPackage

func (m *Repository) PutPackage(path string, pkg *Package)

func (*Repository) Reset

func (m *Repository) Reset()

func (*Repository) String

func (m *Repository) String() string

type StoreServiceClient

type StoreServiceClient interface {
	PackageCrawlHistory(ctx context.Context, in *PackageCrawlHistoryReq, opts ...grpc.CallOption) (*PackageCrawlHistoryResp, error)
}

func NewStoreServiceClient

func NewStoreServiceClient(cc *grpc.ClientConn) StoreServiceClient

type StoreServiceServer

type StoreServiceServer interface {
	PackageCrawlHistory(context.Context, *PackageCrawlHistoryReq) (*PackageCrawlHistoryResp, error)
}

Jump to

Keyboard shortcuts

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