Documentation ¶
Index ¶
- type Module
- type Modules
- type Resolution
- type Resolutions
- type Result
- type Results
- type Service
- func (s *Service) AddIfNeeded(ctx context.Context, key string, path string, url string) (*Module, bool, error)
- func (s *Service) AssetURL(ctx context.Context, key string) (string, error)
- func (s *Service) Download(key string, url string) error
- func (s *Service) Get(key string) (*Module, error)
- func (s *Service) GetFilenames(mods Modules) ([]string, error)
- func (s *Service) GetFiles(mods Modules, addHeader bool) (file.Files, error)
- func (s *Service) GetFilesystem(key string) filesystem.FileLoader
- func (s *Service) GetModules(keys ...string) (Modules, error)
- func (s *Service) Keys() []string
- func (s *Service) Load(ctx context.Context, key string, url string) (*Module, error)
- func (s *Service) LoadNative(ctx context.Context, keys ...string) (Modules, error)
- func (s *Service) Modules() Modules
- func (s *Service) Register(ctx context.Context, path string, defs ...*project.ModuleDef) ([]string, error)
- func (s *Service) Search(ctx context.Context, q string, logger *zap.SugaredLogger) (result.Results, error)
- func (s *Service) UpdateFile(mods Modules, d *diff.Diff) ([]string, error)
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 }
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 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 (*Service) GetFilesystem ¶
func (s *Service) GetFilesystem(key string) filesystem.FileLoader
func (*Service) LoadNative ¶
Click to show internal directories.
Click to hide internal directories.