add build options to adapter interface
This commit is contained in:
parent
59c7fbcc74
commit
1bc8eac481
2 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,7 @@ type Adapter interface {
|
|||
Init(cfg *Config)
|
||||
Name() string
|
||||
EditableSlugs() bool
|
||||
BuildOptions() ([]string)
|
||||
GetConfig(key string) (interface{}, error)
|
||||
SetConfig(key string, value interface{}) error
|
||||
ListPages() map[string]string
|
||||
|
@ -13,5 +14,5 @@ type Adapter interface {
|
|||
CreatePage(slug, title, content string) error
|
||||
SavePage(oldSlug, newSlug, title, content string) error
|
||||
DeletePage(slug string) error
|
||||
Build() (bool, string)
|
||||
Build(buildOptions map[string]string) (bool, string)
|
||||
}
|
||||
|
|
|
@ -31,6 +31,10 @@ func (self *EurekaAdapter) EditableSlugs() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (self *EurekaAdapter) BuildOptions() []string {
|
||||
return []string{"twtxt"}
|
||||
}
|
||||
|
||||
func (self *EurekaAdapter) GetConfig(key string) (interface{}, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -103,6 +107,6 @@ func (self *EurekaAdapter) DeletePage(slug string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (self *EurekaAdapter) Build() (bool, string) {
|
||||
func (self *EurekaAdapter) Build(buildOptions map[string]string) (bool, string) {
|
||||
return true, "Build successful"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue