Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DMarby/picsum-photos
/ functions
Functions
185 in github.com/DMarby/picsum-photos
⨍
Functions
185
◇
Types & classes
37
↓ 1 callers
Function
loadPage
(page)
internal/web/embed/assets/js/images.js:33
↓ 1 callers
Function
loadPageFromhHash
()
internal/web/embed/assets/js/images.js:10
↓ 1 callers
Function
newHandler
(healthChecker *health.Checker)
internal/handler/health.go:15
↓ 1 callers
Function
parseLinkHeader
(header)
internal/web/embed/assets/js/images.js:89
↓ 1 callers
Function
readFile
(path string)
internal/imageapi/api_test.go:258
↓ 1 callers
Function
resizeImage
resizeImage loads an image from a byte buffer, resizes it and returns an Image object for further use Note that it does not use the processor worker q
internal/image/vips/image.go:12
↓ 1 callers
Method
saveToJpegBuffer
saveToJpegBuffer returns the image as a JPEG byte buffer
internal/image/vips/image.go:54
↓ 1 callers
Method
saveToWebPBuffer
saveToWebPBuffer returns the image as a WebP byte buffer
internal/image/vips/image.go:65
↓ 1 callers
Method
setUserComment
setUserComment sets the exif usercomment
internal/image/vips/image.go:49
↓ 1 callers
Function
taskProcessor
(cache *image.Cache, tracer *tracing.Tracer)
internal/image/vips/vips.go:80
↓ 1 callers
Function
validateImageParams
(p *params.Params)
internal/api/params.go:21
↓ 1 callers
Method
worker
()
internal/queue/queue.go:54
Function
BenchmarkVips
(b *testing.B)
internal/image/vips/vips_test.go:67
Method
Get
(ctx context.Context, key string)
internal/cache/cache.go:13
Method
Get
Get returns an object from the cache if it exists
internal/cache/memory/memory.go:24
Method
Get
Get returns an object from the cache if it exists
internal/cache/mock/mock.go:14
Method
Get
(ctx context.Context, id string)
internal/database/database.go:19
Method
Get
Get returns the image data for an image id
internal/database/file/file.go:67
Method
Get
Get returns the image data for an image id
internal/database/mock/mock.go:15
Method
Get
Get returns the image data for an image id
internal/storage/file/file.go:30
Method
Get
Get returns the image data for an image id
internal/storage/mock/mock.go:12
Method
GetRandom
GetRandom returns a random image ID
internal/database/file/file.go:77
Method
GetRandom
GetRandom returns a random image
internal/database/mock/mock.go:20
Method
GetRandomWithSeed
GetRandomWithSeed returns a random image ID based on the given seed
internal/database/file/file.go:85
Method
GetRandomWithSeed
GetRandomWithSeed returns a random image based on the given seed
internal/database/mock/mock.go:25
Method
List
List returns a list of all the images with an offset/limit
internal/database/file/file.go:98
Method
List
List returns a list of all the images with an offset/limit
internal/database/mock/mock.go:35
Method
ListAll
ListAll returns a list of all the images
internal/database/file/file.go:93
Method
ListAll
ListAll returns a list of all the images
internal/database/mock/mock.go:30
Method
Match
Match returns the mux route name of a given request, falling back to the path template if not set
internal/handler/route_matcher.go:20
Function
New
(ctx context.Context, log *logger.Logger, serviceName string)
internal/tracing/tracing.go:32
Function
NewAPI
NewAPI creates a new API instance with initialized caches
internal/imageapi/api.go:37
Function
PrintDebugInfo
PrintDebugInfo prints libvips debug info to stdout
internal/vips/vips.go:82
Method
ProcessImage
ProcessImage loads an image from a byte buffer, processes it, and returns a buffer containing the processed image
internal/image/vips/vips.go:55
Method
ProcessImage
ProcessImage returns an error instead of process an image
internal/image/mock/mock.go:15
Method
Set
Set adds an object to the cache
internal/cache/memory/memory.go:37
Method
Set
Set adds an object to the cache
internal/cache/mock/mock.go:27
Method
Shutdown
Shutdown shuts down the cache
internal/cache/memory/memory.go:46
Method
Shutdown
Shutdown shuts down the cache
internal/cache/mock/mock.go:36
Method
Shutdown
Shutdown shuts down the image processor and deinitialises vips
internal/image/vips/vips.go:150
Method
Shutdown
(ctx context.Context)
internal/tracing/tracing.go:62
Function
TestAPI
(t *testing.T)
internal/imageapi/api_test.go:34
Function
TestAPI
(t *testing.T)
internal/api/api_test.go:31
Function
TestAuto
(t *testing.T)
internal/cache/cache_test.go:23
Function
TestFile
(t *testing.T)
internal/database/file/file_test.go:29
Function
TestFile
(t *testing.T)
internal/storage/file/file_test.go:14
Function
TestFixtures
Utility function for regenerating the fixtures
internal/vips/vips_test.go:168
Function
TestFixtures
Utility function for regenerating the fixtures
internal/image/vips/vips_test.go:85
Function
TestFixtures
Utility function for regenerating the fixtures
internal/imageapi/api_test.go:194
Function
TestHMAC
(t *testing.T)
internal/hmac/hmac_test.go:12
Function
TestHandler
(t *testing.T)
internal/handler/handler_test.go:13
Function
TestHealth
(t *testing.T)
internal/health/health_test.go:22
Function
TestInvalidJson
(t *testing.T)
internal/database/file/file_test.go:115
Function
TestMemory
(t *testing.T)
internal/cache/memory/memory_test.go:11
Function
TestMissingMetadata
(t *testing.T)
internal/database/file/file_test.go:108
Function
TestProcess
(t *testing.T)
internal/queue/queue_test.go:18
Function
TestRecovery
(t *testing.T)
internal/handler/recovery_test.go:13
Function
TestShutdown
(t *testing.T)
internal/queue/queue_test.go:36
Function
TestTaskWithCancelledContext
(t *testing.T)
internal/queue/queue_test.go:62
Function
TestTaskWithError
(t *testing.T)
internal/queue/queue_test.go:49
Function
TestVips
(t *testing.T)
internal/vips/vips_test.go:17
Function
TestVips
(t *testing.T)
internal/image/vips/vips_test.go:26
Function
VarzHandler
(w http.ResponseWriter, r *http.Request)
internal/handler/metrics.go:47
Function
badRequestHandler
(rw http.ResponseWriter, req *http.Request)
internal/handler/handler_test.go:76
Method
deprecatedImageHandler
Handles deprecated image routes
internal/api/deprecated.go:68
Method
deprecatedListHandler
(w http.ResponseWriter, r *http.Request)
internal/api/deprecated.go:29
Method
deprecatedParams
deprecatedParams is a handler to handle deprecated query params for regular routes
internal/api/deprecated.go:100
Function
errorHandler
(rw http.ResponseWriter, req *http.Request)
internal/handler/handler_test.go:72
Function
handleNavigationButton
(event)
internal/web/embed/assets/js/images.js:20
Method
imageHandler
(w http.ResponseWriter, r *http.Request)
internal/imageapi/image.go:26
Method
imageRedirectHandler
(w http.ResponseWriter, r *http.Request)
internal/api/image.go:24
Method
infoHandler
Returns info about an image
internal/api/list.go:30
Method
infoSeedHandler
Returns info about an image based on the seed
internal/api/list.go:54
Function
init
()
internal/handler/metrics.go:43
Method
listHandler
Paginated list, with `page` and `limit` query parameters
internal/api/list.go:79
Function
log_callback
log_callback catches logs from libvips export log_callback
internal/vips/vips.go:72
Function
main
()
cmd/image-manifest/main.go:23
Function
main
()
cmd/picsum-photos/main.go:44
Function
main
()
cmd/image-service/main.go:48
Method
notFoundHandler
(w http.ResponseWriter, r *http.Request)
internal/imageapi/api.go:105
Method
notFoundHandler
(w http.ResponseWriter, r *http.Request)
internal/api/api.go:122
Function
panicHandler
(rw http.ResponseWriter, req *http.Request)
internal/handler/recovery_test.go:31
Method
randomImageRedirectHandler
(w http.ResponseWriter, r *http.Request)
internal/api/image.go:43
Function
readFile
(path string)
internal/api/api_test.go:465
Method
seedImageRedirectHandler
(w http.ResponseWriter, r *http.Request)
internal/api/image.go:61
← previous
101–185 of 185, ranked by callers