Documentation ¶
Index ¶
- func Serve(port int, watching bool) error
- type ServerState
- func (s *ServerState) CreateTemplateWithFuncs(name, tmpl string) (*template.Template, error)
- func (s *ServerState) GetAllGroups() []string
- func (s *ServerState) GetAllPromptos() []pkg.Prompto
- func (s *ServerState) GetAllRepositories() []string
- func (s *ServerState) GetGroupsByRepository(repo string) []string
- func (s *ServerState) GetPromptosByGroup(group string) []pkg.Prompto
- func (s *ServerState) GetPromptosForRepositoryAndGroup(repo, group string) []pkg.Prompto
- func (s *ServerState) LoadRepositories() error
- func (s *ServerState) WatchRepositories(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServerState ¶
type ServerState struct { Repositories []string Repos map[string]*pkg.Repository Watching bool // contains filtered or unexported fields }
func NewServerState ¶
func NewServerState(watching bool) *ServerState
func (*ServerState) CreateTemplateWithFuncs ¶
func (s *ServerState) CreateTemplateWithFuncs(name, tmpl string) (*template.Template, error)
func (*ServerState) GetAllGroups ¶
func (s *ServerState) GetAllGroups() []string
func (*ServerState) GetAllPromptos ¶
func (s *ServerState) GetAllPromptos() []pkg.Prompto
func (*ServerState) GetAllRepositories ¶
func (s *ServerState) GetAllRepositories() []string
func (*ServerState) GetGroupsByRepository ¶
func (s *ServerState) GetGroupsByRepository(repo string) []string
func (*ServerState) GetPromptosByGroup ¶
func (s *ServerState) GetPromptosByGroup(group string) []pkg.Prompto
func (*ServerState) GetPromptosForRepositoryAndGroup ¶
func (s *ServerState) GetPromptosForRepositoryAndGroup(repo, group string) []pkg.Prompto
func (*ServerState) LoadRepositories ¶
func (s *ServerState) LoadRepositories() error
func (*ServerState) WatchRepositories ¶
func (s *ServerState) WatchRepositories(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.