calculation

package
v0.0.0-...-1fb2f59 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(svc domain.CalcService) *Controller

func (*Controller) Calculate

func (c *Controller) Calculate(ctx iris.Context)

type Service

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

func NewService

func NewService() *Service

func (*Service) Calculate

func (s *Service) Calculate(userLevel, userPoints, price int) (int, int, error)

type StrategyA

type StrategyA struct {
}

func NewStrategyA

func NewStrategyA() *StrategyA

func (*StrategyA) Calculate

func (s *StrategyA) Calculate(level, points, price int) (int, int)

type StrategyB

type StrategyB struct {
}

func NewStrategyB

func NewStrategyB() *StrategyB

func (*StrategyB) Calculate

func (s *StrategyB) Calculate(level, points, price int) (int, int)

Jump to

Keyboard shortcuts

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