Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// RootPath specifies the filesystem path from which requests are to be served.
RootPath string
}
type FileserverService ¶
type FileserverService struct {
// contains filtered or unexported fields
}
func New ¶
func New() *FileserverService
New initialises an unconfigured fileserver. See [Configure] for details.
func NewWithConfig ¶
func NewWithConfig(config *Config) *FileserverService
New initialises and optionally configures a fileserver. See [Service.Configure] for details.
func (*FileserverService) Configure ¶
func (s *FileserverService) Configure(config *Config)
Configure reconfigures the fileserver. If config is nil, then every request will receive a 503 Service Unavailable response.
func (*FileserverService) ServeHTTP ¶
func (s *FileserverService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*FileserverService) ServiceName ¶
func (s *FileserverService) ServiceName() string
ServiceName returns the name of the plugin. You should use the go module format e.g. github.com/myuser/myplugin
Click to show internal directories.
Click to hide internal directories.