order

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package order keeps the orders of the example in memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	ID   string `json:"id"`
	Item string `json:"item"`
}

Order is an order of one item.

type Service

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

Service stores the orders.

func NewService

func NewService() *Service

NewService provides the order service. @Provide(index=0)

func (*Service) Create

func (s *Service) Create(item string) Order

Create stores a new order of item.

func (*Service) Get

func (s *Service) Get(id string) (Order, bool)

Get returns the order with id.

Jump to

Keyboard shortcuts

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