module

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Key         string                `json:"-"`
	Name        string                `json:"name,omitempty"`
	Icon        string                `json:"icon,omitempty"`
	Description string                `json:"description,omitempty"`
	AuthorName  string                `json:"authorName,omitempty"`
	AuthorEmail string                `json:"authorEmail,omitempty"`
	License     string                `json:"license,omitempty"`
	Sourcecode  string                `json:"sourcecode,omitempty"`
	ConfigVars  util.KeyTypeDescs     `json:"configVars,omitempty"`
	PortOffsets map[string]int        `json:"portOffsets,omitempty"`
	Priority    int                   `json:"priority,omitempty"`
	Files       filesystem.FileLoader `json:"-"`
	URL         string                `json:"-"`
	UsageMD     string                `json:"-"`
	// contains filtered or unexported fields
}

func (*Module) DocPath

func (m *Module) DocPath() string

func (*Module) IconSafe

func (m *Module) IconSafe() string

func (*Module) Title

func (m *Module) Title() string

func (*Module) UsageHTML

func (m *Module) UsageHTML() string

func (*Module) WebPath

func (m *Module) WebPath() string

type Modules

type Modules []*Module

func (Modules) Get

func (m Modules) Get(key string) *Module

func (Modules) Keys

func (m Modules) Keys() []string

func (Modules) Sort

func (m Modules) Sort() Modules

type Resolution

type Resolution struct {
	Title   string            `json:"title"`
	Project string            `json:"project"`
	Action  string            `json:"action"`
	Args    map[string]string `json:"args,omitempty"`
}

func (*Resolution) URL

func (r *Resolution) URL() string

type Resolutions

type Resolutions []*Resolution

type Result

type Result struct {
	Keys     []string    `json:"keys"`
	Status   string      `json:"status"`
	Diffs    diff.Diffs  `json:"diffs,omitempty"`
	Actions  Resolutions `json:"actions,omitempty"`
	Duration int         `json:"duration,omitempty"`
}

func (*Result) DiffsFiltered

func (r *Result) DiffsFiltered(includeSkipped bool) diff.Diffs

type Results

type Results []*Result

func (Results) DiffCount

func (r Results) DiffCount(includeSkipped bool) int

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx context.Context, config filesystem.FileLoader, logger *zap.SugaredLogger) *Service

func (*Service) AddIfNeeded

func (s *Service) AddIfNeeded(ctx context.Context, key string, path string, url string) (*Module, bool, error)

func (*Service) AssetURL

func (s *Service) AssetURL(ctx context.Context, key string) (string, error)

func (*Service) Download

func (s *Service) Download(key string, url string) error

func (*Service) Get

func (s *Service) Get(key string) (*Module, error)

func (*Service) GetFilenames

func (s *Service) GetFilenames(mods Modules) ([]string, error)

func (*Service) GetFiles

func (s *Service) GetFiles(mods Modules, addHeader bool) (file.Files, error)

func (*Service) GetFilesystem

func (s *Service) GetFilesystem(key string) filesystem.FileLoader

func (*Service) GetModules

func (s *Service) GetModules(keys ...string) (Modules, error)

func (*Service) Keys

func (s *Service) Keys() []string

func (*Service) Load

func (s *Service) Load(ctx context.Context, key string, url string) (*Module, error)

func (*Service) LoadNative

func (s *Service) LoadNative(ctx context.Context, keys ...string) (Modules, error)

func (*Service) Modules

func (s *Service) Modules() Modules

func (*Service) Register

func (s *Service) Register(ctx context.Context, path string, defs ...*project.ModuleDef) ([]string, error)

func (*Service) Search

func (s *Service) Search(q string) (result.Results, error)

func (*Service) UpdateFile

func (s *Service) UpdateFile(mods Modules, d *diff.Diff) ([]string, error)

Jump to

Keyboard shortcuts

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