MCPcopy Create free account

hub / github.com/TimothyYe/bing-wallpaper / functions

Functions18 in github.com/TimothyYe/bing-wallpaper

↓ 2 callersFunctionGet
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 callersFunctioncacheGet
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 callersFunctioncacheSet
(key string, resp Response, err error, ttl time.Duration)
wallpaper.go:101
↓ 2 callersFunctiongetRandomIndex
()
handler/wallpaper.go:38
↓ 2 callersFunctiongetRandomMarket
()
handler/wallpaper.go:42
↓ 1 callersFunctionCORSMiddleware
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 callersFunctionfetchFromBing
(ctx context.Context, index uint, market, resolution string)
wallpaper.go:161
↓ 1 callersFunctionresolvePort
resolvePort returns the listen port using the precedence flag > PORT env > default.
cmd/run/run.go:56
FunctionRootHandler
RootHandler handles default API requests
handler/wallpaper.go:47
FunctionTestGet
(t *testing.T)
wallpaper_test.go:10
FunctionTestGetUnsupportedResolution
(t *testing.T)
wallpaper_test.go:17
FunctionTestRandomIndex
(t *testing.T)
handler/wallpaper_test.go:9
FunctionTestRandomMarket
(t *testing.T)
handler/wallpaper_test.go:16
Functioninit
()
wallpaper.go:61
Functioninit
()
cmd/run/run.go:32
Functioninit
()
bw/main.go:17
Functionmain
()
bw/main.go:31
Functionrun
(cmd *cobra.Command, args []string)
cmd/run/run.go:69