ToyBoomServer/dao/interface.go
2024-09-02 18:07:30 +00:00

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{}
}