Documentation
¶
Index ¶
- func RegisterPlugin(name string, plugin *starlarkstruct.Struct)
- type App
- func CreateDevModeHashDisable(logger *utils.Logger, fileData map[string]string) (*App, *util.AppFS, error)
- func CreateDevModeTestApp(logger *utils.Logger, fileData map[string]string) (*App, *util.AppFS, error)
- func CreateTestApp(logger *utils.Logger, fileData map[string]string) (*App, *util.AppFS, error)
- func CreateTestAppInt(logger *utils.Logger, path string, fileData map[string]string, isDev bool, ...) (*App, *util.AppFS, error)
- func CreateTestAppRoot(logger *utils.Logger, fileData map[string]string) (*App, *util.AppFS, error)
- func NewApp(sourceFS *util.AppFS, workFS *util.AppFS, logger *utils.Logger, ...) *App
- type Request
- type SSEMessage
- type TestFS
- func (f *TestFS) Glob(pattern string) ([]string, error)
- func (f *TestFS) Open(name string) (fs.File, error)
- func (f *TestFS) ParseFS(funcMap template.FuncMap, patterns ...string) (*template.Template, error)
- func (f *TestFS) ReadFile(name string) ([]byte, error)
- func (f *TestFS) Remove(name string) error
- func (f *TestFS) Stat(name string) (fs.FileInfo, error)
- func (f *TestFS) Write(name string, bytes []byte) error
- type TestFile
- type TestFileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPlugin ¶
func RegisterPlugin(name string, plugin *starlarkstruct.Struct)
Types ¶
type App ¶
type App struct { *utils.Logger *utils.AppEntry Name string CustomLayout bool Config *util.AppConfig // contains filtered or unexported fields }
App is the main object that represents a Clace app. It is created when the app is loaded
func CreateDevModeTestApp ¶
func CreateTestApp ¶
func CreateTestAppInt ¶
func CreateTestAppRoot ¶
func (*App) Initialize ¶
type Request ¶
type Request struct { AppName string AppPath string AppUrl string PagePath string PageUrl string Method string IsDev bool AutoReload bool IsPartial bool PushEvents bool HtmxVersion string Headers http.Header RemoteIP string UrlParams map[string]string Form url.Values Query url.Values PostForm url.Values Data any }
Request is a starlark.Value that represents an HTTP request. A Request is created from the Go http.Request and passed to the starlark handler function as it only argument. The Data field is updated with the handler's response and then the template evaluation is done with the same Request
type SSEMessage ¶
type SSEMessage struct {
// contains filtered or unexported fields
}
type TestFS ¶
type TestFS struct {
// contains filtered or unexported fields
}
type TestFile ¶
type TestFile struct {
// contains filtered or unexported fields
}
func CreateTestFile ¶
type TestFileInfo ¶
type TestFileInfo struct {
// contains filtered or unexported fields
}
func (*TestFileInfo) IsDir ¶
func (fi *TestFileInfo) IsDir() bool
func (*TestFileInfo) ModTime ¶
func (fi *TestFileInfo) ModTime() time.Time
func (*TestFileInfo) Mode ¶
func (fi *TestFileInfo) Mode() fs.FileMode
func (*TestFileInfo) Name ¶
func (fi *TestFileInfo) Name() string
func (*TestFileInfo) Size ¶
func (fi *TestFileInfo) Size() int64
func (*TestFileInfo) Sys ¶
func (fi *TestFileInfo) Sys() any
Source Files
¶
Click to show internal directories.
Click to hide internal directories.