Created
November 7, 2019 02:51
-
-
Save manakuro/f171b896cef6e9d093738c18bcc1762a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package registry | |
import ( | |
"github.com/jinzhu/gorm" | |
"github.com/manakuro/golang-clean-architecture/interface/controller" | |
) | |
type registry struct { | |
db *gorm.DB | |
} | |
type Registry interface { | |
NewAppController() controller.AppController | |
} | |
func NewRegistry(db *gorm.DB) Registry { | |
return ®istry{db} | |
} | |
func (r *registry) NewAppController() controller.AppController { | |
return r.NewUserController() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment