Documentation
¶
Overview ¶
Package rssfeed is an Ambient plugin that provides an RSS feed.
Index ¶
Examples ¶
Constants ¶
View Source
const ( // FeedURL allows user to set the feed URL> FeedURL = "Feed URL" // Description allows user to set the description. Description = "Description" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
*ambient.PluginBase
}
Plugin represents an Ambient plugin.
func New ¶
func New() *Plugin
New returns an Ambient plugin that provides an RSS feed.
Example ¶
package main
import (
"log"
"github.com/ambientkit/ambient"
"github.com/ambientkit/ambient/pkg/ambientapp"
"github.com/ambientkit/plugin/generic/rssfeed"
"github.com/ambientkit/plugin/logger/zaplogger"
"github.com/ambientkit/plugin/storage/memorystorage"
)
func main() {
plugins := &ambient.PluginLoader{
// Core plugins are implicitly trusted.
Router: nil,
TemplateEngine: nil,
SessionManager: nil,
// Trusted plugins are those that are typically needed to boot so they
// will be enabled and given full access.
TrustedPlugins: map[string]bool{},
Plugins: []ambient.Plugin{
rssfeed.New(),
},
Middleware: []ambient.MiddlewarePlugin{
// Middleware - executes top to bottom.
},
}
_, _, err := ambientapp.NewApp("myapp", "1.0",
zaplogger.New(),
ambient.StoragePluginGroup{
Storage: memorystorage.New(),
},
plugins)
if err != nil {
log.Fatalln(err.Error())
}
}
func (*Plugin) Assets ¶
func (p *Plugin) Assets() ([]ambient.Asset, ambient.FileSystemReader)
Assets returns a list of assets and an embedded filesystem.
func (*Plugin) GrantRequests ¶
func (p *Plugin) GrantRequests() []ambient.GrantRequest
GrantRequests returns a list of grants requested by the plugin.
func (*Plugin) PluginName ¶
PluginName returns the plugin name.
func (*Plugin) PluginVersion ¶
PluginVersion returns the plugin version.
Click to show internal directories.
Click to hide internal directories.