init repo

This commit is contained in:
VaalaCat
2024-08-28 00:02:28 +08:00
committed by vaalacat
commit 13148b95e3
97 changed files with 10214 additions and 0 deletions

27
dao/interface.go Normal file
View 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
View 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
}