all repos — nirvash @ 37d184b3e228e0b43aa54fb45275131f46540229

modular CMS using the quartzgun library

archetype/adapter.go (raw)

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
package archetype

type BuildStatus struct {
	Success bool
	Message string
}

type ConfigOption struct {
	Name string
	Type string
}

type Adapter interface {
	Init(cfg *Config)
	Name() string
	EditableSlugs() bool
	BuildOptions() []string
	GetConfig() map[ConfigOption]string
	SetConfig(map[ConfigOption]string) error
	ListPages() map[string]string
	GetPage(string) (Page, error)
	FormatPage(string) string
	FormattingHelp() string
	CreatePage(slug, title, content string) error
	SavePage(oldSlug, newSlug, title, content string) error
	DeletePage(slug string) error
	Build(buildOptions map[string][]string) BuildStatus
}