image_infrastructure_service

package
v0.0.0-...-67f085a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageService

type ImageService interface {
	Upload(ctx context.Context, file *multipart.FileHeader) (url string, err error)
	Download(ctx context.Context, url string) (downloadUrl string, err error)
}

func NewLocalImageUploadService

func NewLocalImageUploadService(location string, prefixURL string) ImageService

type LocalImageService

type LocalImageService struct {
	Location  string
	PrefixURL string
}

func (*LocalImageService) Download

func (s *LocalImageService) Download(ctx context.Context, url string) (string, error)

func (*LocalImageService) Upload

func (s *LocalImageService) Upload(ctx context.Context, file *multipart.FileHeader) (url string, err error)

Jump to

Keyboard shortcuts

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