product

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package product model the database table Product with all used attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	ID           string
	PriceInCents int64
}

Product represents the product modeled on this service DB. Contains only needed information for the service.

func FetchByID

func FetchByID(id string) (p *Product, err error)

FetchByID retrieve a product from DB, using his ID as key.

func New

func New(id string, price int64) (p *Product)

New creates a new product, using information received.

Jump to

Keyboard shortcuts

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