discord

package
v0.0.0-...-9178000 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package discord 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 {
	SendFollowupMessage(ctx context.Context, interactionToken, message string) error
	GetGuildCommands(ctx context.Context, guildID string) ([]map[string]interface{}, error)
	RegisterGuildCommand(ctx context.Context, guildID, commandsJSON string) error
	DeleteGuildCommand(ctx context.Context, guildID, commandID string) error
}

func NewRealClient

func NewRealClient(applicationID, token string) Client

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) DeleteGuildCommand

func (m *MockClient) DeleteGuildCommand(ctx context.Context, guildID, commandID string) error

DeleteGuildCommand mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) GetGuildCommands

func (m *MockClient) GetGuildCommands(ctx context.Context, guildID string) ([]map[string]any, error)

GetGuildCommands mocks base method.

func (*MockClient) RegisterGuildCommand

func (m *MockClient) RegisterGuildCommand(ctx context.Context, guildID, commandsJSON string) error

RegisterGuildCommand mocks base method.

func (*MockClient) SendFollowupMessage

func (m *MockClient) SendFollowupMessage(ctx context.Context, interactionToken, message string) error

SendFollowupMessage mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) DeleteGuildCommand

func (mr *MockClientMockRecorder) DeleteGuildCommand(ctx, guildID, commandID any) *gomock.Call

DeleteGuildCommand indicates an expected call of DeleteGuildCommand.

func (*MockClientMockRecorder) GetGuildCommands

func (mr *MockClientMockRecorder) GetGuildCommands(ctx, guildID any) *gomock.Call

GetGuildCommands indicates an expected call of GetGuildCommands.

func (*MockClientMockRecorder) RegisterGuildCommand

func (mr *MockClientMockRecorder) RegisterGuildCommand(ctx, guildID, commandsJSON any) *gomock.Call

RegisterGuildCommand indicates an expected call of RegisterGuildCommand.

func (*MockClientMockRecorder) SendFollowupMessage

func (mr *MockClientMockRecorder) SendFollowupMessage(ctx, interactionToken, message any) *gomock.Call

SendFollowupMessage indicates an expected call of SendFollowupMessage.

type RealClient

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

func (*RealClient) DeleteGuildCommand

func (c *RealClient) DeleteGuildCommand(
	ctx context.Context,
	guildID, commandID string,
) error

func (*RealClient) GetGuildCommands

func (c *RealClient) GetGuildCommands(
	ctx context.Context,
	guildID string,
) ([]map[string]interface{}, error)

func (*RealClient) RegisterGuildCommand

func (c *RealClient) RegisterGuildCommand(
	ctx context.Context,
	guildID string,
	commandsJSON string,
) error

func (*RealClient) SendFollowupMessage

func (c *RealClient) SendFollowupMessage(
	ctx context.Context,
	interactionToken, message string,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳