Documentation ¶
Index ¶
- func AuthFunc(ctx context.Context, payload interface{}) (interface{}, error)
- func AuthServer(login, password, token string) *httptest.Server
- func BalanceFunc(ctx context.Context, payload interface{}) (interface{}, error)
- func BalanceServer(token string, balance int) *httptest.Server
- func NewAuthTask(id task.ID, url, login, password string) *task.Task
- func NewBalanceTask(id task.ID, url string, tokenKey task.ID) *task.Task
- type AuthReq
- type AuthResp
- type BalanceReq
- type BalanceResp
- type MockedStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthServer ¶
AuthServer implements test auth server
func BalanceFunc ¶
BalanceFunc example implementation of business logic
func BalanceServer ¶
BalanceServer implements test auth server
func NewAuthTask ¶
NewAuthTask creates auth task
Types ¶
type AuthReq ¶
type AuthReq struct { Login string `json:"login"` Password string `json:"password"` // contains filtered or unexported fields }
AuthReq auth example request
type BalanceReq ¶
type BalanceReq struct {
// contains filtered or unexported fields
}
BalanceReq example balance request
type BalanceResp ¶
BalanceResp example balance response
type MockedStorage ¶
MockedStorage mocks storage
func NewMockedStorage ¶
func NewMockedStorage() *MockedStorage
NewMockedStorage creates MockedStorage
Click to show internal directories.
Click to hide internal directories.