module

package
v1.5.22 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tech added in v1.4.12

func Tech(k string, logger util.Logger) (string, string, string)

Types

type Module

type Module struct {
	Key         string                `json:"-"`
	Name        string                `json:"name,omitempty"`
	Icon        string                `json:"icon,omitempty"`
	Description string                `json:"description,omitempty"`
	Hidden      bool                  `json:"hidden,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"`
	Dangerous   bool                  `json:"dangerous,omitempty"`
	Requires    []string              `json:"requires,omitempty"`
	Priority    int                   `json:"priority,omitempty"`
	Technology  []string              `json:"technology,omitempty"`
	Files       filesystem.FileLoader `json:"-"`
	URL         string                `json:"-"`
	UsageMD     string                `json:"-"`
}

func (*Module) DocPath

func (m *Module) DocPath() string

func (*Module) FeaturesFilePath added in v1.0.16

func (m *Module) FeaturesFilePath() string

func (*Module) FeaturesPath added in v1.0.16

func (m *Module) FeaturesPath() string

func (*Module) IconSafe

func (m *Module) IconSafe() string

func (*Module) Title

func (m *Module) Title() 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

func (Results) Paths added in v0.2.33

func (r Results) Paths(includeSkipped bool) []string

type Service

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

func NewService

func NewService(ctx context.Context, root string, logger util.Logger) (*Service, error)

func (*Service) AddIfNeeded

func (s *Service) AddIfNeeded(ctx context.Context, key string, path string, url string, logger util.Logger) (Modules, bool, error)

func (*Service) AssetURL

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

func (*Service) ConfigDirectory added in v0.10.25

func (s *Service) ConfigDirectory() string

func (*Service) Dangerous added in v1.0.1

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

func (*Service) Deps added in v0.2.38

func (s *Service) Deps() map[string][]string

func (*Service) Download

func (s *Service) Download(_ context.Context, key string, url string, logger util.Logger) error

func (*Service) Get

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

func (*Service) GetFilenames

func (s *Service) GetFilenames(mods Modules, logger util.Logger) ([]string, error)

func (*Service) GetFiles

func (s *Service) GetFiles(mods Modules, isPrivate bool, logger util.Logger) (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, logger util.Logger) (Modules, error)

func (*Service) LoadNative

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

func (*Service) Modules

func (s *Service) Modules() Modules

func (*Service) ModulesSorted added in v1.3.1

func (s *Service) ModulesSorted() Modules

func (*Service) ModulesVisible added in v1.3.1

func (s *Service) ModulesVisible() Modules

func (*Service) Register

func (s *Service) Register(ctx context.Context, root string, key string, path string, u string, logger util.Logger) ([]string, error)

func (*Service) Search

func (s *Service) Search(_ context.Context, q string, _ util.Logger) (result.Results, error)

Jump to

Keyboard shortcuts

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