views

package
v0.0.0-...-10fd409 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealtcheckHandler

func HealtcheckHandler(c *gin.Context)

Types

type QuoteHandler

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

func NewQuoteHandler

func NewQuoteHandler(slackClient SlackClient, secrets SecretsVerifier) *QuoteHandler

func (*QuoteHandler) GetRandomQuote

func (handler *QuoteHandler) GetRandomQuote() string

func (*QuoteHandler) QuoteServe

func (handler *QuoteHandler) QuoteServe(c *gin.Context)

type SecretsVerifier

type SecretsVerifier interface {
	VerifySecret(*gin.Context) error
}

type SecretsVerifierMock

type SecretsVerifierMock struct {
	mock.Mock
}

SecretsVerifierMock is an autogenerated mock type for the SecretsVerifier type

func NewSecretsVerifierMock

func NewSecretsVerifierMock(t testing.TB) *SecretsVerifierMock

NewSecretsVerifierMock creates a new instance of SecretsVerifierMock. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*SecretsVerifierMock) VerifySecret

func (_m *SecretsVerifierMock) VerifySecret(_a0 *gin.Context) error

VerifySecret provides a mock function with given fields: _a0

type SlackClient

type SlackClient interface {
	SendMessage(channel string, options ...slack.MsgOption) (string, string, string, error)
}

type SlackClientMock

type SlackClientMock struct {
	mock.Mock
}

SlackClientMock is an autogenerated mock type for the SlackClient type

func NewSlackClientMock

func NewSlackClientMock(t testing.TB) *SlackClientMock

NewSlackClientMock creates a new instance of SlackClientMock. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*SlackClientMock) SendMessage

func (_m *SlackClientMock) SendMessage(channel string, options ...slack.MsgOption) (string, string, string, error)

SendMessage provides a mock function with given fields: channel, options

type SlackSecretsVerifier

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

func NewSlackSecretsVerifier

func NewSlackSecretsVerifier(secret string) *SlackSecretsVerifier

func (*SlackSecretsVerifier) VerifySecret

func (secretsManager *SlackSecretsVerifier) VerifySecret(c *gin.Context) error

type SlashCommand

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

Jump to

Keyboard shortcuts

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