command

package
v0.0.0-...-cde25c5 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrImageNotFound = errors.New("image was not found.")

Functions

This section is empty.

Types

type CustomSearchRepository

type CustomSearchRepository interface {
	SearchImage(ctx context.Context, query string) (*customsearch.Result, error)
	LGTM(ctx context.Context, query string) (io.Reader, error)
}

type DokkoiCmd

type DokkoiCmd interface {
	ExecString(ctx context.Context) (string, error)
	ExecFile(ctx context.Context) (io.Reader, error)
	SendType() string
}

type ScoreRepository

type ScoreRepository interface {
	LastUsername() string
	Incr(ctx context.Context, username string) (int64, error)
	Decr(ctx context.Context, username string) (int64, error)
	UserScore(ctx context.Context, username string) (int64, error)
}

type Service

type Service interface {
	GetCommand(content string) DokkoiCmd
}

func NewService

func NewService(customSearchRepo CustomSearchRepository, scoreRepo ScoreRepository) Service

Directories

Path Synopsis
Package mock_command is a generated GoMock package.
Package mock_command is a generated GoMock package.

Jump to

Keyboard shortcuts

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