actions

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 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
	Post  *models.Post
	Model *models.AssignUnassignTag
}

AssignUnassignTag is used to assign or remove a tag to/from an post

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 CreateEditOAuthConfig added in v0.15.0

type CreateEditOAuthConfig struct {
	Model *models.CreateEditOAuthConfig
}

CreateEditOAuthConfig is used to create/edit OAuth config

func (*CreateEditOAuthConfig) Initialize added in v0.15.0

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

Initialize the model

func (*CreateEditOAuthConfig) IsAuthorized added in v0.15.0

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

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

func (*CreateEditOAuthConfig) Validate added in v0.15.0

func (input *CreateEditOAuthConfig) 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 CreateNewPost added in v0.15.0

type CreateNewPost struct {
	Model *models.NewPost
}

CreateNewPost is used to create a new post

func (*CreateNewPost) Initialize added in v0.15.0

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

Initialize the model

func (*CreateNewPost) IsAuthorized added in v0.15.0

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

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

func (*CreateNewPost) Validate added in v0.15.0

func (input *CreateNewPost) 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 DeletePost added in v0.15.0

type DeletePost struct {
	Model *models.DeletePost
	Post  *models.Post
}

DeletePost represents the action of an administrator deleting an existing Post

func (*DeletePost) Initialize added in v0.15.0

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

Initialize the model

func (*DeletePost) IsAuthorized added in v0.15.0

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

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

func (*DeletePost) Validate added in v0.15.0

func (input *DeletePost) 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.Post
}

SetResponse represents the action to update an post 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 UpdatePost added in v0.15.0

type UpdatePost struct {
	Model *models.UpdatePost
	Post  *models.Post
}

UpdatePost is used to edit an existing new post

func (*UpdatePost) Initialize added in v0.15.0

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

Initialize the model

func (*UpdatePost) IsAuthorized added in v0.15.0

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

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

func (*UpdatePost) Validate added in v0.15.0

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