init repo
This commit is contained in:
27
dao/interface.go
Normal file
27
dao/interface.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/nose7en/ToyBoomServer/defs"
|
||||
)
|
||||
|
||||
type Query interface {
|
||||
GetUserByAppleUserID(appleUserID string) (defs.UserGettable, error)
|
||||
}
|
||||
|
||||
type Mutation interface {
|
||||
CreateUser(user defs.UserGettable) error
|
||||
}
|
||||
|
||||
var _ Query = (*queryImpl)(nil)
|
||||
var _ Mutation = (*mutationImpl)(nil)
|
||||
|
||||
type queryImpl struct{}
|
||||
type mutationImpl struct{}
|
||||
|
||||
func NewQuery() Query {
|
||||
return &queryImpl{}
|
||||
}
|
||||
|
||||
func NewMutation() Mutation {
|
||||
return &mutationImpl{}
|
||||
}
|
13
dao/user.go
Normal file
13
dao/user.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package dao
|
||||
|
||||
import "github.com/nose7en/ToyBoomServer/defs"
|
||||
|
||||
func (q *queryImpl) GetUserByAppleUserID(appleUserID string) (defs.UserGettable, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *mutationImpl) CreateUser(user defs.UserGettable) error {
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user