slack

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FuzzyLimit        = 10
	FuzzyMinimumScore = 75
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OauthToken        string        `env:"SLACK_OAUTH_TOKEN,required" json:"-"`
	MaxCacheEntryTime time.Duration `env:"SLACK_STORE_MAX_CACHE_ENTRY_TIME" envDefault:"144h"` // 6 days
	SlackAPIUrl       string        `env:"SLACK_API_URL"`                                      // only for testing
}

type MatchUser

type MatchUser struct {
	User slack.User
	// contains filtered or unexported fields
}

type SlackStorage

type SlackStorage struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *SlackStorage

func (*SlackStorage) AddUser

func (s *SlackStorage) AddUser(_ context.Context, _ *userDomain.User) error

func (*SlackStorage) GetUser

func (s *SlackStorage) GetUser(_ context.Context, id string) (*userDomain.User, error)

func (*SlackStorage) ListUsers

func (s *SlackStorage) ListUsers(ctx context.Context, filter userDomain.ListFilter) ([]*userDomain.User, error)

Jump to

Keyboard shortcuts

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