Documentation
¶
Index ¶
- Variables
- func DefaultProcessor(sourcesPath, targetFolderPathForBuild string)
- func GitHubWebHookHandler(resp http.ResponseWriter, req *http.Request)
- func HugoProcessor(sourcesPath, targetFolderPathForBuild string) error
- func IndexForSearch(targetFolderPathForBuild string) error
- func InitialiseConfiguration(configFilePath string) error
- func InitialiseRegistry(sourceRoot string, docsRoot string, githubWebHookSecretEnvKey string)
- func SetLogger(logger *zap.SugaredLogger)
- type GitRepoConfig
- type SheepstorConfiguration
- type Website
- type WebsiteConfig
- type WebsiteRegistry
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = SheepstorConfiguration{}
Functions ¶
func DefaultProcessor ¶
func DefaultProcessor(sourcesPath, targetFolderPathForBuild string)
func GitHubWebHookHandler ¶
func GitHubWebHookHandler(resp http.ResponseWriter, req *http.Request)
func HugoProcessor ¶
func IndexForSearch ¶
func InitialiseConfiguration ¶
func InitialiseRegistry ¶
func SetLogger ¶
func SetLogger(logger *zap.SugaredLogger)
Types ¶
type GitRepoConfig ¶
type SheepstorConfiguration ¶
type SheepstorConfiguration struct {
SourceRoot string `yaml:"source_root"`
DocsRoot string `yaml:"docs_root"`
GitHubWebHookSecretEnvKey string `yaml:"github_webhook_secret_env_key"`
WebsiteConfigs []WebsiteConfig `yaml:"websites"`
}
type Website ¶
type Website struct {
ID string
ContentProcessor string //either 'hugo' or nil
ProcessorRoot string
WebRoot string
IndexForSearch bool
GitRepo toolbox2go.GitRepo
}
func NewWebsite ¶
func (*Website) CommitAndPush ¶
func (*Website) ProvisionSources ¶
type WebsiteConfig ¶
type WebsiteConfig struct {
ID string `yaml:"id"`
ContentProcessor string `yaml:"content_processor"` //either 'hugo' or nil
ProcessorRootSubFolderPath string `yaml:"processor_root"` //e.g. a sub-folder in the repo called 'webroot'
IndexForSearch bool `yaml:"index"` //run the pagefind executable to create a search index
GitRepoConfig GitRepoConfig `yaml:"git"`
}
type WebsiteRegistry ¶
type WebsiteRegistry struct {
SourceRoot string
WebRoot string
GitHubWebHookSecret string
WebSites []*Website
}
var Registry WebsiteRegistry
func NewRegistry ¶
func NewRegistry(sourceRoot, webRoot, gitHubWebHookSecret string) WebsiteRegistry
func (*WebsiteRegistry) Add ¶
func (r *WebsiteRegistry) Add(w *Website)
func (*WebsiteRegistry) GetWebsiteByID ¶
func (r *WebsiteRegistry) GetWebsiteByID(id string) *Website
func (*WebsiteRegistry) GetWebsiteByRepoNameAndBranchRef ¶
func (r *WebsiteRegistry) GetWebsiteByRepoNameAndBranchRef(repoName, branchRef string) *Website
Click to show internal directories.
Click to hide internal directories.