example

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package example. Just data types for testing in here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeRecorderDispatch

func TypeRecorderDispatch(disp Source, rec []byte) error

TypeRecorderDispatch dispatches encoded data made with TypeRecorder

Types

type EncDec

type EncDec bool

EncDec auto-apply type.

func (*EncDec) Decode

func (x *EncDec) Decode(rec []byte) ([]byte, error)

Decode to auto-apply decoding.

func (EncDec) Encode

func (x EncDec) Encode(buf []byte) []byte

Encode to auto-apply encoding.

func (EncDec) Len

func (x EncDec) Len() int

Len to auto-apply encoding.

type Index added in v0.1.0

type Index struct {
	Term  uint64
	Index uint64
}

Index to be handled by custom type handler.

type Source added in v0.1.2

type Source interface {
	Fixeds(a bool, b int32, c uint16, d float64, e [12]byte) error
	Vars(a string, b []byte, c intypes.VI16, d intypes.VU32, e EncDec, id Index) error
}

Source interface to generate testing stuff.

type SourceMock added in v0.1.2

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

SourceMock interface github.com/sirkon/olrgen/example/internal/example.Source mock

func NewSourceMock added in v0.1.2

func NewSourceMock(ctrl *gomock.Controller) *SourceMock

NewSourceMock creates SourceMock instance

func (*SourceMock) EXPECT added in v0.1.2

func (m *SourceMock) EXPECT() *SourceMockRecorder

EXPECT returns expected calls recorder

func (*SourceMock) Fixeds added in v0.1.2

func (m *SourceMock) Fixeds(a bool, b int32, c uint16, d float64, e [12]byte) (err error)

Fixeds method to implement github.com/sirkon/olrgen/example/internal/example.Source

func (*SourceMock) Vars added in v0.1.2

func (m *SourceMock) Vars(a string, b []byte, c int16, d uint32, e EncDec, id Index) (err error)

Vars method to implement github.com/sirkon/olrgen/example/internal/example.Source

type SourceMockRecorder added in v0.1.2

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

SourceMockRecorder records expected calls of github.com/sirkon/olrgen/example/internal/example.Source

func (*SourceMockRecorder) Fixeds added in v0.1.2

func (mr *SourceMockRecorder) Fixeds(a, b, c, d, e any) *gomock.Call

Fixeds register expected call of method github.com/sirkon/olrgen/example/internal/example.Source.Fixeds

func (*SourceMockRecorder) FixedsWhatever added in v0.1.2

func (mr *SourceMockRecorder) FixedsWhatever() *gomock.Call

FixedsWhatever records a call with arbitrary arguments.

func (*SourceMockRecorder) Vars added in v0.1.2

func (mr *SourceMockRecorder) Vars(a, b, c, d, e, id any) *gomock.Call

Vars register expected call of method github.com/sirkon/olrgen/example/internal/example.Source.Vars

func (*SourceMockRecorder) VarsWhatever added in v0.1.2

func (mr *SourceMockRecorder) VarsWhatever() *gomock.Call

VarsWhatever records a call with arbitrary arguments.

type TypeRecorder

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

TypeRecorder implement

func (*TypeRecorder) Fixeds

func (t *TypeRecorder) Fixeds(a bool, b int32, c uint16, d float64, e [12]byte) []byte

Fixeds encodes arguments tuple of this method.

func (*TypeRecorder) Vars

func (t *TypeRecorder) Vars(a string, b []byte, c int16, d uint32, e EncDec, id Index) []byte

Vars encodes arguments tuple of this method.

Jump to

Keyboard shortcuts

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