mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 04:12:03 +08:00

### Summary Add a web package for serving frontend #### Related Issues / PR's https://github.com/SigNoz/signoz/pull/5710
30 lines
630 B
Go
30 lines
630 B
Go
package web
|
|
|
|
import (
|
|
"go.signoz.io/signoz/pkg/confmap"
|
|
)
|
|
|
|
// Config satisfies the confmap.Config interface
|
|
var _ confmap.Config = (*Config)(nil)
|
|
|
|
// Config holds the configuration for web.
|
|
type Config struct {
|
|
// The prefix to serve the files from
|
|
Prefix string `mapstructure:"prefix"`
|
|
// The directory containing the static build files. The root of this directory should
|
|
// have an index.html file.
|
|
Directory string `mapstructure:"directory"`
|
|
}
|
|
|
|
func (c *Config) NewWithDefaults() confmap.Config {
|
|
return &Config{
|
|
Prefix: "/",
|
|
Directory: "/etc/signoz/web",
|
|
}
|
|
|
|
}
|
|
|
|
func (c *Config) Validate() error {
|
|
return nil
|
|
}
|