webmsgspec

package
v0.0.0-...-6f676a1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewUserDTO

type NewUserDTO struct {
	Alias     string          `json:"alias" validate:"required,alphanum"`
	FirstName string          `json:"first_name" validate:"omitempty,alpha"`
	LastName  string          `json:"last_name" validate:"omitempty,alpha"`
	Email     string          `json:"email" validate:"required,email"`
	Password  string          `json:"password" validate:"omitempty,min=8"`
	Role      models.RoleType `json:"role" validate:"required,eq=admin|eq=normal"`
}

func (*NewUserDTO) MapToEntity

func (nU *NewUserDTO) MapToEntity() (*models.UserModel, error)

type NewUserResource

type NewUserResource struct {
	Data *NewUserDTO `json:"data" validate:"required"`
}

type UpdateUserDTO

type UpdateUserDTO struct {
	ID        string          `json:"id"`
	Alias     string          `json:"alias" validate:"required,alphanum"`
	FirstName string          `json:"first_name" validate:"omitempty,alpha"`
	LastName  string          `json:"last_name" validate:"omitempty,alpha"`
	Email     string          `json:"email" validate:"required,email"`
	Password  string          `json:"password" validate:"omitempty,min=8"`
	Role      models.RoleType `json:"role" validate:"required,eq=admin|eq=normal"`
}

func (*UpdateUserDTO) MapToEntity

func (uU *UpdateUserDTO) MapToEntity() (*models.UserModel, error)

type UpdatedUserResource

type UpdatedUserResource struct {
	Data *UpdateUserDTO `json:"data" validate:"required"`
}

type UserResource

type UserResource struct {
	Data *models.UserModel `json:"data"`
}

type UsersResource

type UsersResource struct {
	Data []*models.UserModel `json:"data"`
}

Jump to

Keyboard shortcuts

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