assetpath

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginInfo

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

func NewPluginInfo

func NewPluginInfo(pluginJSON plugins.JSONData, class plugins.Class, fs plugins.FS) PluginInfo

type Service

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

Service provides methods for constructing asset paths for plugins. It supports core plugins, external plugins stored on the local filesystem, and external plugins stored on the plugins CDN, and it will switch to the correct implementation depending on the plugin and the config.

func DefaultService

func DefaultService(cfg *config.PluginManagementCfg) *Service

func ProvideService

func ProvideService(cfg *config.PluginManagementCfg, cdn *pluginscdn.Service) *Service

func (*Service) Base

func (s *Service) Base(n PluginInfo) (string, error)

Base returns the base path for the specified plugin.

func (*Service) DefaultLogoPath

func (s *Service) DefaultLogoPath(pluginType plugins.Type) string

DefaultLogoPath returns the default logo path for the specified plugin type.

func (*Service) Module

func (s *Service) Module(n PluginInfo) (string, error)

Module returns the module.js path for the specified plugin.

func (*Service) RelativeURL

func (s *Service) RelativeURL(n PluginInfo, pathStr string) (string, error)

RelativeURL returns the relative URL for an arbitrary plugin asset.

Jump to

Keyboard shortcuts

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