Versions in this module Expand all Collapse all v0 v0.16.0 Oct 21, 2026 Changes in this version + const KindAuto + const KindPlugin + const KindTheme + const PageType + const StatusApproved + const StatusPending + const StatusRejected + const ThemePageType + var ErrAlreadyListed = errors.New("this repository is already listed in the directory") + var ErrBadKind = errors.New("kind must be plugin or theme") + var ErrBadRepo = errors.New(...) + var ErrBusy = errors.New("another submission is being checked; try again in a minute") + var ErrNameTaken = errors.New("a different repository already publishes an entry with this name") + var ErrNotFound = errors.New("no such repository") + var ErrQueueFull = errors.New("the review queue is full; try again in a few days") + var ErrRateLimited = errors.New("too many submissions from your address; try again in an hour") + var ErrUnderReview = errors.New("this repository is already under review") + func Migrate(db *gorm.DB) error + func ParseRepo(input string) (string, error) + func ValidName(name string) bool + type Build struct + BuiltAt time.Time + Doc string + ID uint + Kind string + LastAttemptAt *time.Time + LastError string + Name string + RepoID uint + Stars int + Version string + func (Build) TableName() string + func (b *Build) Detail() (registry.DetailDoc, error) + func (b *Build) SetDoc(d registry.DetailDoc) error + type Detail = registry.DetailDoc + type Entry = registry.IndexEntry + type Plugin struct + func New() *Plugin + func (p *Plugin) DisplayName() string + func (p *Plugin) Hosted() bool + func (p *Plugin) Name() string + func (p *Plugin) OnInit(db *gorm.DB) error + func (p *Plugin) Pages() []gplugin.PageDefinition + func (p *Plugin) RenderPage(ctx *gplugin.HookContext, pageType string) (string, gin.H) + func (p *Plugin) ScheduledJobs() []gplugin.ScheduledJob + func (p *Plugin) Search(ctx *gplugin.HookContext, query string) []gplugin.SearchResult + func (p *Plugin) Service() *Service + func (p *Plugin) SetSource(f func(token string) registry.Source) + func (p *Plugin) SetThemeValidator(v registry.ThemeValidator) + func (p *Plugin) SetUserAgent(ua string) + func (p *Plugin) SetValidator(v registry.Validator) + func (p *Plugin) Settings() []gplugin.SettingDefinition + func (p *Plugin) Sitemap(ctx *gplugin.HookContext) []gplugin.SitemapURL + func (p *Plugin) Token() string + func (p *Plugin) Version() string + type Release = registry.ReleaseDoc + type Repo struct + DecidedAt *time.Time + ID uint + Kind string + RejectReason string + Repo string + Status string + SubmittedAt time.Time + SubmitterIP string + func (Repo) TableName() string + type RepoView struct + AllowedHosts []string + Author string + BuiltAt time.Time + DecidedAt *time.Time + DisplayName string + ID uint + Kind string + LastAttemptAt *time.Time + LastError string + License string + MinGoblogVersion string + Name string + RejectReason string + Repo string + ScreenshotURL string + SourceURL string + Stars int + Status string + SubmittedAt time.Time + Version string + type Service struct + func NewService(db *gorm.DB, newSource func(token string) registry.Source, ...) *Service + func (s *Service) Add(ctx context.Context, kind, input, token string) (*Repo, error) + func (s *Service) Approve(id uint) error + func (s *Service) Delist(id uint) error + func (s *Service) Detail(kind, name string) (registry.DetailDoc, bool) + func (s *Service) Get(id uint) (RepoView, registry.DetailDoc, error) + func (s *Service) Index(kind string) ([]byte, []registry.IndexEntry) + func (s *Service) LastRefresh() time.Time + func (s *Service) List(status string) ([]RepoView, error) + func (s *Service) Rebuild(ctx context.Context, id uint, token string) error + func (s *Service) RefreshAll(ctx context.Context, token string) error + func (s *Service) Reject(id uint, reason string) error + func (s *Service) Submit(ctx context.Context, kind, input, ip, token string) (*Repo, error) + type ValidationError struct + Msg string + func (e *ValidationError) Error() string