28 lines
459 B
Go
28 lines
459 B
Go
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{}
|
|
}
|