modulepackage
0.0.0-20220403174513-545971b6356a
Repository: https://github.com/ambientkit/ambient.git
Documentation: pkg.go.dev
# README
Ambient core
Thanks for visiting! All docs are available here.
This repository contains the code for the Ambient core which includes:
- entry points like
NewApp()
,NewAppLogger()
andListenAndServe()
- interfaces used by the plugins: logger, router, session manager, etc.
- permission system and permission list
- dev console for the AMB CLI
- toolkit available to all plugins
# Packages
No description provided by the author
# Functions
AuthAssetAllowed return true if the user has access to the asset.
EnvLogLevel returns the log level from the AMB_LOGLEVEL environment variable.
GlobalFuncMap returns the FuncMaps available in all templates.
NewGRPCPlugin returns gRPC plugin base.
SetupRouter sets the router with the NotFound handler and the default handler.
Validate returns an error if the plugin name or version is not valid.
# Constants
AssetGeneric is a generic element.
AssetJavaScript is a javascript element.
AssetStylesheet is a stylesheet element.
Default.
AuthAnonymousOnly is only non-authenticated users.
AuthOnly is only authenticated users.
Checkbox is a checkbox field.
GrantAllUserAuthenticatedWrite allows write access to login or logout any user.
GrantPluginNeighborGrantRead allows read access to a grant in another plugin.
GrantPluginNeighborGrantWrite allows write access to a grant in another plugin.
GrantPluginNeighborRouteRead allows read access to routes in another plugin.
GrantPluginNeighborSettingRead allows read access to a setting in another plugin.
GrantPluginNeighborSettingWrite allows write access to a setting in another plugin.
GrantPluginSettingRead allows read access to the plugin setting.
GrantPluginSettingWrite allows write access to the plugin setting.
GrantPluginTrustedRead allows read access to whether a plugin is trusted or not.
GrantRouterMiddlewareWrite allows adding middleware to routes.
GrantRouterRouteWrite allows write access to routes.
GrantSiteAssetWrite allows write access to site assets.
GrantSiteContentRead allows read access to the site content.
GrantSiteContentWrite allows write access to the site content.
GrantSiteFuncMapWrite allows write access to site FuncMap for templates.
GrantSiteLoadTrigger allows trigger access to the site load from data storage.
GrantSitePluginDelete allows delete access to the site plugins.
GrantSitePluginDisable allows disable access to the site plugins.
GrantSitePluginEnable allows enable access to the site plugins.
GrantSitePluginRead allows read access to the site plugins.
GrantSitePostDelete allows delete access to the site posts.
GrantSitePostRead allows read access to the site posts.
GrantSitePostWrite allows write access to the site posts.
GrantSiteSchemeRead allows read access to the site scheme.
GrantSiteSchemeWrite allows write access to the site scheme.
GrantSiteTitleRead allows read access to the site title.
GrantSiteTitleWrite allows write access to the site title.
GrantSiteUpdatedRead allows read access to the site updated time.
GrantSiteURLRead allows read access to the site URL.
GrantSiteURLWrite allows write access to the site URL.
GrantUserAuthenticatedRead allows read access whether the current user is logged in or not.
GrantUserAuthenticatedWrite allows write access to login or logout a user.
GrantUserPersistWrite allows write access to login or logout a user.
Input is a standard text field.
InputPassword is a standard password field.
LayoutPage is a page layout.
LayoutPost is a post layout.
LocationBody is at the bottom of the HTML <body> section.
LocationFooter is in the HTML <footer> section.
LocationHead is at the bottom of the HTML <head> section.
LocationHeader is at the top the HTML <header> section.
LocationMain is at the bottom of the HTML <main> section.
LogLevelDebug is for debugging output.
LogLevelError is for messages when something is wrong with the app and it needs to be corrected.
LogLevelFatal is for messages when the app cannot continue and will halt.
LogLevelInfo is for informational messages.
LogLevelWarn is for behavior that may need to be fixed.
Textarea is a textarea field.
# Structs
Asset represents an HTML asset like a stylesheet or javascript file.
Attribute represents an HTML attribute.
GrantRequest represents a plugin grant request.
GRPCPluginBase represents a base gRPC plugin that works with Ambient.
PluginBase represents a base plugin that works with Ambient.
PluginData represents the plugin storage information.
PluginLoader contains the plugins for the Ambient app.
Post -.
PostWithID -.
Replace represents text to find and replace.
Route is a route for a router.
Setting is a plugin settable field.
SettingDescription is a type of description.
Site represents the site information that is in storage.
StatusError represents an error with an associated HTTP status code.
StoragePluginGroup represents a storage plugin and an optional encryption package.
Tag represents a tag on a post or page.
Toolkit provides utilities to plugins.
# Interfaces
AppLogger represents the log service for the app.
AppRouter represents a router.
AppSession represents a user session.
AssetInjector represents code that can inject files into a template.
DataStorer reads and writes data to an object.
Error represents a handler error.
FileSystemReader can be used with embed.FS and avfs.FS.
GRPCSystem manages connecting, loading, monitoring, and disconnecting gRPC plugins..
LayoutInjector represents an injector that the AssetInjector will call to inject assets in the correct place.
Logger represents the log service for the plugins.
LoggingPlugin represents a logging plugin.
MiddlewarePlugin represents a middleware plugin.
Plugin represents a plugin.
PluginCore represents the core of any plugin.
PluginSystem provides config functions.
Renderer represents a template renderer.
Router represents a router.
RouterPlugin represents a router engine plugin.
SecureSite provides plugin functions.
SessionManagerPlugin represents a session manager plugin.
SessionStorer reads and writes data to an object.
Storage provides app config functions.
StorageEncryption represents a encryption/decryption for a storage plugin.
StoragePlugin represents a storage plugin.
TemplateEnginePlugin represents a template engine plugin.
# Type aliases
AssetLocation is a location where assets can be added.
AssetType is a type of asset.
AuthType is a type of authentication.
CustomServeHTTP allows customization of error handling by the router.
Grant is a type of permission.
LayoutType is a type of layout.
LogLevel is a log level.
PluginGrants represents an unordered map of grants.
PluginSettings represents an unordered map of settings.
PostList -.
PostWithIDList -.
SettingType is an HTML type of setting.
TagList represents a list of sortable tags.