Code Monkey home page Code Monkey logo

redis-slack-bot's Introduction

Redis Slack Bot

Overview

  • As Trendyol team we developed a new Slack bot to improve the usability of Redis.

With the help of the Redis Slack bot, you can:

- GET key -> Returns the value of the key.
- SET key value -> Sets or updates a key's value in the cache. The ttl is not given, so it remains in
  the cache indefinitely.
- SET key value ttl -> Sets or updates key's value which is in the cache. The ttl is given, so it stays
  in the cache for the number of seconds you specify.
- DELETE key -> If the key is in the cache, it is deleted.
- LIST ALL -> Displays a list of all keys in the cache.
- HELP -> How to use redis slack bot ?
- PING -> What can i help you ?

The following are some examples of each command:

- GET my_key_123
- SET my_key_123 "success"
- SET my_key_123 "{"name":"John","age":30,"car":null}"
- SET my_key_123 "{"name":"John","age":30,"car":null}" 30
- SET my_key_123 "success" 30
- DELETE my_key_123
- LIST ALL
- HELP
- PING

NOTE that!

  • When performing the commands, the same syntax should be used as in the examples. There should be only one space between "COMMAND key value ttl". Otherwise, you will have entered an incorrect command.
  • Also, do not forget to check your key-value pair after setting data by using the get command!

Slack Bot Example:

  • PING
    PING
  • HELP
    HELP
  • SET
    SET
  • GET
    GET
  • DELETE
    DELETE
  • SET_TTL
    SET_TTL
  • LIST_ALL
    LIST_ALL

Tech Stack
  • Java 17
  • Spring Boot 3.0 & Spring 6.0
  • Redis
  • Slack Api Client
Requirements

For building and running the application, you need:

Build & Run

Environment Variables

  SPRING_PROFILES_ACTIVE=prod
  REDIS_HOST = Your redis host
  REDIS_PASSWORD = Your redis password
  NOTIFY_TOKEN = Your slack bot token
  CHANNEL_ID = Your slack channel id 
  mvn clean install 
  mvn --projects redis-slack-bot spring-boot:run
Port
  http://localhost:9723
License

Distributed under the MIT License. See LICENSE for more information.

redis-slack-bot's People

Contributors

mehmetpekdemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mehmetpekdemir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.