fileserver

package
v3.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RootPath string
}

type Service

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

func New

func New(config *Config) *Service

func (*Service) Name

func (s *Service) Name() string

Name returns the name of the plugin. You should use the go module format e.g. github.com/myuser/myplugin

func (*Service) OnShutdown

func (s *Service) OnShutdown() error

OnShutdown is called when the app is shutting down You can use this to clean up any resources you have allocated

func (*Service) OnStartup

func (s *Service) OnStartup(ctx context.Context, options application.ServiceOptions) error

OnStartup is called when the app is starting up. You can use this to initialise any resources you need.

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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