Documentation ¶
Index ¶
- Variables
- func GenerateSecureKey() string
- func IndexFiles(fileList []string) error
- func IsWhitelisted(username string) bool
- func Login(r *http.Request) (bool, string, error)
- func MakeAndStartCron(repeat time.Duration, run func(...interface{}) error, v ...interface{})
- func PamAauthenticate(username, password string) int
- func ParseConfig(dir []string, forceAuth bool, whitelist, cron string) error
- func TailFile(conn *websocket.Conn, fileName string)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FileList - list of files that were parsed from the provided config FileList []string )
View Source
var Store = sessions.NewCookieStore( []byte(securecookie.GenerateRandomKey(64)), []byte(securecookie.GenerateRandomKey(32)))
Store - secure cookie store
Functions ¶
func IndexFiles ¶
IndexFiles - takes argument as a list of files and directories and returns a list of absolute file strings to be tailed
func IsWhitelisted ¶
IsWhitelisted - returns if a username is in ACL or not If the ACL list is empty, it assumes no ACL
func MakeAndStartCron ¶
MakeAndStartCron - Creates a ticket with an interval of 'repeat' and pushes in a channel being read by the for loop in the function. Every time a value is pushed, the Cron executes the function passed
func PamAauthenticate ¶
PamAauthenticate - authenticates a user based on local PAM based authentication
func ParseConfig ¶
ParseConfig - function to manage config
Types ¶
Click to show internal directories.
Click to hide internal directories.