handlers

package
v0.0.0-...-cc299b8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package handlers is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyShortCode    = errors.New("empty short code")
	ErrEmptyRequestBody  = errors.New("empty request body")
	ErrShortCodeNotFound = errors.New("the requested short code not found")
)

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Config *config.Config
	Cache  LongerShorter
}

func LoadEnvironment

func LoadEnvironment() *Environment

func (*Environment) Handle

func (env *Environment) Handle(ctx *fasthttp.RequestCtx)

type LongerShorter

type LongerShorter interface {
	Longer(short []byte) ([]byte, error)
	Shorter(long []byte) ([]byte, error)
}

type MockLongerShorter

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

MockLongerShorter is a mock of LongerShorter interface.

func NewMockLongerShorter

func NewMockLongerShorter(ctrl *gomock.Controller) *MockLongerShorter

NewMockLongerShorter creates a new mock instance.

func (*MockLongerShorter) EXPECT

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

func (*MockLongerShorter) Longer

func (m *MockLongerShorter) Longer(short []byte) ([]byte, error)

Longer mocks base method.

func (*MockLongerShorter) Shorter

func (m *MockLongerShorter) Shorter(long []byte) ([]byte, error)

Shorter mocks base method.

type MockLongerShorterMockRecorder

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

MockLongerShorterMockRecorder is the mock recorder for MockLongerShorter.

func (*MockLongerShorterMockRecorder) Longer

func (mr *MockLongerShorterMockRecorder) Longer(short interface{}) *gomock.Call

Longer indicates an expected call of Longer.

func (*MockLongerShorterMockRecorder) Shorter

func (mr *MockLongerShorterMockRecorder) Shorter(long interface{}) *gomock.Call

Shorter indicates an expected call of Shorter.

Jump to

Keyboard shortcuts

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