webmsgspec

package
v0.0.0-...-2d64d47 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewPostDTO

type NewPostDTO struct {
	Title       string    `json:"title" validate:"required"`
	Slug        string    `json:"slug" validate:"required"`
	Body        string    `json:"body" validate:"omitempty"`
	AuthorID    string    `json:"author" validate:"required"`
	PublishTime time.Time `json:"publish_time"`
}

func (*NewPostDTO) MapToEntity

func (nU *NewPostDTO) MapToEntity() (*models.PostModel, error)

type NewPostResource

type NewPostResource struct {
	Data *NewPostDTO `json:"data" validate:"required"`
}

type PostResource

type PostResource struct {
	Data *models.PostModel `json:"data"`
}

type PostsResource

type PostsResource struct {
	Data []*models.PostModel `json:"data"`
}

type UpdatePostDTO

type UpdatePostDTO struct {
	ID          string    `json:"id"`
	Title       string    `json:"title" validate:"required"`
	Slug        string    `json:"slug" validate:"required"`
	Body        string    `json:"body" validate:"omitempty"`
	AuthorID    string    `json:"author" validate:"required"`
	PublishTime time.Time `json:"publish_time"`
}

func (*UpdatePostDTO) MapToEntity

func (uU *UpdatePostDTO) MapToEntity() (*models.PostModel, error)

type UpdatedPostResource

type UpdatedPostResource struct {
	Data *UpdatePostDTO `json:"data" validate:"required"`
}

Jump to

Keyboard shortcuts

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