Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TimothyYe/bing-wallpaper
/ functions
Functions
18 in github.com/TimothyYe/bing-wallpaper
⨍
Functions
18
◇
Types & classes
4
↓ 2 callers
Function
Get
Get bing.com wallpaper from bing api. The provided context is used for the upstream HTTP call so a client disconnect cancels the in-flight request to
wallpaper.go:110
↓ 2 callers
Function
cacheGet
cacheGet returns a value copy so callers can mutate without affecting the cached entry or other concurrent callers. If the entry is a negative-cache e
wallpaper.go:91
↓ 2 callers
Function
cacheSet
(key string, resp Response, err error, ttl time.Duration)
wallpaper.go:101
↓ 2 callers
Function
getRandomIndex
()
handler/wallpaper.go:38
↓ 2 callers
Function
getRandomMarket
()
handler/wallpaper.go:42
↓ 1 callers
Function
CORSMiddleware
CORSMiddleware permits cross-origin reads from any browser. The endpoint is unauthenticated, so Allow-Credentials is intentionally omitted — it is inc
cmd/run/run.go:40
↓ 1 callers
Function
fetchFromBing
(ctx context.Context, index uint, market, resolution string)
wallpaper.go:161
↓ 1 callers
Function
resolvePort
resolvePort returns the listen port using the precedence flag > PORT env > default.
cmd/run/run.go:56
Function
RootHandler
RootHandler handles default API requests
handler/wallpaper.go:47
Function
TestGet
(t *testing.T)
wallpaper_test.go:10
Function
TestGetUnsupportedResolution
(t *testing.T)
wallpaper_test.go:17
Function
TestRandomIndex
(t *testing.T)
handler/wallpaper_test.go:9
Function
TestRandomMarket
(t *testing.T)
handler/wallpaper_test.go:16
Function
init
()
wallpaper.go:61
Function
init
()
cmd/run/run.go:32
Function
init
()
bw/main.go:17
Function
main
()
bw/main.go:31
Function
run
(cmd *cobra.Command, args []string)
cmd/run/run.go:69