/
plugin.go
47 lines (41 loc) · 1.11 KB
/
plugin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package auth
import (
"github.com/facebookgo/inject"
"github.com/ikeikeikeike/go-sitemap-generator/stm"
"github.com/jinzhu/gorm"
"github.com/kapmahc/axe/cache"
"github.com/kapmahc/axe/i18n"
"github.com/kapmahc/axe/job"
"github.com/kapmahc/axe/security"
"github.com/kapmahc/axe/settings"
"github.com/kapmahc/axe/uploader"
"github.com/kapmahc/sky/web"
"golang.org/x/tools/blog/atom"
)
// Plugin plugin
type Plugin struct {
Dao *Dao `inject:""`
Jwt *Jwt `inject:""`
Db *gorm.DB `inject:""`
I18n *i18n.I18n `inject:""`
Cache *cache.Cache `inject:""`
Uploader uploader.Store `inject:""`
Hmac *security.Hmac `inject:""`
Server *job.Server `inject:""`
Settings *settings.Settings `inject:""`
}
// Open open beans
func (p *Plugin) Open(*inject.Graph) error {
return nil
}
// Atom rss.atom
func (p *Plugin) Atom(lang string) ([]*atom.Entry, error) {
return []*atom.Entry{}, nil
}
// Sitemap sitemap.xml.gz
func (p *Plugin) Sitemap() ([]stm.URL, error) {
return []stm.URL{}, nil
}
func init() {
web.Register(&Plugin{})
}