init server

This commit is contained in:
2021-11-03 14:10:58 +01:00
commit 4f9782785d
1603 changed files with 519678 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package sharedaccount
import "nos-comptes/internal/storage/dao/postgresql"
type Database struct {
*postgresql.DatabasePostgreSQL
}
func NewDatabase(db *postgresql.DatabasePostgreSQL) *Database {
return &Database{db}
}

View File

@@ -0,0 +1,37 @@
package sharedaccount
import (
"nos-comptes/handler"
"nos-comptes/internal/storage/dao/postgresql"
"github.com/gin-gonic/gin"
)
type Context struct {
service *Service
db *Database
*handler.Context
}
func (c *Context) ShareAnAccount(context *gin.Context) {
}
func (c *Context) DeleteSharedAccount(context *gin.Context) {
}
func (c *Context) GetAllSharedAccountOfUser(context *gin.Context) {
}
func (c *Context) GetSpecificSharedAccountOfUser(context *gin.Context) {
}
func NewHandler(ctx *handler.Context, db *postgresql.DatabasePostgreSQL) *Context {
database := NewDatabase(db)
service := NewService(database)
return &Context{service: service, db: database, Context: ctx}
}

View File

@@ -0,0 +1,4 @@
package sharedaccount
type SharedAccount struct {
}

View File

@@ -0,0 +1,9 @@
package sharedaccount
type Service struct {
Db *Database
}
func NewService(database *Database) *Service {
return &Service{Db: database}
}