Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { *handlers.BaseHandler Customer *helpers.Customer Plan *helpers.Plan Roaster *helpers.Roaster }
Customer implements CustomerI using stripe and coinage helpers
func (*Customer) Delete ¶
func (c *Customer) Delete(ctx *gin.Context)
Delete implements CustomerI.Delete
func (*Customer) Subscribe ¶
func (c *Customer) Subscribe(ctx *gin.Context)
Subscribe implements CustomerI.Subscribe
func (*Customer) Unsubscribe ¶
func (c *Customer) Unsubscribe(ctx *gin.Context)
Unsubscribe is not implemented
type CustomerI ¶
type CustomerI interface { /*New creates a new customer or updates the payment info, sending it back on success*/ New(ctx *gin.Context) /*View sends the customer with the given ID as a response*/ View(ctx *gin.Context) /*View all sends a list of customers*/ ViewAll(ctx *gin.Context) /*Delete removes the customer with the given ID*/ Delete(ctx *gin.Context) /*Subscribe creates a new subscription for the cusutomer*/ Subscribe(ctx *gin.Context) /*Unsubscribe removes a sucbsription from a customer*/ Unsubscribe(ctx *gin.Context) /*Time tracks the length of execution for each call in the handler*/ Time() gin.HandlerFunc /*GetJWT checks the JWT of a request*/ GetJWT() gin.HandlerFunc }
CustomerI describes the customer handler interface
func NewCustomer ¶
func NewCustomer(ctx *handlers.GatewayContext) CustomerI
NewCustomer creates and returns a new customer using the given context
type Event ¶
type Event struct { *handlers.BaseHandler Plan *helpers.Plan Roaster *helpers.Roaster Event helpers.Event }
Event implements EventI with coinage helpers
type EventI ¶
type EventI interface { Handle(*gin.Context) /*Time tracks the length of execution for each call in the handler*/ Time() gin.HandlerFunc }
EventI handles webhook requests from stripe
func NewEvent ¶
func NewEvent(ctx *handlers.GatewayContext) EventI
NewEvent initializes and returns a plan with the given gateways
type PlanI ¶
type PlanI interface { /*New creates a new plan associated with a given roaster*/ New(ctx *gin.Context) /*view returns details a about all plans for a given roaster*/ View(ctx *gin.Context) /*ViewAll returns a list of all available plans*/ ViewAll(ctx *gin.Context) /*Update resets the plan information*/ Update(ctx *gin.Context) /*Delete removes the plan*/ Delete(ctx *gin.Context) /*Time tracks the length of execution for each call in the handler*/ Time() gin.HandlerFunc /*GetJWT checks the JWT of a request*/ GetJWT() gin.HandlerFunc }
PlanI describes the requests about billing plans that
can be handled
func NewPlan ¶
func NewPlan(ctx *handlers.GatewayContext) PlanI
NewPlan initializes and returns a plan with the given gateways
type Roaster ¶
type Roaster struct { *handlers.BaseHandler Roaster *helpers.Roaster }
Roaster implements RoasterI
func (*Roaster) Deactivate ¶
func (c *Roaster) Deactivate(ctx *gin.Context)
Deactivate is not implemented
type RoasterI ¶
type RoasterI interface { /*New creates a new roaster billing account, sending the result*/ New(ctx *gin.Context) /*View sends the roaster account with the given ID*/ View(ctx *gin.Context) /*Update sets the propperties of a roaster account, sending the update*/ Update(ctx *gin.Context) /*Deactivate removes a roaster account from coinage*/ Deactivate(ctx *gin.Context) /*Time tracks the duration of each handled request*/ Time() gin.HandlerFunc /*GetJWT checks the JWT of a request*/ GetJWT() gin.HandlerFunc }
RoasterI describes the roaster requests that Coinage can handle
func NewRoaster ¶
func NewRoaster(ctx *handlers.GatewayContext) RoasterI
NewRoaster returns a new roaster with the given gateways