handler

package
v0.0.0-...-49df4db Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s Storage, m Math) *calculator

Types

type Math

type Math interface {
	Calculate(ctx context.Context, calculation *pb.Calculation) error
}

type Storage

type Storage interface {
	CreateCalculation(ctx context.Context, owner, expression string) (*domain.Calculation, error)
	GetCalculation(ctx context.Context, id uint) (*domain.Calculation, error)
	GetCalculations(ctx context.Context) ([]*domain.Calculation, error)
	UpdateResult(ctx context.Context, id uint, result float64) error
}

Jump to

Keyboard shortcuts

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