Documentation ¶
Index ¶
- Constants
- type FileEntry
- type LinkCache
- type Server
- func (s *Server) HandleCreateLink(w http.ResponseWriter, req *http.Request)
- func (s *Server) HandleDownloadLink(w http.ResponseWriter, req *http.Request)
- func (s *Server) HandleGetDownload(w http.ResponseWriter, req *http.Request)
- func (s *Server) HandlePostDownload(w http.ResponseWriter, req *http.Request)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type ZipDescriptor
- type ZipStream
Constants ¶
View Source
const UrlPrefixEnvVar = "ZS_URL_PREFIX"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkCache ¶
type LinkCache struct {
// contains filtered or unexported fields
}
func NewLinkCache ¶
func (*LinkCache) Get ¶
func (c *LinkCache) Get(linkKey string) *ZipDescriptor
func (*LinkCache) Set ¶
func (c *LinkCache) Set(linkKey string, descriptor *ZipDescriptor)
type Server ¶
type Server struct { Compression bool ListfileUrlPrefix string // contains filtered or unexported fields }
func (*Server) HandleCreateLink ¶
func (s *Server) HandleCreateLink(w http.ResponseWriter, req *http.Request)
func (*Server) HandleDownloadLink ¶
func (s *Server) HandleDownloadLink(w http.ResponseWriter, req *http.Request)
func (*Server) HandleGetDownload ¶
func (s *Server) HandleGetDownload(w http.ResponseWriter, req *http.Request)
func (*Server) HandlePostDownload ¶
func (s *Server) HandlePostDownload(w http.ResponseWriter, req *http.Request)
type ZipDescriptor ¶
type ZipDescriptor struct {
// contains filtered or unexported fields
}
func NewZipDescriptor ¶
func NewZipDescriptor() *ZipDescriptor
func UnmarshalJsonZipDescriptor ¶
func UnmarshalJsonZipDescriptor(payload []byte) (*ZipDescriptor, error)
func (ZipDescriptor) EscapedSuggestedFilename ¶
func (zd ZipDescriptor) EscapedSuggestedFilename() string
Filename limited to US-ASCII per https://www.rfc-editor.org/rfc/rfc2183#section-2.3 Filter " as it's used to quote this filename
func (ZipDescriptor) Files ¶
func (zd ZipDescriptor) Files() []*FileEntry
Click to show internal directories.
Click to hide internal directories.