Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chubin/wttr.in
/ types & classes
Types & classes
112 in github.com/chubin/wttr.in
⨍
Functions
405
◇
Types & classes
112
↓ 2 callers
TypeAlias
WeatherRaw
WeatherRaw is a type alias for raw weather data returned by a weather backend. It is typically JSON or another serialized format. The actual structur
internal/domain/models.go:96
Struct
Address
Address information.
internal/ip/ip.go:24
Struct
Astronomy
Astronomy contains sunrise, sunset, moon phase and related information for a day.
internal/domain/weather.go:72
Struct
Bundle
Bundle holds all translation data and implements Localizer.
internal/translate/bundle.go:21
Struct
Cache
Cache combines in-memory LRU, SQLite read pool, and write support.
internal/location/cache.go:59
Struct
Cache
Cache provides access to the IP Geodata cache.
internal/ip/ip.go:47
Struct
CacheEntry
CacheEntry represents a cached response entry. It is designed to be immutable once created and stored in any cache implementation. The entry includes
internal/domain/models.go:61
Struct
CacheLayer
CacheLayer defines the settings for a single cache layer. Different layers can use completely different backends and TTLs.
internal/cache/config.go:29
Struct
CachedWeatherClient
CachedWeatherClient wraps the original WeatherClient with disk/memory caching and request coalescing.
internal/weather/weatherer_wwo_cached.go:31
Interface
Cacher
Cacher defines the contract for all cache implementations used by the request processor. Implementations may use LRU, Redis, in-memory maps, etc.
internal/weather/cache.go:15
Struct
Cadre
internal/types/types.go:12
Struct
ClientData
ClientData holds information about the client making the request.
internal/domain/models.go:26
FuncType
ConditionByNameFunc
ConditionByNameFunc returns a translated condition by its English name.
internal/localization/localizer.go:36
FuncType
ConditionFunc
ConditionFunc returns a translated weather condition by numeric code.
internal/localization/localizer.go:33
Struct
Config
Config holds configuration for all cache layers used by the service. We have two (and potentially more) semantically different caches: 1. Responses
internal/cache/config.go:12
Struct
Config
internal/location/config.go:3
Struct
Config
Config holds configuration for all renderers that need external config.
internal/renderer/config.go:6
Struct
Config
internal/logging/config.go:3
Struct
Config
internal/uplink/config.go:3
Struct
Config
Config holds the server configuration loaded from YAML.
internal/server/config.go:6
Struct
Config
internal/ip/config.go:3
Struct
Config
Config is the root configuration structure for the entire service.
internal/config/config.go:20
Struct
Config
internal/weather/config.go:3
Struct
CurrentCondition
CurrentCondition represents the current observed weather conditions.
internal/domain/weather.go:12
Struct
DiskCacher
DiskCacher is a filesystem-backed implementation of Cacher. Completed entries are persisted to disk as JSON files. In-progress state is kept in-memory
internal/cache/disk.go:20
Struct
EmojiProfile
=================================================================== Emoji Profiles & Width Management (new centralized system) =======================
internal/renderer/oneline/constants.go:64
Struct
FormatOutput
FormatOutput represents the final output ready to be sent to the client. It includes both the content and the appropriate HTTP Content-Type header.
internal/domain/models.go:109
Struct
FormatSpecifier
FormatSpecifier represents a single format specifier in the one-line output mode.
internal/defs/defs.go:71
Struct
FormatSpecifier
internal/generate/options.go:163
Interface
Formatter
Formatter interface for converting rendered output into the final format.
internal/weather/weather.go:44
Struct
GeneratedField
GeneratedField holds template data for one field
internal/generate/options.go:171
Struct
HTMLFormatter
HTMLFormatter converts ANSI weather output into a full HTML page using buildkite/terminal-to-html.
internal/formatter/html.go:15
Struct
Hourly
Hourly represents hourly weather forecast data.
internal/domain/weather.go:82
Struct
IPData
IPData holds geolocation information derived from the client's IP address.
internal/domain/models.go:32
Interface
IPLocator
IPLocator interface to fetch IP-related data.
internal/weather/weather.go:29
Struct
IPLocatorGeoIP2
IPLocatorGeoIP2 is an implementation of IPLocator using MaxMind GeoIP2 / GeoLite2 City database.
internal/ip/geoip2.go:14
Struct
J1Renderer
internal/renderer/renderer_j1.go:10
Struct
J2Renderer
J2Renderer is a renderer that produces a minified JSON output of weather data with hourly entries removed for a more compact representation.
internal/renderer/renderer_j2.go:12
Struct
JSONFormatter
internal/formatter/formatter.go:15
Struct
L10n
L10n is a convenient wrapper that provides pre-bound localization functions for a specific language from Options. Use `l10n` as the variable name to
internal/localization/localizer.go:42
Struct
LRUCacher
LRUCacher is a Cacher implementation backed by an LRU cache with support for in-progress markers to prevent thundering herd problems.
internal/cache/lru.go:24
FuncType
Localize
func(text string) string
internal/renderer/v2/renderer.go:25
FuncType
LocalizeFunc
LocalizeFunc is a language-bound text localization function.
internal/localization/localizer.go:30
Interface
Localizer
Localizer provides localized strings for a specific language.
internal/localization/localizer.go:13
Struct
Location
Location represents a cached geocoding result.
internal/location/cache.go:40
Struct
Location
Location represents a geographic location for which weather data is requested. It can be populated either from user input (city name, coordinates) or
internal/domain/models.go:46
Interface
Locator
Locator interface to fetch location-related data.
internal/weather/weather.go:34
Struct
LogSuppressor
LogSuppressor provides io.Writer interface for logging with lines suppression. For usage with log.Logger.
internal/logging/suppress.go:11
Struct
NearestArea
NearestArea represents information about the nearest location/area.
internal/domain/weather.go:39
Struct
NoOpCacher
NoOpCacher is a no-operation implementation of Cacher. Used when a cache layer is disabled in configuration.
internal/cache/noop.go:12
Struct
Nominatim
internal/location/nominatim.go:14
Struct
OnelineRenderer
OnelineRenderer is responsible for rendering weather data in the compact one-line text format (?format=... or preconfigured IDs). It implements the w
internal/renderer/oneline/oneline.go:27
Struct
OptionConfig
OptionConfig mirrors the YAML structure (adjusted for generation needs)
internal/generate/options.go:140
Struct
Options
Options represents parsed and validated wttr.in query options.
internal/options/options.go:11
Struct
OptionsConfig
OptionsConfig is the root of the YAML
internal/generate/options.go:158
Struct
PNGFormatter
PNGFormatter converts ANSI-rendered weather output into a PNG image.
internal/formatter/png.go:11
Struct
PNGOptions
PNGOptions contains all options relevant to ANSI → PNG rendering.
internal/formatter/ansitopng/options.go:12
Struct
PageRenderer
PageRenderer serves static embedded text pages (help, about, ...). It now fully supports multilanguage via the Localizer.
internal/renderer/renderer_page.go:14
Struct
ParsedCurrentCondition
ParsedCurrentCondition is a normalized, ready-to-use view of current weather extracted from the WorldWeatherOnline-style JSON response
internal/renderer/oneline/data_parse.go:14
Struct
PreconfiguredFormat
PreconfiguredFormat represents one named preset for ?format=...
internal/defs/defs.go:89
Struct
PrometheusRenderer
internal/renderer/renderer_p1.go:53
Interface
Provider
internal/location/search.go:5
Struct
Query
Query represents the complete context of a single weather request. It aggregates all information needed to process and respond to a request: client d
internal/domain/models.go:119
Struct
QueryOption
QueryOption defines a single query option for wttr.in, such as `lang` or `format`.
internal/defs/defs.go:26
Interface
QueryParser
QueryParser parses wttr.in / curl wttr.in style HTTP query strings and returns the result as a strongly-typed *options.Options struct.
internal/weather/weather.go:50
Struct
Range
Range defines a numeric range for integer-type query options.
internal/defs/defs.go:62
Struct
RenderContext
RenderContext holds everything a single placeholder might need
internal/renderer/oneline/oneline.go:75
FuncType
RenderFunc
────────────────────────────────────────────────────────────────────────────── Unified render function signature ─────────────────────────────────────
internal/renderer/oneline/oneline.go:21
Struct
RenderOutput
RenderOutput is the intermediate result produced by a Renderer. It typically contains ANSI-colored or plain text output intended for terminal or furt
internal/domain/models.go:102
Interface
Renderer
Renderer interface for rendering weather data into a visual representation.
internal/weather/weather.go:39
Struct
Renderer
Renderer implements weather.Renderer by executing an external subprocess.
internal/renderer/subprocess/subprocess.go:50
Struct
Request
Request represents the parameters used for the weather query.
internal/domain/weather.go:50
Interface
RequestLogger
internal/weather/weather.go:71
Struct
RequestLogger
RequestLogger logs incoming HTTP requests with aggregation and periodic flushing.
internal/logging/logging.go:14
Struct
Searcher
internal/location/search.go:10
Struct
SubprocessRoute
SubprocessRoute defines a single routing rule for the subprocess renderer.
internal/renderer/subprocess/subprocess.go:26
Struct
TLSCertConfig
TLSCertConfig defines one certificate + its matching domain(s).
internal/server/config.go:22
Struct
TerminalFormatter
Formatter Implementations
internal/formatter/formatter.go:6
Struct
TextFormatter
internal/formatter/formatter.go:24
Struct
TimeTracker
TimeTracker holds timing information for each step in the pipeline.
internal/weather/weather.go:80
Interface
UplinkProcessor
internal/weather/weather.go:75
Struct
UplinkProcessor
UplinkProcessor handles incoming requests.
internal/uplink/uplink.go:20
Struct
V1Renderer
V1Renderer renders weather in the classic wttr.in v1 style.
internal/renderer/v1/renderer.go:20
Struct
V2Renderer
V2Renderer implements the rich panel view (temperature diagram, rain sparkline, weather emojis, colored wind, astronomical data, frame, etc.)
internal/renderer/v2/renderer.go:18
Struct
ValueItem
ValueItem is a common wrapper used for most description/icon fields (single object with "value" key).
internal/domain/weather.go:129
Struct
WWOConfig
WWOConfig holds configuration for the weather API (e.g. World Weather Online)
internal/weather/weatherer_wwo.go:15
Struct
Weather
WeatherData represents the top-level structure of the weather API response.
internal/domain/weather.go:4
Struct
WeatherClient
WeatherClient fetches weather data with controlled concurrency and connection reuse.
internal/weather/weatherer_wwo.go:22
Struct
WeatherDay
WeatherDay represents daily weather forecast data (one entry per date).
internal/domain/weather.go:56
Struct
WeatherService
WeatherService struct holds the components necessary for processing a query.
internal/weather/weather.go:100
Interface
Weatherer
Weatherer interface to fetch weather data based on location and language.
internal/weather/weather.go:24
Struct
WttrInOptions
WttrInOptions represents the configuration for wttr.in query options and format specifiers.
internal/defs/defs.go:19
Struct
astro
internal/renderer/v1/types.go:18
Struct
cacheLocator
cacheLocator implements Locator using wttr.in's Cache + Resolve logic
internal/weather/locator_adapter.go:19
TypeAlias
certMap
certMap maps domain name -> certificate
internal/server/server.go:26
Struct
cond
internal/renderer/v1/types.go:3
Struct
field
internal/renderer/v2/block_textualinformation.go:77
Interface
headerWriter
internal/server/server.go:121
Struct
ipCacheLocator
internal/ip/iplocator_adapter.go:10
Struct
languageData
languageData holds preloaded translation data for one language.
internal/translate/bundle.go:14
next →
1–100 of 112, ranked by callers