vproductapp

package
v0.0.0-...-8f457be Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package vproductapp maintains the app layer api for the vproduct domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(app *web.App, cfg Config)

Routes adds specific routes for this group.

Types

type Config

type Config struct {
	Log         *logger.Logger
	UserBus     *userbus.Business
	VProductBus *vproductbus.Business
	AuthClient  *authclient.Client
}

Config contains all the mandatory systems required by handlers.

type Product

type Product struct {
	ID          string  `json:"id"`
	UserID      string  `json:"userID"`
	Name        string  `json:"name"`
	Cost        float64 `json:"cost"`
	Quantity    int     `json:"quantity"`
	DateCreated string  `json:"dateCreated"`
	DateUpdated string  `json:"dateUpdated"`
	UserName    string  `json:"userName"`
}

Product represents information about an individual product with extended information.

func (Product) Encode

func (app Product) Encode() ([]byte, string, error)

Encode implements the encoder interface.

Jump to

Keyboard shortcuts

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