service

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

Config holds the configuration values for the backend.

func NewConfig

func NewConfig() *Config

NewConfig loads the config file into the Config struct.

type PaymentService added in v0.0.2

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

PaymentService handles interactions with the payments api

func NewPaymentService added in v0.0.2

func NewPaymentService(c *payments.HTTPClient) *PaymentService

NewPaymentService returns an instance of PaymentService

func (*PaymentService) Pay added in v0.0.2

type ProductService added in v0.0.6

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

ProductService handles interaction with the product API.

func NewProductService added in v0.0.6

func NewProductService(c *hashicups.Client) *ProductService

NewProductService creates a new ProductService.

func (*ProductService) CreateOrder added in v0.0.6

func (s *ProductService) CreateOrder(ois []hashicups.OrderItem, authToken string) (*models.Order, error)

CreateOrder - Create new order

func (*ProductService) GetAllOrders added in v0.0.6

func (s *ProductService) GetAllOrders(authToken string) ([]*models.Order, error)

GetAllOrders - Get all user's order

func (*ProductService) GetCoffee added in v0.0.6

func (s *ProductService) GetCoffee(coffeeID string) (*models.Coffee, error)

GetCoffee returns a specific coffee (list).

func (*ProductService) GetCoffeeIngredients added in v0.0.6

func (s *ProductService) GetCoffeeIngredients(coffeeID string) ([]*models.Ingredient, error)

GetCoffeeIngredients - Returns list of coffee ingredients (no auth required)

func (*ProductService) GetCoffees added in v0.0.6

func (s *ProductService) GetCoffees() ([]*models.Coffee, error)

GetCoffees returns a list of coffees.

func (*ProductService) GetOrder added in v0.0.6

func (s *ProductService) GetOrder(orderID string, authToken string) (*models.Order, error)

GetOrder - Get specific user order

func (*ProductService) HealthCheck added in v0.0.7

func (s *ProductService) HealthCheck() bool

func (*ProductService) SignIn added in v0.0.6

SignIn Get a new token for user.

func (*ProductService) SignOut added in v0.0.6

func (s *ProductService) SignOut(authToken *string) error

SignOut - Revoke the token for a user

func (*ProductService) SignUp added in v0.0.6

SignUp - Create new user, return user token upon successful creation

Jump to

Keyboard shortcuts

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