mux

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Action          = "a"
	Preview         = "p"
	PreviewDownload = "previewdownload"
)

Variables

This section is empty.

Functions

func PreviewHtml

func PreviewHtml(mimeType string) (string, bool)

func RouterFilePath

func RouterFilePath(router string) string

func RouterStatic

func RouterStatic(router string) string

func UrlPath

func UrlPath(u, router string) string

Types

type DriveFileTemplate

type DriveFileTemplate struct {
	Name          string `json:"name"`
	Size          string `json:"size"`
	Path          string `json:"path"`
	ModifiedTime  string `json:"modifiedTime"`
	DownloadUrl   string `json:"downloadUrl"`
	MimeType      string `json:"mimeType"`
	ChildCount    uint64 `json:"childCount"`
	EnablePreview bool   `json:"enablePreview"`
}

func FilesToTemplate

func FilesToTemplate(fs []*api.DriveFile) []*DriveFileTemplate

func FormatFileToTemplate

func FormatFileToTemplate(d *api.DriveFile) *DriveFileTemplate

type Mux

type Mux struct {
	// contains filtered or unexported fields
}

func NewMux

func NewMux(odh *handler.OneDriveHandler) *Mux

func (*Mux) GetOneDriveFile

func (m *Mux) GetOneDriveFile(w http.ResponseWriter, r *http.Request)

func (*Mux) Render

func (m *Mux) Render(w http.ResponseWriter, data interface{}, tplHtml ...string) error

func (*Mux) Run

func (m *Mux) Run() error

func (*Mux) Shutdown

func (m *Mux) Shutdown()

Jump to

Keyboard shortcuts

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