internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectionTimeSecs = 60

Variables

This section is empty.

Functions

This section is empty.

Types

type CartClient

type CartClient struct {
	GrpcConn *grpc.ClientConn
	// contains filtered or unexported fields
}

func NewCartClient

func NewCartClient(cartAddress string, cartPort string, staticTimeoutMillis *int, metric *metrics.TimeoutMetric) *CartClient

func (CartClient) AddToCart

func (cartClient CartClient) AddToCart(c *gin.Context, cb *gobreaker.CircuitBreaker)

AddToCart sends amqp message to insert an articleID into an existing cart

func (CartClient) CreateCart

func (cartClient CartClient) CreateCart(c *gin.Context, cb *gobreaker.CircuitBreaker)

CreateCart sends grpc request to create a cart to the cart service

func (CartClient) GetCart

func (cartClient CartClient) GetCart(c *gin.Context, cb *gobreaker.CircuitBreaker)

GetCart sends grpc request to get all articleID's inside the requested cartID

type CatalogueClient

type CatalogueClient struct {
	Conn *grpc.ClientConn
	// contains filtered or unexported fields
}

func NewCatalogueClient

func NewCatalogueClient(catalogueAddress string, cataloguePort string, staticTimeoutMillis *int, metric *metrics.TimeoutMetric) *CatalogueClient

func (CatalogueClient) GetArticles

func (catalogueClient CatalogueClient) GetArticles(c *gin.Context, cb *gobreaker.CircuitBreaker)

GetArticles creates a grpc request to fetch all articles from the catalogue service

type CurrencyClient

type CurrencyClient struct {
	Conn *grpc.ClientConn
	// contains filtered or unexported fields
}

func NewCurrencyClient

func NewCurrencyClient(currencyAddress string, currencyPort string, staticTimeoutMillis *int, metric *metrics.TimeoutMetric) *CurrencyClient

func (CurrencyClient) GetExchangeRate

func (currencyClient CurrencyClient) GetExchangeRate(c *gin.Context, cb *gobreaker.CircuitBreaker)

GetExchangeRate validates client request and creates grpc request to the service

type OrderClient

type OrderClient struct {
	Conn *grpc.ClientConn
	// contains filtered or unexported fields
}

func NewOrderClient

func NewOrderClient(orderAddress string, orderPort string, staticTimeoutMillis *int, metric *metrics.TimeoutMetric) *OrderClient

func (OrderClient) CreateOrder

func (orderClient OrderClient) CreateOrder(c *gin.Context, cb *gobreaker.CircuitBreaker)

CreateOrder sends grpc request to create an order with the required data

func (OrderClient) GetOrder

func (orderClient OrderClient) GetOrder(c *gin.Context, cb *gobreaker.CircuitBreaker)

GetOrder sends grpc request to fetch an order from order service

Jump to

Keyboard shortcuts

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