slackapi

package
v1.0.2003 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package slackapi is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetUserProfile(ctx context.Context, userID string) (profile *UserProfile, err error)
}

Client is the interface for communicating with the Slack api

func NewClient

func NewClient(config *api.APIConfig) Client

NewClient returns a slack.Client to communicate with the Slack API

func NewLoggingClient

func NewLoggingClient(c Client) Client

NewLoggingClient returns a new instance of a logging Client.

func NewMetricsClient

func NewMetricsClient(c Client, requestCount metrics.Counter, requestLatency metrics.Histogram) Client

NewMetricsClient returns a new instance of a metrics Client.

func NewTracingClient

func NewTracingClient(c Client) Client

NewTracingClient returns a new instance of a tracing Client.

type GetUserProfileResponse

type GetUserProfileResponse struct {
	OK      bool         `json:"ok"`
	Profile *UserProfile `json:"profile"`
	Error   string       `json:"error"`
}

GetUserProfileResponse represents the api response for retrieving a

type MockClient

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

MockClient is a mock of Client interface

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockClient) GetUserProfile

func (m *MockClient) GetUserProfile(ctx context.Context, userID string) (*UserProfile, error)

GetUserProfile mocks base method

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) GetUserProfile

func (mr *MockClientMockRecorder) GetUserProfile(ctx, userID interface{}) *gomock.Call

GetUserProfile indicates an expected call of GetUserProfile

type SlashCommand

type SlashCommand struct {
	Token          string `form:"token"`
	TeamID         string `form:"team_id"`
	TeamDomain     string `form:"team_domain"`
	EnterpriseID   string `form:"enterprise_id"`
	EnterpriseName string `form:"enterprise_name"`
	ChannelID      string `form:"channel_id"`
	ChannelName    string `form:"channel_name"`
	UserID         string `form:"user_id"`
	UserName       string `form:"user_name"`
	Command        string `form:"command"`
	Text           string `form:"text"`
	ResponseURL    string `form:"response_url"`
}

SlashCommand represents a slash command from Slack

type UserProfile

type UserProfile struct {
	Email string `json:"email"`
}

UserProfile represents a Slack user profile

Jump to

Keyboard shortcuts

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