config

package
v0.0.0-...-3863e02 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDefaultConfig

func GenDefaultConfig()

Types

type Config

type Config struct {
	Servers []ServerConfig `json:"servers,omitempty"`
}

func LoadConfig

func LoadConfig(fname string) (*Config, error)

type DavConfig

type DavConfig struct {
	Root   string    `json:"root,omitempty"`
	Prefix string    `json:"prefix,omitempty"`
	Users  []DavUser `json:"users,omitempty"`
}

type DavUser

type DavUser struct {
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
}

type DisableListingFileSystem

type DisableListingFileSystem struct {
	FS http.FileSystem
}

func (*DisableListingFileSystem) Open

func (dfs *DisableListingFileSystem) Open(name string) (http.File, error)

type DisableListingFileSystemFile

type DisableListingFileSystemFile struct {
	http.File
	// contains filtered or unexported fields
}

func (DisableListingFileSystemFile) Stat

type ServerConfig

type ServerConfig struct {
	Addr           string      `json:"addr,omitempty"`
	Root           string      `json:"root,omitempty"`
	EnableGzip     bool        `json:"enable_gzip,omitempty"`
	DisableListing bool        `json:"disable_listing,omitempty"`
	To             string      `json:"to,omitempty"`
	Cert           string      `json:"cert,omitempty"`
	Key            string      `json:"key,omitempty"`
	WebDAVs        []DavConfig `json:"webdavs,omitempty"`
}

Jump to

Keyboard shortcuts

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