randomizer

module
v0.0.0-...-8045d3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT

README

Randomizer

The randomizer is a slash command webhook service for Slack that randomizes the order of items in a list.

Not sure what to get for lunch?

/randomize salad sandwich ramen

Need a code review from a teammate?

/randomize /save myteam Alice Bob Carol Dave Eve

/randomize myteam

Whenever you're unsure, let the universe decide!

Try the Demo

You'll need the Go toolchain installed to try the demo program.

  1. Clone this repository and cd into it
  2. Build the demo: go build ./cmd/randomizer-demo
  3. See what to do next: ./randomizer-demo help

The demo saves groups in a bbolt database in the current directory, and outputs responses using Slack's "mrkdwn" format. This gives a taste of how the command works, and helps with testing.

Deployment Options

This repo provides two guides on deploying the randomizer API for use with Slack:

  • SERVERLESS.md is a detailed walkthrough for deployment on AWS Lambda, Amazon's managed function as a service platform.
  • SERVERMORE.md is a high-level guide for configuring the randomizer-server HTTP server. It assumes more background knowledge and/or willingness to dive into the details of server management and the randomizer implementation.

Directories

Path Synopsis
cmd
randomizer-dbtools
The randomizer-dbtools command provides basic utilities for managing randomizer data stores.
The randomizer-dbtools command provides basic utilities for managing randomizer data stores.
randomizer-demo
The randomizer-demo command invokes the randomizer using arguments from the command line.
The randomizer-demo command invokes the randomizer using arguments from the command line.
randomizer-lambda
The randomizer-lambda command is an AWS Lambda handler that serves the Slack slash command API for the randomizer.
The randomizer-lambda command is an AWS Lambda handler that serves the Slack slash command API for the randomizer.
randomizer-server
The randomizer-server command is an HTTP server that serves the Slack slash command API for the randomizer.
The randomizer-server command is an HTTP server that serves the Slack slash command API for the randomizer.
internal
awsconfig
Package awsconfig generates AWS client configurations optimized for use by the randomizer.
Package awsconfig generates AWS client configurations optimized for use by the randomizer.
randomizer
Package randomizer implements the randomizer's core logic in a manner suitable for use by multiple frontends.
Package randomizer implements the randomizer's core logic in a manner suitable for use by multiple frontends.
randomizer/rndtest
Package rndtest provides helpers for tests that invoke a randomizer.
Package rndtest provides helpers for tests that invoke a randomizer.
slack
Package slack supports invoking the randomizer as a Slack slash command.
Package slack supports invoking the randomizer as a Slack slash command.
store
Package store and its sub-packages provide real-world [randomizer.Store] implementations.
Package store and its sub-packages provide real-world [randomizer.Store] implementations.
store/bbolt
Package bbolt supports randomizer storage in a local bbolt database file.
Package bbolt supports randomizer storage in a local bbolt database file.
store/dynamodb
Package dynamodb supports randomizer storage in an Amazon DynamoDB table.
Package dynamodb supports randomizer storage in an Amazon DynamoDB table.
store/firestore
Package firestore supports randomizer storage in Google Cloud Firestore.
Package firestore supports randomizer storage in Google Cloud Firestore.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL