init.go 557 B

123456789101112131415161718192021222324
  1. package stored_procedure
  2. import (
  3. _ "embed"
  4. "github.com/go-redis/redis/v8"
  5. )
  6. func init() {
  7. InsertEntryScript = redis.NewScript(insertEntry)
  8. DeleteEntryScript = redis.NewScript(deleteEntry)
  9. DeleteFolderChildrenScript = redis.NewScript(deleteFolderChildren)
  10. }
  11. //go:embed insert_entry.lua
  12. var insertEntry string
  13. var InsertEntryScript *redis.Script
  14. //go:embed delete_entry.lua
  15. var deleteEntry string
  16. var DeleteEntryScript *redis.Script
  17. //go:embed delete_folder_children.lua
  18. var deleteFolderChildren string
  19. var DeleteFolderChildrenScript *redis.Script