post

package
v0.0.0-...-23273d1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PostLock sync.RWMutex

PostLock is the complement for the global PostMap to ensure concurrent access doesn't race

View Source
var PostMap map[string]string

PostMap is a global map to handle callbacks depending on the provided user This mapping stores off the userID to reply to

Functions

This section is empty.

Types

type Slack

type Slack struct {
	Name  string
	Token string

	User   string
	UserID string

	Logger *log.Logger

	Client *slack.Client
}

Slack is the primary struct for our slackbot

func New

func New() (*Slack, error)

New returns a new instance of the Slack struct, primary for our slackbot

func (*Slack) NewHandler

func (s *Slack) NewHandler() (http.Handler, error)

NewHandler instantiaties the web handler for listening on the API

func (*Slack) Run

func (s *Slack) Run(ctx context.Context) error

Run is the primary service to generate and kick off the slackbot listener This portion receives all incoming Real Time Messages notices from the workspace as registered by the API token

Jump to

Keyboard shortcuts

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