Skip to content

wavy-cat/petpet-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

petpet-go

A web service for generating petpet GIFs based on a Discord user's avatar.

Getting started

  • Docker
docker run ghcr.io/wavy-cat/petpet-go
  • Go
go run github.com/wavy-cat/petpet-go/cmd/app

Environment

Name Default Example Description
ADDRESS :80 127.0.0.1:443 The address (including port) where the server will run.
PORT 80 443 The port where the server will run. Used if ADDRESS is not specified.
SHUTDOWN_TIMEOUT 5000 10 Time in milliseconds for correct server shutdown
BOT_TOKEN null your_token Token from Discord bot. Used for authorization in the Discord API.
CACHE_STORAGE null memory The storage type used for caching images. Possible values: memory (LRU cache in RAM), fs (file system). If not specified, caching is disabled.
CACHE_MEMORY_CAPACITY 100 1984 The memory storage capacity (maximum number of items). This option is used when CACHE_STORAGE is set to memory.
CACHE_FS_PATH ./cache /mnt/s3fs/petpet The path to the directory used for file system-based cache storage.

Usage

GET /ds/{user_id}?delay=5&no-cache=false

Path parameters

Name Type Description
{user_id} Snowflake The Discord user's ID.

Query parameters

Name Default Type Description
delay 5 Unsigned Integer GIF speed.
no-cache false Boolean Whether to disable caching (Cache-Control headers).

PetPet in Other Languages

Releases

No releases published

Packages