Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
func StartServer(imageManager ImageService) error
Types ¶
type Config ¶
type Config struct { RedisURL string `env:"redis_server"` RedisDatabase int `env:"redis_db"` RedisPort int `env:"redis_port"` RedisPassword string `env:"redis_password"` RedditUsername string `env:"reddit_username"` RedditPassword string `env:"reddit_password"` RedditAppID string `env:"reddit_client_id"` RedditSecret string `env:"reddit_client_secret"` }
type ImageEntry ¶
type ImageEntry struct {
// contains filtered or unexported fields
}
type ImageService ¶
type PlaceItGoHandler ¶
type PlaceItGoHandler struct {
// contains filtered or unexported fields
}
type RedditService ¶
type RedditService struct {
// contains filtered or unexported fields
}
func NewRedditService ¶
func NewRedditService(config *Config, cache *RedisCache) (*RedditService, error)
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(cfg *Config) (*RedisCache, error)
func (RedisCache) GetImage ¶
func (r RedisCache) GetImage(width, height int, animal string) (ImageEntry, error)
Click to show internal directories.
Click to hide internal directories.