Documentation ¶
Overview ¶
Package website contains the service delivering the website
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DummyHTMLData = &HTMLData{ Title: "", Path: "", EthMainnetMonths: []string{ "2023-08", "2023-09", }, CurrentNetwork: "Ethereum Mainnet", CurrentMonth: "2023-08", Files: []FileEntry{ {"2023-08-29.csv.zip", 97210118, "02:02:23 2023-09-02"}, {"2023-08-29.parquet", 90896124, "02:02:09 2023-09-02"}, {"2023-08-29_transactions.csv.zip", 787064375, "02:02:43 2023-09-02"}, {"2023-08-30.csv.zip", 97210118, "02:02:23 2023-09-02"}, {"2023-08-30.parquet", 90896124, "02:02:09 2023-09-02"}, {"2023-08-30_transactions.csv.zip", 787064375, "02:02:43 2023-09-02"}, {"2023-08-31.csv.zip", 97210118, "02:02:23 2023-09-02"}, {"2023-08-31.parquet", 90896124, "02:02:09 2023-09-02"}, {"2023-08-31_transactions.csv.zip", 787064375, "02:02:43 2023-09-02"}, }, }
View Source
var ErrServerAlreadyStarted = errors.New("server was already started")
Functions ¶
func LoggingMiddlewareZap ¶
LoggingMiddlewareZap logs the incoming HTTP request & its duration.
func ParseFilesTemplate ¶
func ParseIndexTemplate ¶
Types ¶
type DevWebserver ¶ added in v0.5.2
type DevWebserver struct {
// contains filtered or unexported fields
}
func NewDevWebserver ¶ added in v0.5.2
func NewDevWebserver(opts *DevWebserverOpts) (server *DevWebserver, err error)
func (*DevWebserver) RespondError ¶ added in v0.5.2
func (srv *DevWebserver) RespondError(w http.ResponseWriter, code int, message string)
func (*DevWebserver) RespondOK ¶ added in v0.5.2
func (srv *DevWebserver) RespondOK(w http.ResponseWriter, response any)
func (*DevWebserver) StartServer ¶ added in v0.5.2
func (srv *DevWebserver) StartServer() (err error)
type DevWebserverOpts ¶ added in v0.5.2
type DevWebserverOpts struct { ListenAddress string Log *zap.SugaredLogger Dev bool // reloads template on every request EnablePprof bool }
type HTTPErrorResp ¶
Click to show internal directories.
Click to hide internal directories.