Go-space
Running out of slack storage? Find me here 😌.

Ever felt short of file storage while using slack? I (we at KOSS) did. So Dibya Das made Imagery.

So after tinkering around with Golang, wanted to learn by doing and Imagery had some issues due to some api changes on slack. So what could be better than re-writing the entire thing on go 🚀.

Go-space is a slack-bot which helps to free slack storage by uploading the image to imgur and replacing the image with the link. Just need to add him to the channel and you are good to go.

Installation

Using Docker

To create a docker file and push to dockerhub

        
            $ git clone https://github.com/rajivharlalka/go-space.git
            $ cd go-space
            $ docker build -t <dockerhub-username>/go-space:v1 .
            $ docker push <dockerhub-username>/go-space:v1
        
        

Run docker file

Environment Requirements

            
                SLACKBOT_ACCESS_TOKEN=<BOT TOKEN>
                SLACKUSER_ACCESS_TOKEN=<USER TOKEN>
                IMGUR_CLIENT_ID=<KEY>
            
        

It runs on port 3000 inside docker, so that port has been exported.

            
                $ docker run -dp 3000:3000 -e IMGUR_CLIENT_ID=<IMGUR_CLIENT_ID> -e SLACKBOT_AUTH_TOKEN=<SLACKBOT_AUTH_TOKEN> -e SLACKUSER_AUTH_TOKEN=<SLACKUSER_AUTH_TOKEN> <DOCKERHUB-USERNAME>/imagery:v1
            
        

Now, configure the app on slack dev for permissions and webhooks.

Usage

API Endpoints

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Thanks to Chirag Ghosh for helping me out in completing this 😃.

License

MIT

gopher