server

package
v0.0.0-...-a12eb83 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProduct

func CreateProduct(w http.ResponseWriter, req *http.Request)

func GetProduct

func GetProduct(w http.ResponseWriter, req *http.Request)

func GetProducts

func GetProducts(w http.ResponseWriter, req *http.Request)

func RegisterHandlers

func RegisterHandlers()

Types

type BookDTO

type BookDTO struct {
	BookId      string `` /* 129-byte string literal not displayed */
	ISBN        string `json:"isbn" validate:"nonzero"`
	Title       string `json:"title" validate:"nonzero"`
	Description string `json:"description" validate:"nonzero"`
}

func (*BookDTO) ToDomain

func (dto *BookDTO) ToDomain() domain.Book

type ProductDTO

type ProductDTO struct {
	ProductId           string  `` /* 132-byte string literal not displayed */
	Book                BookDTO `json:"book" validate:"nonzero"`
	Price               uint64  `json:"price" validate:"min=0"`
	PublisherContractId string  `` /* 142-byte string literal not displayed */
}

func NewProductDTO

func NewProductDTO(product domain.Product) ProductDTO

func (*ProductDTO) ToDomain

func (dto *ProductDTO) ToDomain() domain.Product

Jump to

Keyboard shortcuts

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