Documentation ¶
Index ¶
- func FileExists(filename string) bool
- func HeartbeatClient(clientCert string, clientKey string) (*http.Client, error)
- func InitializeGlobalLogger(logfile string, console bool)
- func IsEntitled(keys []string, endpoint func(http.ResponseWriter, *http.Request)) http.HandlerFunc
- func LatestVersion(organisation string, repository string) (string, error)
- func Middleware(traceLogger *zerolog.Logger) func(next http.Handler) http.Handler
- func NewRollingFile(file string) (io.Writer, error)
- func RespondCode(w http.ResponseWriter, code int)
- func RespondError(w http.ResponseWriter, code int, message string)
- func RespondJSON(w http.ResponseWriter, status int, payload interface{})
- func RespondString(w http.ResponseWriter, code int, message string)
- func RunUpdate(currentVersion string, organisation string, repository string, ...) (string, error)
- func SendHeartbeat(client *http.Client, endpoint string, serviceKey string, beat *Heartbeat) error
- func TraceLogger(logfile string) *zerolog.Logger
- func UnauthorizedResponse(w http.ResponseWriter)
- type Heartbeat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
Checks if a file exists and isn't a directory. see: https://golangcode.com/check-if-a-file-exists/
func HeartbeatClient ¶
func InitializeGlobalLogger ¶
func IsEntitled ¶
func IsEntitled(keys []string, endpoint func(http.ResponseWriter, *http.Request)) http.HandlerFunc
func LatestVersion ¶ added in v0.0.2
func RespondCode ¶
func RespondCode(w http.ResponseWriter, code int)
func RespondError ¶
func RespondError(w http.ResponseWriter, code int, message string)
func RespondJSON ¶
func RespondJSON(w http.ResponseWriter, status int, payload interface{})
func RespondString ¶
func RespondString(w http.ResponseWriter, code int, message string)
func SendHeartbeat ¶
func TraceLogger ¶
func UnauthorizedResponse ¶ added in v0.0.3
func UnauthorizedResponse(w http.ResponseWriter)
Types ¶
Click to show internal directories.
Click to hide internal directories.