Documentation
¶
Index ¶
- Variables
- func BuildQuery(v url.Values) string
- func ExampleIndex_indexing()
- func ExampleNew()
- func HMAC(h *hmac.HMAC, path string, query url.Values) (string, error)
- type DeploymentInfo
- type Error
- type Handler
- func (s *Handler) AdminHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ApiContentsHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ApproveContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) BuildContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ConfigHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ContentsHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) DeleteContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) DeleteHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) DeleteUploadHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) DeployContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) DeployProgressHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) EditHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) EditUploadHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) HashHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ImageHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ImageRandomHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ImageResizeHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) ImagesHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) InitHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) LoginHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) LogoutHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) PreviewContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) PreviewContentHandlerLocal(res http.ResponseWriter, req *http.Request)
- func (s *Handler) SearchContentHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) SearchContentHandler2(res http.ResponseWriter, req *http.Request)
- func (s *Handler) SearchHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) Shutdown()
- func (s *Handler) StoreFiles(req *http.Request) (map[string]string, error)
- func (s *Handler) UploadContentsHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) UploadSearchHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) UserConfigHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) UserLoginHandler(res http.ResponseWriter, req *http.Request)
- func (s *Handler) UserRegisterHandler(res http.ResponseWriter, req *http.Request)
- type Params
- type Progress
- type ProgressEvent
- type Response
- type ResponseErrView
- type SSEWriter
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidSize = fmt.Errorf("invalid size") ErrInvalidFileExtension = fmt.Errorf("invalid file extension") ErrInvalidBlurAmount = fmt.Errorf("invalid blur amount") )
Errors
Functions ¶
func BuildQuery ¶ added in v0.1.27
BuildQuery builds a query parameter string for the given values It differs from the stdlib url.Values.Encode in that it encodes query parameters with an empty value as "?key" instead of "?key="
func ExampleIndex_indexing ¶
func ExampleIndex_indexing()
func ExampleNew ¶
func ExampleNew()
Types ¶
type DeploymentInfo ¶ added in v0.1.24
type DeploymentInfo struct { Username string Password string Host string Port string LocalPath string RemotePath string Status string }
DeploymentInfo stores information about an ongoing deployment
type Error ¶ added in v0.1.27
Error is the message and http status code to return
func BadRequest ¶ added in v0.1.27
BadRequest is a convenience function for returning a bad request error
func InternalServerError ¶ added in v0.1.27
func InternalServerError() *Error
InternalServerError is a convenience function for returning an internal server error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) AdminHandler ¶
func (s *Handler) AdminHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ApiContentsHandler ¶
func (s *Handler) ApiContentsHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ApproveContentHandler ¶
func (s *Handler) ApproveContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) BuildContentHandler ¶
func (s *Handler) BuildContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ConfigHandler ¶
func (s *Handler) ConfigHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ContentHandler ¶
func (s *Handler) ContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ContentsHandler ¶
func (s *Handler) ContentsHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) DeleteContentHandler ¶
func (s *Handler) DeleteContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) DeleteHandler ¶
func (s *Handler) DeleteHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) DeleteUploadHandler ¶
func (s *Handler) DeleteUploadHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) DeployContentHandler ¶
func (s *Handler) DeployContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) DeployProgressHandler ¶ added in v0.1.24
func (s *Handler) DeployProgressHandler(res http.ResponseWriter, req *http.Request)
DeployProgressHandler handles SSE connection for deployment progress
func (*Handler) EditHandler ¶
func (s *Handler) EditHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) EditUploadHandler ¶
func (s *Handler) EditUploadHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) HashHandler ¶
func (s *Handler) HashHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ImageHandler ¶ added in v0.1.27
func (s *Handler) ImageHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ImageRandomHandler ¶ added in v0.1.27
func (s *Handler) ImageRandomHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ImageResizeHandler ¶ added in v0.1.27
func (s *Handler) ImageResizeHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) ImagesHandler ¶ added in v0.1.27
func (s *Handler) ImagesHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) InitHandler ¶
func (s *Handler) InitHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) LoginHandler ¶
func (s *Handler) LoginHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) LogoutHandler ¶
func (s *Handler) LogoutHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) PreviewContentHandler ¶
func (s *Handler) PreviewContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) PreviewContentHandlerLocal ¶
func (s *Handler) PreviewContentHandlerLocal(res http.ResponseWriter, req *http.Request)
func (*Handler) SearchContentHandler ¶
func (s *Handler) SearchContentHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) SearchContentHandler2 ¶
func (s *Handler) SearchContentHandler2(res http.ResponseWriter, req *http.Request)
func (*Handler) SearchHandler ¶
func (s *Handler) SearchHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) Shutdown ¶ added in v0.1.44
func (s *Handler) Shutdown()
Shutdown gracefully shuts down all components in the handler
func (*Handler) StoreFiles ¶
StoreFiles stores file uploads at paths like /YYYY/MM/filename.ext
func (*Handler) UploadContentsHandler ¶
func (s *Handler) UploadContentsHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) UploadSearchHandler ¶
func (s *Handler) UploadSearchHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) UserConfigHandler ¶
func (s *Handler) UserConfigHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) UserLoginHandler ¶
func (s *Handler) UserLoginHandler(res http.ResponseWriter, req *http.Request)
func (*Handler) UserRegisterHandler ¶
func (s *Handler) UserRegisterHandler(res http.ResponseWriter, req *http.Request)
type Params ¶ added in v0.1.27
type Params struct { Width int Height int Blur bool BlurAmount int Grayscale bool Extension string }
Params contains all the parameters for a request
type Progress ¶ added in v0.1.24
type Progress struct { Current int64 `json:"current"` Total int64 `json:"total"` Status string `json:"status"` }
Progress represents the current progress of an operation
type ProgressEvent ¶ added in v0.1.24
ProgressEvent represents a SSE event for progress updates
func (*ProgressEvent) ToJSON ¶ added in v0.1.24
func (pe *ProgressEvent) ToJSON() string
ToJSON converts the progress event to JSON string
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
func NewResponse(errView ResponseErrView) *Response
type ResponseErrView ¶
type SSEWriter ¶ added in v0.1.24
type SSEWriter struct {
// contains filtered or unexported fields
}
SSEWriter wraps a http.ResponseWriter to provide SSE functionality
func NewSSEWriter ¶ added in v0.1.24
func NewSSEWriter(w http.ResponseWriter) *SSEWriter
NewSSEWriter creates a new SSE writer
func (*SSEWriter) SendEvent ¶ added in v0.1.24
func (sw *SSEWriter) SendEvent(event *ProgressEvent)
SendEvent sends an SSE event
Source Files
¶
- error.go
- handleadmin.go
- handlebuild.go
- handlecontent.go
- handlecontents.go
- handledeploy.go
- handleedit.go
- handlehash.go
- handleimage.go
- handlenetlify.go
- handlepreview.go
- handleprivate.go
- handler.go
- handlesearch.go
- handleupload.go
- handleuser.go
- hide.go
- log.go
- omit.go
- push.go
- query.go
- response.go
- upload.go