Documentation
¶
Index ¶
- type BasicAuthVerifier
- type JSONError
- type Request
- type Server
- func (s *Server) CompressAll(now time.Time, stale time.Duration) ([]string, error)
- func (s *Server) GetFile(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListFiles(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListMonths(w http.ResponseWriter, r *http.Request)
- func (s *Server) UploadLog(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthVerifier ¶
type JSONError ¶
type JSONError struct {
Error string `json:"error"`
Code string `json:"code"`
Detail string `json:"detail"`
}
JSONError represents an API error response
type Request ¶
type Request struct {
Date string `json:"date"`
Name string `json:"name"`
Path string `json:"path"`
}
Request represents the POST /api/logs JSON body
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds application state
func New ¶
func New(auth BasicAuthVerifier, storage string, compress string) (*Server, error)
New initializes the server
func (*Server) CompressAll ¶
func (*Server) ListMonths ¶
func (s *Server) ListMonths(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.