actions

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: GPL-3.0 Imports: 6 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 {
	NewModel() 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) IsAuthorized

func (input *AddNewComment) IsAuthorized(user *models.User) bool

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

func (*AddNewComment) NewModel

func (input *AddNewComment) NewModel() interface{}

NewModel initializes the model

func (*AddNewComment) Validate

func (input *AddNewComment) 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) IsAuthorized

func (input *CreateNewIdea) IsAuthorized(user *models.User) bool

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

func (*CreateNewIdea) NewModel

func (input *CreateNewIdea) NewModel() interface{}

NewModel initializes the model

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) IsAuthorized

func (input *CreateTenant) IsAuthorized(user *models.User) bool

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

func (*CreateTenant) NewModel

func (input *CreateTenant) NewModel() interface{}

NewModel initializes the model

func (*CreateTenant) Validate

func (input *CreateTenant) 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) IsAuthorized

func (input *SetResponse) IsAuthorized(user *models.User) bool

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

func (*SetResponse) NewModel

func (input *SetResponse) NewModel() interface{}

NewModel initializes the model

func (*SetResponse) Validate

func (input *SetResponse) 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) IsAuthorized

func (input *UpdateTenantSettings) IsAuthorized(user *models.User) bool

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

func (*UpdateTenantSettings) NewModel

func (input *UpdateTenantSettings) NewModel() interface{}

NewModel initializes the model

func (*UpdateTenantSettings) Validate

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