Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var CORSDefault = CORSConfig{
Allow_Origin: "*",
Max_Age: "86400",
Allow_Methods: "*",
Allow_Headers: "*",
Allow_Credentials: "true",
}
Functions ¶
func Defaulthandle ¶ added in v0.4.1
func Defaulthandle(client *Cli) gin.HandlerFunc
Types ¶
type CORSConfig ¶ added in v0.4.1
type CORSConfig struct {
Allow_Origin, Max_Age, Allow_Methods, Allow_Headers, Allow_Credentials string
}
type Cli ¶ added in v0.4.1
type Cli struct {
// contains filtered or unexported fields
}
func (*Cli) GlobalReadOnly ¶ added in v0.4.1
func (client *Cli) GlobalReadOnly()
It only takes effect if no user is set
func (*Cli) SetCORS ¶ added in v0.4.1
func (client *Cli) SetCORS(config CORSConfig)
func (*Cli) UnSetReadOnly ¶ added in v0.4.1
func (client *Cli) UnSetReadOnly()
It only takes effect if no user is set
type Client ¶
type Client interface { GlobalReadOnly() UnSetReadOnly() SetCORS(config CORSConfig) FS() *webdav.Handler // contains filtered or unexported methods }
type HandlerFunc ¶ added in v0.4.1
type HandlerFunc func(*Cli) gin.HandlerFunc
type Server ¶
type Server interface { // All client path prefix levels must match DefaultClient(pathPrefix, filePath string) Client // All client path prefix levels must match Client(pathPrefix, filePath string, handlerFunc HandlerFunc) Client // All client path prefix levels must match DefaultClientWithMemFS(pathPrefix string) Client // All client path prefix levels must match ClientWithMemFS(pathPrefix string, handlerFunc HandlerFunc) Client Run(addr ...string) error RunTLS(addr string, certFile string, keyFile string) error // Fill in the domain name to automatically apply for a certificate and run on port 443 RunAUTOTLS(domain ...string) error // http -auto-> https SSLRedirect(SSLHost string) GinEngine() *gin.Engine }
func NewWebdavWithGin ¶ added in v0.2.0
All client path prefix levels must match
type SortFileInfo ¶ added in v0.5.0
func (SortFileInfo) Len ¶ added in v0.5.0
func (x SortFileInfo) Len() int
func (SortFileInfo) Less ¶ added in v0.5.0
func (x SortFileInfo) Less(i, j int) bool
func (SortFileInfo) Swap ¶ added in v0.5.0
func (x SortFileInfo) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.