decoders

package
v0.5.23 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknown   = fmt.Errorf("unknown decoder faced")
	ErrNoAmmo    = fmt.Errorf("no ammo in file")
	ErrAmmoLimit = fmt.Errorf("ammo limit faced")
	ErrPassLimit = fmt.Errorf("passes limit faced")
)

Functions

This section is empty.

Types

type DecodedAmmo added in v0.5.6

type DecodedAmmo interface {
	BuildRequest() (*http.Request, error)
	Tag() string
}

type Decoder

type Decoder interface {
	Scan(context.Context) (DecodedAmmo, error)
	Release(a core.Ammo)
	LoadAmmo(context.Context) ([]DecodedAmmo, error)
}

func NewDecoder

func NewDecoder(conf config.Config, file io.ReadSeeker) (d Decoder, err error)

type MockDecoder added in v0.5.6

type MockDecoder struct {
	mock.Mock
}

MockDecoder is an autogenerated mock type for the Decoder type

func NewMockDecoder added in v0.5.6

func NewMockDecoder(t mockConstructorTestingTNewMockDecoder) *MockDecoder

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

func (*MockDecoder) LoadAmmo added in v0.5.6

func (_m *MockDecoder) LoadAmmo(_a0 context.Context) ([]DecodedAmmo, error)

LoadAmmo provides a mock function with given fields: _a0

func (*MockDecoder) Release added in v0.5.6

func (_m *MockDecoder) Release(a core.Ammo)

Release provides a mock function with given fields: a

func (*MockDecoder) Scan added in v0.5.6

func (_m *MockDecoder) Scan(_a0 context.Context) (DecodedAmmo, error)

Scan provides a mock function with given fields: _a0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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