im

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTenant

type CreateTenant struct {
	Token      string `json:"token"`
	Name       string `json:"name"`
	Subdomain  string `json:"subdomain"`
	UserClaims *models.OAuthClaims
}

CreateTenant is the input model used to create a tenant

func (*CreateTenant) IsAuthorized

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

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

func (*CreateTenant) Validate

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

Validate is current model is valid

type Idea

type Idea struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

Idea represents an unsaved idea

func (*Idea) IsAuthorized

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

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

func (*Idea) Validate

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

Validate is current model is valid

type NewComment

type NewComment struct {
	Content string `json:"content"`
}

NewComment represents a new comment

func (*NewComment) IsAuthorized

func (c *NewComment) IsAuthorized(user *models.User) bool

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

func (*NewComment) Validate

func (c *NewComment) Validate(services *app.Services) *validate.Result

Validate is current model is valid

type SetResponse

type SetResponse struct {
	Status int    `json:"status"`
	Text   string `json:"text"`
}

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

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

Validate is current model is valid

type UpdateTenantSettings

type UpdateTenantSettings struct {
	Title          string `json:"title"`
	Invitation     string `json:"invitation"`
	WelcomeMessage string `json:"welcomeMessage"`
	UserClaims     *models.OAuthClaims
}

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