DataHoarder
55661a12da
All checks were successful
continuous-integration/drone/push Build is passing
34 lines
840 B
Go
34 lines
840 B
Go
package views
|
|
|
|
import (
|
|
cmdutils "git.gammaspectra.live/P2Pool/p2pool-observer/cmd/utils"
|
|
"git.gammaspectra.live/P2Pool/p2pool-observer/p2pool/sidechain"
|
|
"git.gammaspectra.live/P2Pool/p2pool-observer/types"
|
|
)
|
|
|
|
type GlobalRequestContext struct {
|
|
IsOnion bool
|
|
DonationAddress string
|
|
SiteTitle string
|
|
NetServiceAddress string
|
|
TorServiceAddress string
|
|
Consensus *sidechain.Consensus
|
|
Pool *cmdutils.PoolInfoResult
|
|
Socials struct {
|
|
Irc struct {
|
|
Title string
|
|
Link string
|
|
WebChat string
|
|
}
|
|
Matrix struct {
|
|
Link string
|
|
}
|
|
}
|
|
HexBuffer [types.HashSize * 2]byte
|
|
IsRefresh func() (ok, isRefresh bool, interval int, uriRefresh, uriStatic string)
|
|
}
|
|
|
|
func (ctx *GlobalRequestContext) GetUrl(host string) string {
|
|
return cmdutils.GetSiteUrlByHost(host, ctx.IsOnion)
|
|
}
|