Documentation ¶
Index ¶
- Variables
- func Module() fx.Option
- type Auth
- func (s Auth) AuthByLoginInput(ctx context.Context, args model.LoginInput) (*model.User, error)
- func (s Auth) AuthByToken(ctx context.Context, token string) (*model.User, error)
- func (s Auth) CreateUser(ctx context.Context, args model.CreateUserInput) (*model.User, error)
- func (s Auth) CurrentUser(ctx context.Context) (*model.User, error)
- func (s Auth) SetUserToken(ctx context.Context, user *model.User) error
- type Directive
- type Event
- func (s Event) CalculateStats(ctx context.Context, researchID string, filterInput string, ...) (*model.GroupCountResult, error)
- func (s Event) CreateEvent(ctx context.Context, event *model.Event) error
- func (s Event) CreateEventFromInput(ctx context.Context, input *model.NewEvent) (*model.Event, error)
- func (s Event) GetEvent(ctx context.Context, eventID string) (*model.Event, error)
- func (s Event) GetEvents(ctx context.Context) ([]*model.Event, error)
- func (s Event) GetEventsByResearchID(ctx context.Context, researchID string) ([]*model.Event, error)
- func (s Event) GetPaginatedEvents(ctx context.Context, researchID string, first int, after string) (*model.EventsConnection, error)
- type JWT
- type Mail
- type Research
- type SendEmailRequest
- type Turnstile
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpiredToken = errors.New("token expired") JWTSigningMethod = jwt.SigningMethodES512 )
Functions ¶
Types ¶
type Auth ¶
type Auth struct { fx.In Config *appconfig.Config UserRepo repo.User JWT JWT Turnstile Turnstile MailService Mail }
func (Auth) AuthByLoginInput ¶
func (Auth) AuthByToken ¶
func (Auth) CreateUser ¶
type Directive ¶
type Event ¶
func (Event) CalculateStats ¶
func (s Event) CalculateStats(ctx context.Context, researchID string, filterInput string, resultMappingInput string) (*model.GroupCountResult, error)
*
- CalculateStats filters events by filterInput and maps every event to a result using resultMappingInput, then group by result and count
- @param {string} filterInput can be jsonLogic or expr expression, depends on the filter implementation
- @param {string} resultMappingInput must be an expr expression
func (Event) CreateEvent ¶
func (Event) CreateEventFromInput ¶
func (Event) GetEventsByResearchID ¶
type Research ¶
func (Research) GetAllResearch ¶
type SendEmailRequest ¶
type Turnstile ¶
func NewTurnstile ¶
Click to show internal directories.
Click to hide internal directories.