Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSampleFiles ¶
func CurrentBaseURL ¶
func CurrentBaseURL() string
CurrentBaseURL returns the base URL for the globally tracked running file server, if any.
func LoggingMiddleware ¶
LoggingMiddleware logs information about requests
Types ¶
type FileServer ¶
type FileServer struct {
// contains filtered or unexported fields
}
FileServer handles serving generated images via HTTP
func NewFileServer ¶
func NewFileServer(basePath string) *FileServer
NewFileServer creates a new file server instance
func (*FileServer) GetBasePath ¶
func (fs *FileServer) GetBasePath() string
GetBasePath returns the current base path of the file server
func (*FileServer) GetBaseURL ¶
func (fs *FileServer) GetBaseURL() string
GetBaseURL returns the base URL (including trailing slash) for the active file server instance.
func (*FileServer) GetURL ¶
func (fs *FileServer) GetURL(relativePath string) string
GetURL returns the URL for accessing a specific image
func (*FileServer) Start ¶
func (fs *FileServer) Start() error
Start initializes and starts the file server
func (*FileServer) Stop ¶
func (fs *FileServer) Stop() error
Stop gracefully shuts down the file server
func (*FileServer) UpdateBasePath ¶
func (fs *FileServer) UpdateBasePath(newPath string) error
UpdateBasePath changes the base directory and restarts the server
Click to show internal directories.
Click to hide internal directories.