Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
FormatTime formats a time per the presentation output
func InjectClaims ¶
func InjectClaims(claims MockClaims, next http.Handler) http.Handler
InjectClaims injects claims into the current request
func SetStaticClock ¶
SetStaticClock sets the clock to a static time for testing
Types ¶
type AuthMock ¶
AuthMock contains dependencies for the AuthMock handler
func NewAuthMock ¶
NewAuthMock returns a mock AuthMock struct
type MockAPI ¶
type MockAPI struct { API http.Handler UserRepo usecase.UserRepo TaskRepo usecase.TaskRepo ScheduleRepo usecase.ScheduleRepo }
MockAPI contain the API mock and repos used during setup
type MockClaims ¶
type MockClaims struct { Issuer string Subject string Permissions []auth.Permission }
MockClaims contains static claims to inject in request
type Tester ¶
Tester describes an API struct used to create new test API instances
func NewPostgresTester ¶
func NewPostgresTester() Tester
NewPostgresTester returns a tester struct for creating APIs with a Postgres DB
func NewTransientTester ¶
func NewTransientTester() Tester
NewTransientTester returns a tester struct for creating APIs with a transient in-memory DB
Click to show internal directories.
Click to hide internal directories.