app

package
v0.0.0-...-1c7b42c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp() (*App, error)

func (*App) GetConfig

func (app *App) GetConfig() *Config

func (*App) GetDownloadAndCropService

func (app *App) GetDownloadAndCropService() *DownloadAndCropImageUseCase

type Config

type Config struct {
	Release      bool
	Port         int
	FetchTimeout int
}

func ConfitaConfigLoader

func ConfitaConfigLoader() (*Config, error)

type ConfitaConfig

type ConfitaConfig struct {
	Port         int `config:"jackal_port"`
	FetchTimeout int `config:"jackal_fetchtimeout"`
}

func (*ConfitaConfig) ToConfig

func (cfg *ConfitaConfig) ToConfig() *Config

type DownloadAndCropImageUseCase

type DownloadAndCropImageUseCase struct {
	// contains filtered or unexported fields
}

func NewDownloadAndCropImageUseCase

func NewDownloadAndCropImageUseCase(imageProcessingService interfaces.IImageProcessingService, fetchService interfaces.IFetchService) *DownloadAndCropImageUseCase

func (*DownloadAndCropImageUseCase) Execute

func (u *DownloadAndCropImageUseCase) Execute(imageUrl string, width int, height int, cropType interfaces.CropType) ([]byte, string, error)

type FetchService

type FetchService struct {
	// contains filtered or unexported fields
}

func NewFetchService

func NewFetchService(timeoutMilliseconds int) *FetchService

func (*FetchService) GetBodyFromUrl

func (service *FetchService) GetBodyFromUrl(url string) ([]byte, error)

type ImageProcessingService

type ImageProcessingService struct{}

func NewImageProcessingService

func NewImageProcessingService() *ImageProcessingService

func (*ImageProcessingService) CropCentered

func (service *ImageProcessingService) CropCentered(content []byte, width int, height int, cropType interfaces.CropType) ([]byte, string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL