base

package
v0.0.0-...-3824bcb Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BadRequest

func BadRequest(c *gin.Context, msg string)

func CheckUUN

func CheckUUN(c *gin.Context, uun string) (success bool)

func IsMealValid

func IsMealValid(starter, main, dessert string) bool

func IsOneOf

func IsOneOf(one string, other ...string) bool

func SendTicketEmail

func SendTicketEmail(c *gin.Context, mailgun mailgun.Mailgun, name, to_address, orderID, authToken string) (_ bool)

func StripeError

func StripeError(err error) string

Types

type API

type API struct {
	Config  *config.Config
	Log     *logrus.Logger
	Gin     *gin.Engine
	Stripe  *client.API
	Mailgun mailgun.Mailgun

	Server *http.Server
}

API contains all the dependencies of the API server

func (*API) Shutdown

func (a *API) Shutdown(ctx context.Context) error

Shutdown shuts down the API

func (*API) Start

func (a *API) Start() error

Start binds the API and starts listening.

type EmailStruct

type EmailStruct struct {
	Name      string
	AuthToken string
	OrderID   string
}

Jump to

Keyboard shortcuts

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