Documentation
¶
Index ¶
- Variables
- type API
- func (api *API) CheckSession(ctx context.Context) (apimodels.CheckSessionRes, error)
- func (api *API) CreateAnonSession(ctx context.Context) (apimodels.CreateAnonSessionRes, error)
- func (api *API) CreateSession(ctx context.Context, req *apimodels.LoginForm) (apimodels.CreateSessionRes, error)
- func (api *API) CredentialsRoleFromModel(role models.CredentialsRole) apimodels.CredentialsRole
- func (api *API) CredentialsRoleToModel(role apimodels.CredentialsRole) models.CredentialsRole
- func (api *API) EmailExists(ctx context.Context, params apimodels.EmailExistsParams) (apimodels.EmailExistsRes, error)
- func (api *API) GetUser(ctx context.Context, params apimodels.GetUserParams) (apimodels.GetUserRes, error)
- func (api *API) Healthcheck(ctx context.Context) (apimodels.HealthcheckRes, error)
- func (api *API) ListUsers(ctx context.Context, params apimodels.ListUsersParams) (apimodels.ListUsersRes, error)
- func (api *API) NewError(ctx context.Context, err error) *apimodels.UnexpectedErrorStatusCode
- func (api *API) Ping(_ context.Context) (apimodels.PingRes, error)
- func (api *API) RefreshSession(ctx context.Context, params apimodels.RefreshSessionParams) (apimodels.RefreshSessionRes, error)
- func (api *API) Register(ctx context.Context, req *apimodels.RegisterForm) (apimodels.RegisterRes, error)
- func (api *API) RequestEmailUpdate(ctx context.Context, req *apimodels.RequestEmailUpdateForm) (apimodels.RequestEmailUpdateRes, error)
- func (api *API) RequestPasswordReset(ctx context.Context, req *apimodels.RequestPasswordResetForm) (apimodels.RequestPasswordResetRes, error)
- func (api *API) RequestRegistration(ctx context.Context, req *apimodels.RequestRegistrationForm) (apimodels.RequestRegistrationRes, error)
- func (api *API) ResetPassword(ctx context.Context, req *apimodels.ResetPasswordForm) (apimodels.ResetPasswordRes, error)
- func (api *API) UpdateEmail(ctx context.Context, req *apimodels.UpdateEmailForm) (apimodels.UpdateEmailRes, error)
- func (api *API) UpdatePassword(ctx context.Context, req *apimodels.UpdatePasswordForm) (apimodels.UpdatePasswordRes, error)
- func (api *API) UpdateRole(ctx context.Context, req *apimodels.UpdateRoleForm) (apimodels.UpdateRoleRes, error)
- type ConsumeRefreshTokenService
- type EmailExistsService
- type GetUserService
- type ListUsersService
- type LoginAnonService
- type LoginService
- type RegisterService
- type RequestEmailUpdateService
- type RequestPasswordResetService
- type RequestRegisterService
- type SecurityHandler
- type UpdateEmailService
- type UpdatePasswordService
- type UpdateRoleService
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrForbidden = &apimodels.UnexpectedErrorStatusCode{ StatusCode: http.StatusForbidden, Response: apimodels.UnexpectedError{Error: "Forbidden"}, }
View Source
var ErrInternalServerError = &apimodels.UnexpectedErrorStatusCode{ StatusCode: http.StatusInternalServerError, Response: apimodels.UnexpectedError{Error: "internal server error"}, }
View Source
StatusCode: http.StatusUnauthorized, Response: apimodels.UnexpectedError{Error: "Unauthorized"}, }
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
apimodels.UnimplementedHandler
LoginService LoginService
LoginAnonService LoginAnonService
ConsumeRefreshTokenService ConsumeRefreshTokenService
RequestEmailUpdateService RequestEmailUpdateService
RequestPasswordResetService RequestPasswordResetService
RequestRegisterService RequestRegisterService
RegisterService RegisterService
EmailExistsService EmailExistsService
UpdateEmailService UpdateEmailService
UpdatePasswordService UpdatePasswordService
UpdateRoleService UpdateRoleService
ListUsersService ListUsersService
GetUserService GetUserService
JKClient *jkApiModels.Client
SMTPClient smtp.Sender
}
func (*API) CheckSession ¶
func (*API) CreateAnonSession ¶
func (*API) CreateSession ¶
func (*API) CredentialsRoleFromModel ¶
func (api *API) CredentialsRoleFromModel(role models.CredentialsRole) apimodels.CredentialsRole
func (*API) CredentialsRoleToModel ¶
func (api *API) CredentialsRoleToModel(role apimodels.CredentialsRole) models.CredentialsRole
func (*API) EmailExists ¶
func (*API) Healthcheck ¶
func (*API) RefreshSession ¶
func (*API) RequestEmailUpdate ¶
func (*API) RequestPasswordReset ¶
func (*API) RequestRegistration ¶
func (*API) ResetPassword ¶
func (*API) UpdateEmail ¶
func (*API) UpdatePassword ¶
type EmailExistsService ¶
type GetUserService ¶
type ListUsersService ¶
type LoginAnonService ¶
type LoginService ¶
type RegisterService ¶
type RequestRegisterService ¶
type SecurityHandler ¶
type SecurityHandler struct {
// contains filtered or unexported fields
}
func NewSecurity ¶
func NewSecurity( source pkg.AuthenticateSource, permissions config.Permissions, ) (*SecurityHandler, error)
func (*SecurityHandler) HandleBearerAuth ¶
type UpdateEmailService ¶
type UpdateEmailService interface {
UpdateEmail(ctx context.Context, request services.UpdateEmailRequest) (*services.UpdateEmailResponse, error)
}
type UpdatePasswordService ¶
type UpdatePasswordService interface {
UpdatePassword(ctx context.Context, request services.UpdatePasswordRequest) error
}
type UpdateRoleService ¶
Source Files
¶
- api.go
- api_credentials_email_exists.go
- api_credentials_email_update.go
- api_credentials_password_reset.go
- api_credentials_password_update.go
- api_credentials_register.go
- api_credentials_update_role.go
- api_data_conversion.go
- api_health.go
- api_session_check.go
- api_session_create.go
- api_session_create_anon.go
- api_session_refresh_session.go
- api_short_codes_email_update.go
- api_short_codes_password_reset.go
- api_short_codes_register.go
- api_user_get.go
- api_users_list.go
- security.go
Click to show internal directories.
Click to hide internal directories.