Documentation ¶
Index ¶
- Constants
- Variables
- func Error(c *gin.Context, msg string, err error, status int)
- func FSGetContent(c *gin.Context)
- func FSList(c *gin.Context)
- func FSMkdir(c *gin.Context)
- func FSPutContent(c *gin.Context)
- func FSStatContent(c *gin.Context)
- func FSStatDir(c *gin.Context)
- func GetChecksum(checksum string, path string) (cs string, err error)
- func GetContentError(c *gin.Context, path string, err error, status int)
- func ListError(c *gin.Context, path string, err error, status int)
- func MkdirError(c *gin.Context, path string, err error, status int)
- func NotImplementedFunc(c *gin.Context)
- func PutContentError(c *gin.Context, path string, err error, status int)
- func Run(engine *gin.Engine, addr string, configName string, rscRoot string, ...)
- func S3GetContent(c *gin.Context)
- func S3List(c *gin.Context)
- func S3StatContent(c *gin.Context)
- func SetLastModified(w http.ResponseWriter, modtime time.Time)
- func StatContentError(c *gin.Context, path string, err error, status int)
- func StatDirError(c *gin.Context, path string, err error, status int)
- type ServerConfig
- type StatContent
Constants ¶
View Source
const TimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
Variables ¶
View Source
var ActiveRootDir string
View Source
var ServerConfigMap = map[string]ServerConfig{ "S3Read": { GetContentFunc: S3GetContent, StatContentFunc: S3StatContent, StatDirFunc: NotImplementedFunc, ListFunc: S3List, PutContentFunc: NotImplementedFunc, MkdirFunc: NotImplementedFunc, }, "FSWrite": { GetContentFunc: FSGetContent, StatContentFunc: FSStatContent, StatDirFunc: FSStatDir, ListFunc: FSList, PutContentFunc: FSPutContent, MkdirFunc: FSMkdir, }, }
Functions ¶
func FSGetContent ¶
func FSPutContent ¶
func FSStatContent ¶
func NotImplementedFunc ¶
func S3GetContent ¶
func S3StatContent ¶
func SetLastModified ¶
func SetLastModified(w http.ResponseWriter, modtime time.Time)
Types ¶
type ServerConfig ¶
type ServerConfig struct { GetContentFunc gin.HandlerFunc StatContentFunc gin.HandlerFunc StatDirFunc gin.HandlerFunc ListFunc gin.HandlerFunc PutContentFunc gin.HandlerFunc MkdirFunc gin.HandlerFunc }
var ActiveServerConfig ServerConfig
Click to show internal directories.
Click to hide internal directories.