2022-05-31 05:38:51 +00:00
|
|
|
package archetype
|
2022-05-29 04:45:44 +00:00
|
|
|
|
2022-06-07 06:59:41 +00:00
|
|
|
type BuildStatus struct {
|
|
|
|
Success bool
|
|
|
|
Message string
|
|
|
|
}
|
|
|
|
|
2022-05-29 04:45:44 +00:00
|
|
|
type Adapter interface {
|
2022-05-31 05:38:51 +00:00
|
|
|
Init(cfg *Config)
|
2022-05-29 06:26:36 +00:00
|
|
|
Name() string
|
2022-06-05 18:09:00 +00:00
|
|
|
EditableSlugs() bool
|
|
|
|
BuildOptions() []string
|
2022-05-29 06:26:36 +00:00
|
|
|
GetConfig(key string) (interface{}, error)
|
|
|
|
SetConfig(key string, value interface{}) error
|
|
|
|
ListPages() map[string]string
|
2022-05-31 05:38:51 +00:00
|
|
|
GetPage(string) (Page, error)
|
2022-05-29 06:26:36 +00:00
|
|
|
FormatPage(string) string
|
|
|
|
FormattingHelp() string
|
2022-06-05 04:34:20 +00:00
|
|
|
CreatePage(slug, title, content string) error
|
|
|
|
SavePage(oldSlug, newSlug, title, content string) error
|
|
|
|
DeletePage(slug string) error
|
2022-06-07 06:59:41 +00:00
|
|
|
Build(buildOptions map[string][]string) BuildStatus
|
2022-05-29 06:26:36 +00:00
|
|
|
}
|