actions

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: GPL-3.0 Imports: 9 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{}
	Validate(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

func (*AddNewComment) Validate

func (input *AddNewComment) Validate(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) 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(services *app.Services) *validate.Result

Validate is current model is valid

type ChangeUserRole added in v0.7.0

type ChangeUserRole struct {
	CurrentTenant *models.Tenant
	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

func (*ChangeUserRole) Validate added in v0.7.0

func (input *ChangeUserRole) Validate(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) 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(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) 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(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) bool

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

func (*CreateNewIdea) Validate

func (input *CreateNewIdea) Validate(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) bool

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

func (*CreateTenant) Validate

func (input *CreateTenant) Validate(services *app.Services) *validate.Result

Validate is 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) 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(services *app.Services) *validate.Result

Validate is current model is valid

type SetResponse

type SetResponse struct {
	Model *models.SetResponse
}

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

func (*SetResponse) Validate

func (input *SetResponse) Validate(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) 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(services *app.Services) *validate.Result

Validate is current model is valid

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

func (*UpdateIdea) Validate added in v0.8.0

func (input *UpdateIdea) Validate(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) bool

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

func (*UpdateTenantSettings) Validate

func (input *UpdateTenantSettings) Validate(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) 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(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