Documentation
¶
Index ¶
- Variables
- func BasicAuthMiddleware(next http.Handler) http.Handler
- func CloneRepoToVFS(snGitRepo string) (afero.Fs, error)
- func CompareFileStates(prev, curr map[string]FileState) []string
- func ConfigPath(configKey string, opts ...ConfigPathOptionFn) string
- func ConfigSetup() (afero.Fs, error)
- func ConfigStringDefault(configLocation string, defaultVal string) string
- func CopyMap(m map[string]interface{}) map[string]interface{}
- func DBClose()
- func DBConnect()
- func DBLoadRepo(repoName string)
- func DBLoadRepos()
- func DBLoadReposSync()
- func DBQuery(query string) (*sql.Rows, error)
- func DirExists(dir string) bool
- func DirExistsFs(fs afero.Fs, path string) bool
- func GetFileStates(fs afero.Fs, dir string, filter *regexp.Regexp) (map[string]FileState, error)
- func GetTemplateFilesFromConfig(configPath string) []string
- func LogMiddleware(next http.Handler) http.Handler
- func MaxOf(vars ...int) int
- func MinOf(vars ...int) int
- func PrintMap(data map[string]interface{}, indent string) string
- func RegisterPartials()
- func RegisterTemplateHelpers()
- func RenderTemplateFiles(filenames []string, context map[string]interface{}) (string, error)
- func RowToMapSlice(rows *sql.Rows) ([][]string, error)
- func StartWatching(path string, repoName string)
- func WebserverStart()
- type Authenticator
- type Author
- type Category
- type ConfigPathOptionFn
- type ConfigPathOptions
- type FileState
- type FileSystem
- type Item
- type ItemQuery
- type ItemResult
- type SpacesConfig
- type Storage
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Vfs afero.Fs GitMemStorage *memory.Storage Repo *git.Repository )
Functions ¶
func CompareFileStates ¶
CompareFileStates compares the current state with the previous state and returns the changed files
func ConfigPath ¶
func ConfigPath(configKey string, opts ...ConfigPathOptionFn) string
ConfigPath returns the absolute path defined for a configuration key
func ConfigSetup ¶
func ConfigStringDefault ¶
func DBLoadRepo ¶
func DBLoadRepo(repoName string)
func DBLoadRepos ¶
func DBLoadRepos()
func DBLoadReposSync ¶
func DBLoadReposSync()
func GetFileStates ¶
GetFileStates returns the current state of the files in the given directory
func RegisterPartials ¶
func RegisterPartials()
func RegisterTemplateHelpers ¶
func RegisterTemplateHelpers()
func RenderTemplateFiles ¶
func StartWatching ¶
StartWatching starts watching the given directory for changes
func WebserverStart ¶
func WebserverStart()
Types ¶
type Authenticator ¶
type Authenticator struct {
User *User
ID []byte
CredentialID []byte
PublicKey []byte
AAGUID []byte
SignCount uint32
}
func (*Authenticator) WebAuthAAGUID ¶
func (a *Authenticator) WebAuthAAGUID() []byte
func (*Authenticator) WebAuthCredentialID ¶
func (a *Authenticator) WebAuthCredentialID() []byte
func (*Authenticator) WebAuthID ¶
func (a *Authenticator) WebAuthID() []byte
func (*Authenticator) WebAuthPublicKey ¶
func (a *Authenticator) WebAuthPublicKey() []byte
func (*Authenticator) WebAuthSignCount ¶
func (a *Authenticator) WebAuthSignCount() uint32
type ConfigPathOptionFn ¶
type ConfigPathOptionFn func(f *ConfigPathOptions)
func MustExist ¶
func MustExist() ConfigPathOptionFn
func OptionallyExist ¶
func OptionallyExist() ConfigPathOptionFn
func WithDefault ¶
func WithDefault(def string) ConfigPathOptionFn
type ConfigPathOptions ¶
type FileSystem ¶
type FileSystem interface {
Open(name string) (fs.File, error)
ReadDir(name string) ([]fs.DirEntry, error)
}
FileSystem is an interface that includes the methods required by both embed.FS and http.FileSystem.
type Item ¶
type Item struct {
Title string
Slug string
Repo string
Categories []string
Authors []string
Frontmatter map[string]string
Date time.Time
RawDate string
Raw string
Html string
Source string
Id int64
}
Item is...
type ItemResult ¶
func ItemsFromItemQuery ¶
func ItemsFromItemQuery(qry ItemQuery) ItemResult
func ItemsFromOutvals ¶
func ItemsFromOutvals(outVariableParams map[string]interface{}, context map[string]interface{}) ItemResult
type SpacesConfig ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) AddAuthenticator ¶
func (*Storage) GetAuthenticator ¶
func (s *Storage) GetAuthenticator(id []byte) (webauthn.Authenticator, error)
func (*Storage) GetAuthenticators ¶
type User ¶
type User struct {
Name string `json:"name"`
Authenticators map[string]*Authenticator `json:"-"`
}
func (*User) WebAuthDisplayName ¶
func (*User) WebAuthName ¶
Click to show internal directories.
Click to hide internal directories.