actions

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

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{}
	IsAuthorized(user *models.User, services *app.Services) bool
	Validate(user *models.User, services *app.Services) *validate.Result
}

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*AddNewComment) Validate

func (input *AddNewComment) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type AssignUnassignTag added in v0.8.0

type AssignUnassignTag struct {
	Tag   *models.Tag
	Idea  *models.Idea
	Model *models.AssignUnassignTag
}

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*AssignUnassignTag) Validate added in v0.8.0

func (input *AssignUnassignTag) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*ChangeUserEmail) Validate added in v0.9.0

func (input *ChangeUserEmail) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*ChangeUserRole) Validate added in v0.7.0

func (input *ChangeUserRole) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*CompleteProfile) Validate added in v0.6.0

func (input *CompleteProfile) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*CreateEditTag) Validate added in v0.8.0

func (input *CreateEditTag) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type CreateNewIdea

type CreateNewIdea struct {
	Model *models.NewIdea
}

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*CreateNewIdea) Validate

func (input *CreateNewIdea) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*CreateTenant) Validate

func (input *CreateTenant) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type DeleteIdea added in v0.11.0

type DeleteIdea struct {
	Model *models.DeleteIdea
	Idea  *models.Idea
}

DeleteIdea represents the action of an administrator deleting an existing Idea

func (*DeleteIdea) Initialize added in v0.11.0

func (input *DeleteIdea) Initialize() interface{}

Initialize the model

func (*DeleteIdea) IsAuthorized added in v0.11.0

func (input *DeleteIdea) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*DeleteIdea) Validate added in v0.11.0

func (input *DeleteIdea) Validate(user *models.User, services *app.Services) *validate.Result

Validate if current model is valid

type DeleteTag added in v0.8.0

type DeleteTag struct {
	Tag   *models.Tag
	Model *models.DeleteTag
}

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

func (input *DeleteTag) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*DeleteTag) Validate added in v0.8.0

func (input *DeleteTag) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type EditComment added in v0.11.0

type EditComment struct {
	Model *models.EditComment
}

EditComment represents the action to update an existing comment

func (*EditComment) Initialize added in v0.11.0

func (input *EditComment) Initialize() interface{}

Initialize the model

func (*EditComment) IsAuthorized added in v0.11.0

func (input *EditComment) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*EditComment) Validate added in v0.11.0

func (input *EditComment) Validate(user *models.User, services *app.Services) *validate.Result

Validate if current model is valid

type InviteUsers added in v0.12.0

type InviteUsers struct {
	IsSampleInvite bool
	Model          *models.InviteUsers
	Invitations    []*models.UserInvitation
}

InviteUsers is used to invite new users into Fider

func (*InviteUsers) Initialize added in v0.12.0

func (input *InviteUsers) Initialize() interface{}

Initialize the model

func (*InviteUsers) IsAuthorized added in v0.12.0

func (input *InviteUsers) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*InviteUsers) Validate added in v0.12.0

func (input *InviteUsers) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*SetResponse) Validate

func (input *SetResponse) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*SignInByEmail) Validate added in v0.6.0

func (input *SignInByEmail) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type UpdateIdea added in v0.8.0

type UpdateIdea struct {
	Model *models.UpdateIdea
	Idea  *models.Idea
}

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*UpdateIdea) Validate added in v0.8.0

func (input *UpdateIdea) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type UpdateTenantAdvancedSettings added in v0.13.0

type UpdateTenantAdvancedSettings struct {
	Model *models.UpdateTenantAdvancedSettings
}

UpdateTenantAdvancedSettings is the input model used to update tenant advanced settings

func (*UpdateTenantAdvancedSettings) Initialize added in v0.13.0

func (input *UpdateTenantAdvancedSettings) Initialize() interface{}

Initialize the model

func (*UpdateTenantAdvancedSettings) IsAuthorized added in v0.13.0

func (input *UpdateTenantAdvancedSettings) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*UpdateTenantAdvancedSettings) Validate added in v0.13.0

func (input *UpdateTenantAdvancedSettings) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

type UpdateTenantPrivacy added in v0.12.0

type UpdateTenantPrivacy struct {
	Model *models.UpdateTenantPrivacy
}

UpdateTenantPrivacy is the input model used to update tenant privacy settings

func (*UpdateTenantPrivacy) Initialize added in v0.12.0

func (input *UpdateTenantPrivacy) Initialize() interface{}

Initialize the model

func (*UpdateTenantPrivacy) IsAuthorized added in v0.12.0

func (input *UpdateTenantPrivacy) IsAuthorized(user *models.User, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*UpdateTenantPrivacy) Validate added in v0.12.0

func (input *UpdateTenantPrivacy) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*UpdateTenantSettings) Validate

func (input *UpdateTenantSettings) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

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, services *app.Services) bool

IsAuthorized returns true if current user is authorized to perform this action

func (*UpdateUserSettings) Validate added in v0.6.0

func (input *UpdateUserSettings) Validate(user *models.User, services *app.Services) *validate.Result

Validate is current model is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL