Documentation
¶
Index ¶
- type Directory
- func (d *Directory) Chdir(path string) (cms.Directory, error)
- func (d *Directory) Info() (fs.FileInfo, error)
- func (d *Directory) IsDir() bool
- func (d *Directory) MkdirAll(path string) (cms.Directory, error)
- func (d *Directory) ModTime() time.Time
- func (d *Directory) Mode() fs.FileMode
- func (d *Directory) Name() string
- func (d *Directory) Open(path string) (cms.Resource, error)
- func (d *Directory) Path() string
- func (d *Directory) Size() int64
- func (d *Directory) Sys() interface{}
- func (d *Directory) Type() fs.FileMode
- type Sandbox
- type Server
- func (s *Server) Chdir(path string) (cms.Directory, error)
- func (s *Server) Chroot(path string) (cms.Directory, error)
- func (s *Server) Close() error
- func (s *Server) Connect(ctx context.Context) error
- func (s *Server) Info() (fs.FileInfo, error)
- func (s *Server) IsDir() bool
- func (s *Server) MkdirAll(path string) (cms.Directory, error)
- func (s *Server) ModTime() time.Time
- func (s *Server) Mode() fs.FileMode
- func (s *Server) Name() string
- func (s *Server) Open(path string) (cms.Resource, error)
- func (s *Server) Path() string
- func (s *Server) Size() int64
- func (s *Server) Sys() interface{}
- func (s *Server) Type() fs.FileMode
- func (s *Server) View(path string) cms.View
- type ServerOption
- func SetEditHandler(path string, handler web.HandlerFunc) ServerOption
- func SetErrorHandler(handler web.ErrorHandlerFunc) ServerOption
- func SetFilesHandler(path string, handler web.HandlerFunc) ServerOption
- func SetGetDirectory(getDirectory func(context.Context) cms.Directory) ServerOption
- func SetGetResource(getResource func(context.Context) cms.Resource) ServerOption
- func SetGetRoutePath(getRoutePath func(r *http.Request) string) ServerOption
- func SetGetUser(getUser func(context.Context) cms.User) ServerOption
- func SetIndexPage(index string) ServerOption
- func SetPingHandler(path string, handler web.HandlerFunc) ServerOption
- func SetSetDirectory(setDirectory func(context.Context, cms.Directory) context.Context) ServerOption
- func SetSetResource(setResource func(context.Context, cms.Resource) context.Context) ServerOption
- func SetSitemapHandler(path string, handler web.HandlerFunc) ServerOption
- type ServerOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶ added in v0.0.5
type Directory struct {
// contains filtered or unexported fields
}
type Sandbox ¶ added in v0.0.3
A Sandbox is a chroot-ed Directory
type Server ¶
type Server struct {
cms.ViewConfig
Root string
Cache string
// contains filtered or unexported fields
}
CMS Server
type ServerOption ¶
Server Options
func SetEditHandler ¶ added in v0.0.3
func SetEditHandler(path string, handler web.HandlerFunc) ServerOption
Set Server's default File editor
func SetErrorHandler ¶ added in v0.0.3
func SetErrorHandler(handler web.ErrorHandlerFunc) ServerOption
Set Server's default error Handler
func SetFilesHandler ¶ added in v0.0.3
func SetFilesHandler(path string, handler web.HandlerFunc) ServerOption
Set Server's default File manager
func SetGetDirectory ¶ added in v0.7.0
func SetGetDirectory(getDirectory func(context.Context) cms.Directory) ServerOption
Set ViewConfig.GetDirectory
func SetGetResource ¶ added in v0.0.3
func SetGetResource(getResource func(context.Context) cms.Resource) ServerOption
Set ViewConfig.GetResource
func SetGetRoutePath ¶ added in v0.0.3
func SetGetRoutePath(getRoutePath func(r *http.Request) string) ServerOption
Set ViewConfig.GetRoutePath
func SetGetUser ¶ added in v0.0.3
func SetGetUser(getUser func(context.Context) cms.User) ServerOption
Set ViewConfig.GetUser
func SetIndexPage ¶ added in v0.0.3
func SetIndexPage(index string) ServerOption
Set Server's default resource for a given directory
func SetPingHandler ¶ added in v0.0.3
func SetPingHandler(path string, handler web.HandlerFunc) ServerOption
Set Server's default Heartbeat handler
func SetSetDirectory ¶ added in v0.7.0
func SetSetDirectory(setDirectory func(context.Context, cms.Directory) context.Context) ServerOption
Set ViewConfig.SetDirectory
func SetSetResource ¶ added in v0.0.3
Set ViewConfig.SetResource
func SetSitemapHandler ¶ added in v0.0.3
func SetSitemapHandler(path string, handler web.HandlerFunc) ServerOption
Set Server's default Sitemap handler
type ServerOptionFunc ¶ added in v0.0.3
func (ServerOptionFunc) ApplyOption ¶ added in v0.5.0
func (f ServerOptionFunc) ApplyOption(s *Server) error
Click to show internal directories.
Click to hide internal directories.