All Projects → gobuffalo → buffalo-pop

gobuffalo / buffalo-pop

Licence: MIT license
A plugin to use gobuffalo/pop with buffalo

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to buffalo-pop

Inbucket
Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.
Stars: ✭ 685 (+3505.26%)
Mutual labels:  pop
Ninaselectionview
Way to select your buttons.
Stars: ✭ 87 (+357.89%)
Mutual labels:  pop
Facebook Pop Tutorial
Facebook's Pop Framework, By Examples
Stars: ✭ 181 (+852.63%)
Mutual labels:  pop
Pop Snapkit
[deprecated] Use SnapKit with the Facebook Pop animation framework.
Stars: ✭ 18 (-5.26%)
Mutual labels:  pop
Validate
This package provides a framework for writing validations for Go applications.
Stars: ✭ 57 (+200%)
Mutual labels:  pop
Jxpopupview
一个轻量级的自定义视图弹出框架
Stars: ✭ 117 (+515.79%)
Mutual labels:  pop
Jdanimationkit
Animate easy and with less code with Swift
Stars: ✭ 611 (+3115.79%)
Mutual labels:  pop
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+1105.26%)
Mutual labels:  pop
Gknavigationcontroller
iOS自定义导航栏-导航条联动(仿网易新闻、网易云音乐等导航栏滑动效果)
Stars: ✭ 57 (+200%)
Mutual labels:  pop
Persistentbottomnavbar
A highly customizable persistent bottom navigation bar for Flutter
Stars: ✭ 165 (+768.42%)
Mutual labels:  pop
Blog App Buffalo
A blogging app built with Buffalo.
Stars: ✭ 27 (+42.11%)
Mutual labels:  pop
Notificationbanner
Easy to use pop up notification banner for in app local notification.
Stars: ✭ 55 (+189.47%)
Mutual labels:  pop
Xlbubbletransition
iOS ViewController间切换的转场动画
Stars: ✭ 127 (+568.42%)
Mutual labels:  pop
Ybpopupmenu
快速集成popupMenu
Stars: ✭ 816 (+4194.74%)
Mutual labels:  pop
Tfpopup
🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.
Stars: ✭ 182 (+857.89%)
Mutual labels:  pop
Popping
A collection of animation examples for iOS apps.
Stars: ✭ 5,587 (+29305.26%)
Mutual labels:  pop
Fizz
A Common DSL for Migrating Databases
Stars: ✭ 92 (+384.21%)
Mutual labels:  pop
PimplePopper
Game to pop pimples using the awesome Godot Engine
Stars: ✭ 23 (+21.05%)
Mutual labels:  pop
Spstorkcontroller
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,494 (+13026.32%)
Mutual labels:  pop
Magma
The magma server daemon, is an encrypted email system with support for SMTP, POP, IMAP, HTTP and MOLTEN,. Additional support for DMTP and DMAP is currently in active development.
Stars: ✭ 1,740 (+9057.89%)
Mutual labels:  pop

GoDoc Go Report Card

github.com/gobuffalo/buffalo-pop

This is the home for all things that combine Buffalo and Pop.

Installation

go install github.com/gobuffalo/buffalo-pop/v3@latest

Or with SQLite 3 support:

go get -tags sqlite -v github.com/gobuffalo/buffalo-pop/v3

Transaction Middleware

The popmw.Transaction will wrap each request inside of a new database transaction and automatically commit, or rollback, based on whether or not an error was returned from an upstream buffalo.Handler or buffalo.MiddlewareFunc.

Usage

First you need to add the middleware to your application giving it access to your *pop.Connection, typically found at models.DB.

import "github.com/gobuffalo/buffalo-pop/v3/pop/popmw"

func App() *buffalo.App {
  // ...
  app.Use(popmw.Transaction(models.DB))
  // ...
}

Once added to the middleware stack for your application you can then use this transaction in upstream middleware or handlers.

func MyHandler(c buffalo.Context) error {
  // Get the DB connection from the context
  tx, ok := c.Value("tx").(*pop.Connection)
  if !ok {
    return errors.New("no transaction found")
  }
}

WARNING: DO NOT OPEN MULTIPLE TRANSACTIONS WITHIN EACH OTHER - doing so will cause many, many, many problems.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].