feat(upload): add first prototype of File storage, svg database and svg processing. Also added --help command
All checks were successful
build / Go-Build (push) Successful in 1m5s

This commit is contained in:
2026-02-03 00:29:08 +01:00
parent 5bd6f3b312
commit 9574c2d0bc
9 changed files with 258 additions and 37 deletions

View File

@@ -0,0 +1,34 @@
package command
import (
"flag"
"log"
"tomatentum.net/svg-templater/pkg/auth"
)
func GenerateTokenCommand() {
name := flag.Arg(0)
if name == "" {
log.Fatal("No Token Name was provided!")
}
token, err := auth.CreateToken(name)
if err != nil {
log.Fatal("Failed to generate token:\n", err)
}
log.Println(token)
}
func DeleteTokenCommand() {
name := flag.Arg(0)
if name == "" {
log.Fatal("No Token Name was provided!")
}
err := auth.DeleteToken(name)
if err != nil {
log.Fatal("Failed to delete token:\n", err)
}
log.Println("Deleted token " + name)
}