Documentation ¶
Index ¶
- func MakeHttpHandler(endpoint endpoint.Endpoint, middleware endpoint.Middleware) http.Handler
- func MakeUploadEndpoint(uploader Uploader) endpoint.Endpoint
- func Middleware(logger log.Logger, env contract.Env) endpoint.Middleware
- func NewClient(uri *url.URL) *httptransport.Client
- type ClientUploader
- type Module
- type Request
- type Response
- type UploadService
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHttpHandler ¶
MakeHttpHandler creates a go kit transport in http for *UploadService.
func MakeUploadEndpoint ¶
MakeUploadEndpoint creates a Upload endpoint
func Middleware ¶
Middleware adds logging and error handling to the endpoint.
Types ¶
type ClientUploader ¶
type ClientUploader struct {
// contains filtered or unexported fields
}
ClientUploader implements the Uploader interface. It uploads files to the remote server.
func NewClientUploader ¶
func NewClientUploader(client *httptransport.Client) *ClientUploader
NewClientUploader creates a *ClientUploader
func NewClientUploaderFromUrl ¶
func NewClientUploaderFromUrl(uri *url.URL) *ClientUploader
NewClientUploaderFromUrl creates a *ClientUploader from the url of the remote *UploadService
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is a s3 module that adds a file upload path. It uses the default configuration.
func (Module) ProvideHTTP ¶
ProvideHttp adds a "/upload" path to router
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request models a go kit request in UploadEndpoint
type Response ¶
type Response struct { Data struct { Url string `json:"url"` } `json:"data"` Code int `json:"code"` Message string `json:"message,omitempty"` }
Response models a go kit Response in UploadEndpoint
type UploadService ¶
An UploadService is a go kit service to handle file upload