controller

package
v0.0.0-...-7e7cc72 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPController

func NewHTTPController(maxFileSize int, fileInteractor interactor.FileInteractor, logger repository.Logger, base64Repository repository.Base64Repository) *httpController

Types

type HTTPContext

type HTTPContext interface {
	Context() context.Context

	GetReqId() string
	GetFormFile(size int) ([]byte, string, int, error)
	GetQuery(key string) string

	JSON(httpCode int, value interface{}) error
	File(httpCode int, data []byte, fileName string) error
}

type HTTPController

type HTTPController interface {
	Upload(httpCtx HTTPContext) error
	Download(httpCtx HTTPContext) error
}

Jump to

Keyboard shortcuts

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