Documentation
¶
Index ¶
- Variables
- func Authenticator() func(http.Handler) http.Handler
- func CreateAuthVerifier(pubKey ed25519.PublicKey) *jwtauth.JWTAuth
- func GetFormattedWeek(date time.Time) string
- func GetLastNWeeks(date time.Time, n int) []string
- func GetRawPublicKey() (ed25519.PublicKey, error)
- func GetWeeksArray(weekStr string) []string
- func JSONError(w http.ResponseWriter, err ErrorParam, code int)
- func SanitizeString(s string) string
- func SortISOWeeks(isoWeeks []string) []string
- type ErrorParam
- type ISOWeek
- type JWKS
- type Key
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AuthIdCtxKey = contextKey{"authId"}
)
Functions ¶
func GetFormattedWeek ¶
func GetRawPublicKey ¶
func GetWeeksArray ¶
func JSONError ¶
func JSONError(w http.ResponseWriter, err ErrorParam, code int)
func SanitizeString ¶
Sanitizes a string to conform to Turso database name requirements. https://docs.turso.tech/api-reference/databases/create#body-name
func SortISOWeeks ¶
Types ¶
type ErrorParam ¶
type ErrorParam struct {
Error string `json:"error"`
}
type ISOWeek ¶
func ParseISOWeek ¶
Click to show internal directories.
Click to hide internal directories.