Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateJWT(userID int) (string, error)
- func Mysql() (*sql.DB, *sqlx.DB, sqlmock.Sqlmock)
- type FakeDB
- type FakeStore
- func (s *FakeStore) CreateFilter(filter.Filter) (filter.Filter, error)
- func (s *FakeStore) CreateWorkerProfile(wp workerprofile.NewProfile) (workerprofile.Profile, error)
- func (s *FakeStore) GetAllFilters(ids []int) (filter.Filters, error)
- func (s *FakeStore) GetWorkerEligibility(workerID string) (filter.FilterWorker, []filter.FilterJob, error)
- func (s *FakeStore) GetWorkerProfile(workerID string) (workerprofile.Profile, error)
- type MockContext
Constants ¶
View Source
const JWT_SECRET = "abc"
Variables ¶
View Source
var EmptyProfile = workerprofile.Profile{Attributes: filter.GroupedFilters{}}
View Source
var FakeFilter = filter.Filter{1, "Gender", "male"}
View Source
var FakeFilters = filter.Filters{FakeFilter}
View Source
var FakeProfile = workerprofile.Profile{ ID: 58, WorkerID: 8, Birthdate: "1982-08-05T00:00:00Z", City: "Lake Verlashire", Locality: "District of Columbia", Country: "Netherlands", Attributes: FakeFilters.GroupByType(), }
Functions ¶
func GenerateJWT ¶
Types ¶
type FakeStore ¶
type FakeStore struct{}
func (*FakeStore) CreateFilter ¶
func (*FakeStore) CreateWorkerProfile ¶
func (s *FakeStore) CreateWorkerProfile(wp workerprofile.NewProfile) (workerprofile.Profile, error)
func (*FakeStore) GetAllFilters ¶
func (*FakeStore) GetWorkerEligibility ¶
func (*FakeStore) GetWorkerProfile ¶
func (s *FakeStore) GetWorkerProfile(workerID string) (workerprofile.Profile, error)
type MockContext ¶
type MockContext struct{}
func (MockContext) Done ¶
func (ctx MockContext) Done() <-chan struct{}
func (MockContext) Err ¶
func (ctx MockContext) Err() error
func (MockContext) Value ¶
func (ctx MockContext) Value(key interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.