First commit, basic SQLite store, worker, and server
This commit is contained in:
commit
baacf30c6d
7 changed files with 319 additions and 0 deletions
20
fakes.go
Normal file
20
fakes.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type fakeST struct {
|
||||
dept string
|
||||
err error
|
||||
chapterID int64
|
||||
}
|
||||
|
||||
func (f *fakeST) GetUser(ctx context.Context, id int64) (*User, error) {
|
||||
if f.err != nil {
|
||||
return nil, f.err
|
||||
}
|
||||
return &User{ID: id, ChapterID: f.chapterID, Department: f.dept}, nil
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue