Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actionable ¶
type Actionable interface { Initialize() interface{} Validate(user *models.User, services *app.Services) *validate.Result IsAuthorized(user *models.User) bool }
Actionable is any action that the user can perform using the web app
type AddNewComment ¶
type AddNewComment struct {
Model *models.NewComment
}
AddNewComment represents a new comment to be added
func (*AddNewComment) Initialize ¶ added in v0.6.0
func (input *AddNewComment) Initialize() interface{}
Initialize the model
func (*AddNewComment) IsAuthorized ¶
func (input *AddNewComment) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type AssignUnassignTag ¶ added in v0.8.0
AssignUnassignTag is used to assign or remove a tag to/from an idea
func (*AssignUnassignTag) Initialize ¶ added in v0.8.0
func (input *AssignUnassignTag) Initialize() interface{}
Initialize the model
func (*AssignUnassignTag) IsAuthorized ¶ added in v0.8.0
func (input *AssignUnassignTag) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type ChangeUserEmail ¶ added in v0.9.0
type ChangeUserEmail struct {
Model *models.ChangeUserEmail
}
ChangeUserEmail is the action used to change current user's email
func (*ChangeUserEmail) Initialize ¶ added in v0.9.0
func (input *ChangeUserEmail) Initialize() interface{}
Initialize the model
func (*ChangeUserEmail) IsAuthorized ¶ added in v0.9.0
func (input *ChangeUserEmail) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type ChangeUserRole ¶ added in v0.7.0
type ChangeUserRole struct {
Model *models.ChangeUserRole
}
ChangeUserRole is the input model change role of an user
func (*ChangeUserRole) Initialize ¶ added in v0.7.0
func (input *ChangeUserRole) Initialize() interface{}
Initialize the model
func (*ChangeUserRole) IsAuthorized ¶ added in v0.7.0
func (input *ChangeUserRole) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type CompleteProfile ¶ added in v0.6.0
type CompleteProfile struct {
Model *models.CompleteProfile
}
CompleteProfile happens when users completes their profile during first time sign in
func (*CompleteProfile) Initialize ¶ added in v0.6.0
func (input *CompleteProfile) Initialize() interface{}
Initialize the model
func (*CompleteProfile) IsAuthorized ¶ added in v0.6.0
func (input *CompleteProfile) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type CreateEditTag ¶ added in v0.8.0
type CreateEditTag struct { Tag *models.Tag Model *models.CreateEditTag }
CreateEditTag is used to create a new tag or edit existing
func (*CreateEditTag) Initialize ¶ added in v0.8.0
func (input *CreateEditTag) Initialize() interface{}
Initialize the model
func (*CreateEditTag) IsAuthorized ¶ added in v0.8.0
func (input *CreateEditTag) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type CreateNewIdea ¶
CreateNewIdea is used to create a new idea
func (*CreateNewIdea) Initialize ¶ added in v0.6.0
func (input *CreateNewIdea) Initialize() interface{}
Initialize the model
func (*CreateNewIdea) IsAuthorized ¶
func (input *CreateNewIdea) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type CreateTenant ¶
type CreateTenant struct {
Model *models.CreateTenant
}
CreateTenant is the input model used to create a tenant
func (*CreateTenant) Initialize ¶ added in v0.6.0
func (input *CreateTenant) Initialize() interface{}
Initialize the model
func (*CreateTenant) IsAuthorized ¶
func (input *CreateTenant) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type DeleteTag ¶ added in v0.8.0
DeleteTag is used to delete an existing tag
func (*DeleteTag) Initialize ¶ added in v0.8.0
func (input *DeleteTag) Initialize() interface{}
Initialize the model
func (*DeleteTag) IsAuthorized ¶ added in v0.8.0
IsAuthorized returns true if current user is authorized to perform this action
type SetResponse ¶
type SetResponse struct { Model *models.SetResponse Original *models.Idea }
SetResponse represents the action to update an idea response
func (*SetResponse) Initialize ¶ added in v0.6.0
func (input *SetResponse) Initialize() interface{}
Initialize the model
func (*SetResponse) IsAuthorized ¶
func (input *SetResponse) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type SignInByEmail ¶ added in v0.6.0
type SignInByEmail struct {
Model *models.SignInByEmail
}
SignInByEmail happens when user request to sign in by email
func (*SignInByEmail) Initialize ¶ added in v0.6.0
func (input *SignInByEmail) Initialize() interface{}
Initialize the model
func (*SignInByEmail) IsAuthorized ¶ added in v0.6.0
func (input *SignInByEmail) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type UpdateIdea ¶ added in v0.8.0
type UpdateIdea struct {
Model *models.UpdateIdea
}
UpdateIdea is used to edit an existing new idea
func (*UpdateIdea) Initialize ¶ added in v0.8.0
func (input *UpdateIdea) Initialize() interface{}
Initialize the model
func (*UpdateIdea) IsAuthorized ¶ added in v0.8.0
func (input *UpdateIdea) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type UpdateTenantSettings ¶
type UpdateTenantSettings struct {
Model *models.UpdateTenantSettings
}
UpdateTenantSettings is the input model used to update tenant settings
func (*UpdateTenantSettings) Initialize ¶ added in v0.6.0
func (input *UpdateTenantSettings) Initialize() interface{}
Initialize the model
func (*UpdateTenantSettings) IsAuthorized ¶
func (input *UpdateTenantSettings) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action
type UpdateUserSettings ¶ added in v0.6.0
type UpdateUserSettings struct {
Model *models.UpdateUserSettings
}
UpdateUserSettings happens when users updates their settings
func (*UpdateUserSettings) Initialize ¶ added in v0.6.0
func (input *UpdateUserSettings) Initialize() interface{}
Initialize the model
func (*UpdateUserSettings) IsAuthorized ¶ added in v0.6.0
func (input *UpdateUserSettings) IsAuthorized(user *models.User) bool
IsAuthorized returns true if current user is authorized to perform this action