Documentation
¶
Index ¶
- Constants
- func StartUpdateWorkers(num int, pr *Repo, tr *Repo)
- type Extension
- type Rating
- type Repo
- func (r *Repo) Add(slug string)
- func (r *Repo) Exists(slug string) bool
- func (r *Repo) GenerateInstallsChart() []byte
- func (r *Repo) GenerateSizeChart() []byte
- func (r *Repo) Get(slug string) *Extension
- func (r *Repo) GetInstallsChart() string
- func (r *Repo) GetRev() int
- func (r *Repo) GetSizeChart() string
- func (r *Repo) Len() uint64
- func (r *Repo) LoadExisting()
- func (r *Repo) ProcessUpdate(slug string, rev int) error
- func (r *Repo) QueueUpdate(slug string, rev string)
- func (r *Repo) Remove(slug string)
- func (r *Repo) Set(slug string, e *Extension)
- func (r *Repo) SetRev(new int)
- func (r *Repo) SetStatus(e *Extension, s status)
- func (r *Repo) UpdateIndex(idx *index.Index) error
- func (r *Repo) UpdateList(fresh *bool) error
- type Screenshot
- type UpdateRequest
Constants ¶
View Source
const ( // Open shows we have files and API info stored Open status = iota // Closed shows we cannot get data Closed )
Variables ¶
This section is empty.
Functions ¶
func StartUpdateWorkers ¶
StartUpdateWorkers starts Goroutines to process Plugin and Theme updates
Types ¶
type Extension ¶
type Extension struct {
Slug string `json:"slug"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Author string `json:"author,omitempty"`
AuthorProfile string `json:"author_profile,omitempty"`
Contributors [][]string `json:"contributors,omitempty"`
Requires string `json:"requires,omitempty"`
Tested string `json:"tested,omitempty"`
RequiresPHP string `json:"requires_php,omitempty"`
Rating int `json:"rating,omitempty"`
Ratings []Rating `json:"ratings,omitempty"`
NumRatings int `json:"num_ratings,omitempty"`
SupportThreads int `json:"support_threads,omitempty"`
SupportThreadsResolved int `json:"support_threads_resolved,omitempty"`
ActiveInstalls int `json:"active_installs,omitempty"`
Downloaded int `json:"downloaded,omitempty"`
LastUpdated string `json:"last_updated,omitempty"`
Added string `json:"added,omitempty"`
Homepage string `json:"homepage,omitempty"`
Sections struct {
Description string `json:"description,omitempty"`
Faq string `json:"faq,omitempty"`
Changelog string `json:"changelog,omitempty"`
Screenshots string `json:"screenshots,omitempty"`
} `json:"sections,omitempty"`
ShortDescription string `json:"short_description,omitempty"`
DownloadLink string `json:"download_link,omitempty"`
Screenshots []Screenshot `json:"screenshots,omitempty"`
Tags [][]string `json:"tags,omitempty"`
StableTag string `json:"stable_tag,omitempty"`
Versions [][]string `json:"versions,omitempty"`
DonateLink string `json:"donate_link,omitempty"`
Status status `json:"status,omitempty"`
Stats *filestats.Stats `json:"stats,omitempty"`
sync.RWMutex
// contains filtered or unexported fields
}
Extension holds data about a Plugin or Theme
func (*Extension) Search ¶
func (e *Extension) Search(pat, slug string, opt *index.SearchOptions) (*index.SearchResponse, error)
Search performs a basic search on the current index using the supplied pattern and the options.
type Repo ¶
type Repo struct {
ExtType string `json:"type"`
Revision int `json:"revision"`
Updated time.Time `json:"updated"`
Total int `json:"total"`
Closed int `json:"closed"`
UpdateQueue chan UpdateRequest `json:"-"`
List map[string]*Extension `json:"-"`
sync.RWMutex
// contains filtered or unexported fields
}
Repo holds data about the Plugins SVN Repo.
func (*Repo) GenerateInstallsChart ¶
generateInstallsChart ...
func (*Repo) LoadExisting ¶
func (r *Repo) LoadExisting()
LoadExisting loading data from DB and then Indexes
func (*Repo) ProcessUpdate ¶
ProcessUpdate performs an update Updates Meta data and files
func (*Repo) QueueUpdate ¶
QueueUpdate adds a request to the Update Queue
func (*Repo) UpdateIndex ¶
UpdateIndex updates the index held by an Extension
func (*Repo) UpdateList ¶
UpdateList updates our Plugin list.
type Screenshot ¶
Screenshot contains the source and caption of a screenshot
type UpdateRequest ¶
UpdateRequest ...
Click to show internal directories.
Click to hide internal directories.