Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func BoolValue(v *bool) bool
- func CheckFileExists(path string) bool
- func FilePathClean(s *string) *string
- func Float64(v float64) *float64
- func Float64Value(v *float64) float64
- func GetFeed(timeout time.Duration, url string) (*gofeed.Feed, error)
- func GetJSON(timeout time.Duration, url string) (map[string]interface{}, error)
- func GetPrometheus(timeout time.Duration, url string) (map[string]*prom2json.Family, error)
- func GetURL(timeout time.Duration, url string) ([]byte, error)
- func Int(v int) *int
- func IntValue(v *int) int
- func IsStringEmpty(v *string) bool
- func IsStringSliceEmpty(v []string) bool
- func NotStringEmpty(v *string) bool
- func NotStringSliceEmpty(v []string) bool
- func PrettyDump(i interface{}) string
- func PrettyPrint(i interface{}) string
- func PrintVersion()
- func SplitRune(s string, separators ...rune) []string
- func String(v string) *string
- func StringValue(v *string) string
- func WriteFile(filename string, data []byte, perm os.FileMode) error
- type AtomicBool
- type CacheConfig
- type CacheMemoryConfig
- type ConfigRoot
- type HandlerConfig
- type ListenerConfig
- type LogConfig
- type PrometheusAuthBasicConfig
- type PrometheusAuthConfig
- type PrometheusConfig
- type RouteCacheConfig
- type RouteConfig
- type RouteFetchConfig
- type RouteRegexpConfig
- type SpaceConfig
- type TLSACMEConfig
- type TLSACMEFileStorageConfig
- type TLSACMEStorageConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileExists ¶
func FilePathClean ¶
func Float64Value ¶
func GetPrometheus ¶
func IsStringEmpty ¶
func IsStringSliceEmpty ¶
func NotStringEmpty ¶
func NotStringSliceEmpty ¶
func PrettyDump ¶
func PrettyDump(i interface{}) string
func PrettyPrint ¶
func PrettyPrint(i interface{}) string
func PrintVersion ¶
func PrintVersion()
func StringValue ¶
Types ¶
type AtomicBool ¶
type AtomicBool int32
func (*AtomicBool) IsSet ¶
func (b *AtomicBool) IsSet() bool
func (*AtomicBool) SetFalse ¶
func (b *AtomicBool) SetFalse()
func (*AtomicBool) SetFalseIfTrue ¶
func (b *AtomicBool) SetFalseIfTrue() bool
func (*AtomicBool) SetTrue ¶
func (b *AtomicBool) SetTrue()
func (*AtomicBool) SetTrueIfFalse ¶
func (b *AtomicBool) SetTrueIfFalse() bool
type CacheConfig ¶
type CacheConfig struct { Expiration *int `json:"expiration,omitempty"` Memory *CacheMemoryConfig `json:"memory,omitempty"` }
Cache
type CacheMemoryConfig ¶
type CacheMemoryConfig struct {
Cleanup *int `json:"cleanup,omitempty"`
}
structs used by the global configuration block.
type ConfigRoot ¶
type ConfigRoot struct { Log *LogConfig `json:"log,omitempty"` Prometheus *PrometheusConfig `json:"prometheus,omitempty"` Space *SpaceConfig `json:"space,omitempty"` }
structs used by the global configuration block.
type HandlerConfig ¶
type HandlerConfig struct { Name *string `json:"name,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
Handler
type ListenerConfig ¶
type ListenerConfig struct { Address *string `json:"address,omitempty"` Domains []string `json:"domains,omitempty"` TLSConfig *TLSConfig `json:"tls,omitempty"` ProxyProtocol *string `json:"proxyprotocol,omitempty"` }
Listener
type LogConfig ¶
type LogConfig struct { Level *string `json:"level,omitempty"` Format *string `json:"format,omitempty"` To *string `json:"to,omitempty"` SyslogAddress *string `json:"syslog,omitempty"` }
Logger
type PrometheusAuthBasicConfig ¶
type PrometheusAuthBasicConfig struct { Username *string `json:"username,omitempty"` Password *string `json:"password,omitempty"` }
structs used by the global configuration block.
type PrometheusAuthConfig ¶
type PrometheusAuthConfig struct {
AuthBasic *PrometheusAuthBasicConfig `json:"basic,omitempty"`
}
structs used by the global configuration block.
type PrometheusConfig ¶
type PrometheusConfig struct { Address string `json:"address,omitempty"` Endpoint string `json:"endpoint,omitempty"` SummaryMaxAge *int `json:"summaryMaxAge,omitempty"` ChanSize *int `json:"chanSize,omitempty"` Auth *PrometheusAuthConfig `json:"auth,omitempty"` }
Prometheus
type RouteCacheConfig ¶
type RouteCacheConfig struct {
Expiration *int `json:"expiration,omitempty"`
}
structs used by the global configuration block.
type RouteConfig ¶
type RouteConfig struct { File *string `json:"file,omitempty"` Template *string `json:"template,omitempty"` Fetch map[string]*RouteFetchConfig `json:"fetch,omitempty"` Cache *RouteCacheConfig `json:"cache,omitempty"` Cron *string `json:"cron,omitempty"` RegexpCapturedGroups []string }
Route
type RouteFetchConfig ¶
type RouteFetchConfig struct { Type *string `json:"type,omitempty"` URI *string `json:"uri,omitempty"` }
structs used by the global configuration block.
type RouteRegexpConfig ¶
type RouteRegexpConfig struct { RouteConfig *RouteConfig Regexp *regexp.Regexp }
structs used by the global configuration block.
type SpaceConfig ¶
type SpaceConfig struct { Handler *HandlerConfig `json:"handler,omitempty"` Cache *CacheConfig `json:"cache,omitempty"` Listener *ListenerConfig `json:"listener,omitempty"` BaseDir *string `json:"basedir,omitempty"` Routes map[string]*RouteConfig `json:"routes,omitempty"` RoutesRegexp map[string]*RouteRegexpConfig Header *string MutexRoutes sync.RWMutex }
Space
func (*SpaceConfig) GetRoute ¶
func (sc *SpaceConfig) GetRoute(route string) *RouteConfig
type TLSACMEConfig ¶
type TLSACMEConfig struct { DNSProvider *string `json:"dnsprovider,omitempty"` Email *string `json:"email,omitempty"` CA *string `json:"ca,omitempty"` TestCA *string `json:"testca,omitempty"` Storage *TLSACMEStorageConfig `json:"storage,omitempty"` }
structs used by the global configuration block.
type TLSACMEFileStorageConfig ¶
type TLSACMEFileStorageConfig struct {
Path *string `json:"path,omitempty"`
}
structs used by the global configuration block.
type TLSACMEStorageConfig ¶
type TLSACMEStorageConfig struct {
File *TLSACMEFileStorageConfig `json:"file,omitempty"`
}
structs used by the global configuration block.
type TLSConfig ¶
type TLSConfig struct {
ACME *TLSACMEConfig `json:"acme,omitempty"`
}
structs used by the global configuration block.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.