esmodels

package
v0.0.0-...-7f17c66 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Active          ActivityStatus = "active"
	DeadEndFork                    = "dead-end-fork"     // Forks with no commits
	QuickFork                      = "quick-fork"        // Forks with less than 3 commits, all within a week from creation
	NoRecentCommits                = "no-recent-commits" // No commits for ExpiresAfter

	// No commits for ExpiresAfter and no imports.
	// This is a status derived from NoRecentCommits and the imports count information in the db.
	Inactive = "inactive"
)
View Source
const (
	Git VCSType = "Git"
	Hg          = "Hg"
	SVN         = "SVN"
	Bzr         = "Bzr"
)
View Source
const DateTimeFormat = "2006-01-02T15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type About

type About struct {
	Content     string `json:"content" esType:"text" esAnalyzer:"english"`
	ContentType string `json:"content_type" esType:"keyword"`
}

type ActivityStatus

type ActivityStatus string

func (ActivityStatus) String

func (as ActivityStatus) String() string

type Author

type Author struct {
	Name         string   `json:"name" esType:"keyword"`
	PrimaryURL   string   `json:"primary_url" esType:"keyword"`
	Created      string   `json:"created" esType:"date"`
	LastUpdated  string   `json:"last_updated" esType:"date"`
	Repositories []string `json:"name" esType:"keyword"`
}

type Field

type Field struct {
	ESType     string     `json:"type"`
	Analyzer   string     `json:"analyzer,omitempty"`
	Properties Properties `json:"properties,omitempty"`
}

type Mapping

type Mapping struct {
	Name       string
	Properties Properties
}

func MappingForType

func MappingForType(v interface{}) *Mapping

func (*Mapping) ToJSON

func (m *Mapping) ToJSON() string

type Package

type Package struct {
	Name         string                 `json:"name" esType:"keyword"`
	ImportPath   string                 `json:"import_path" esType:"keyword"`
	Doc          string                 `json:"doc" esType:"text" esAnalyzer:"english"`
	Synopsis     string                 `json:"synopsis" esType:"text" esAnalyzer:"english"`
	Errors       []string               `json:"errors" esType:"keyword"`
	IsCommand    bool                   `json:"is_command" esType:"boolean"`
	Files        []*doc.File            `json:"files"`
	TestFiles    []*doc.File            `json:"test_files"`
	Imports      []string               `json:"imports" esType:"keyword"`
	TestImports  []string               `json:"test_imports" esType:"keyword"`
	XTestImports []string               `json:"x_test_imports" esType:"keyword"`
	Consts       []*doc.Value           `json:"consts"`
	Funcs        []*doc.Func            `json:"funcs"`
	Types        []*doc.Type            `json:"types"`
	Vars         []*doc.Value           `json:"vars"`
	Examples     []*doc.Example         `json:"examples"`
	Notes        map[string][]*doc.Note `json:"notes"`
}

type Properties

type Properties map[string]Field

type Ref

type Ref struct {
	Name            string     `json:"name" esType:"keyword"`
	IsDefaultBranch bool       `json:"is_head" esType:"boolean"`
	RefType         string     `json:"ref_type" esType:"keyword"`
	LastSeenCommit  string     `json:"last_seen_commit" esType:"keyword"`
	LastUpdated     string     `json:"last_updated" esType:"date"`
	Packages        []*Package `json:"packages"`
}

type Repository

type Repository struct {
	Name         string         `json:"name" esType:"keyword"`
	FullName     string         `json:"full_name" esType:"keyword"`
	Description  string         `json:"description" esType:"text" esAnalyzer:"english"`
	VCS          string         `json:"vcs" esType:"keyword"`
	PrimaryURL   string         `json:"primary_url" esType:"keyword"`
	Issues       *Tickets       `json:"issues"`
	PullRequests *Tickets       `json:"pull_requests"`
	Owner        string         `json:"owner" esType:"keyword"`
	Created      string         `json:"created" esType:"date"`
	LastUpdated  string         `json:"last_updated" esType:"date"`
	LastCrawled  string         `json:"last_crawled" esType:"date"`
	Stars        int            `json:"stars" esType:"long"`
	Forks        int            `json:"forks" esType:"long"`
	IsFork       bool           `json:"is_fork" esType:"boolean"`
	Status       ActivityStatus `json:"status" esType:"keyword"`
	About        *About         `json:"about""`
	Refs         []*Ref         `json:"refs"`
}

type Tickets

type Tickets struct {
	URL    string `json:"url" esType:"keyword"`
	Open   int    `json:"open" esType:"long"`
	Closed int    `json:"closed" esType:"long"`
}

type VCSType

type VCSType string

func (VCSType) String

func (vt VCSType) String() string

Jump to

Keyboard shortcuts

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