moq/example/example.go

18 lines
333 B
Go
Raw Normal View History

2016-08-29 14:00:18 +02:00
package example
import "context"
//go:generate moq -out mockpersonstore_test.go PersonStore
2016-08-31 14:05:37 +02:00
2016-08-29 14:00:18 +02:00
type Person struct {
ID string
Name string
Company string
Website string
}
type PersonStore interface {
2016-08-29 14:09:34 +02:00
Get(ctx context.Context, id string) (*Person, error)
2016-08-29 14:00:18 +02:00
Create(ctx context.Context, person *Person, confirm bool) error
}