jsons

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 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 LoginV1

type LoginV1 struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type PublicProfileV1

type PublicProfileV1 struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

func (*PublicProfileV1) From

func (j *PublicProfileV1) From(m *models.User)

type RegisterV1

type RegisterV1 struct {
	Name     string `json:"name" validate:"required"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

func (*RegisterV1) To

func (j *RegisterV1) To(m *models.User)

type StartTimerV1

type StartTimerV1 struct {
	Title string `json:"title" validate:"required"`
}

type TimeV1

type TimeV1 struct {
	ID        uint             `json:"id"`
	Title     string           `json:"title"`
	StartedAt helpers.JSONTime `json:"started_at"`
	StoppedAt helpers.JSONTime `json:"stopped_at,omitempty"`
	Duration  time.Duration    `json:"duration,omitempty"`
	UserID    uint             `json:"user_id,omitempty"`
}

func (*TimeV1) From

func (j *TimeV1) From(m *models.Time)

type TimesV1

type TimesV1 struct {
	Items   []TimeV1 `json:"items"`
	Page    int      `json:"page,omitempty"`
	PerPage int      `json:"per_page,omitempty"`
	Total   int      `json:"total,omitempty"`
}

func (*TimesV1) From

func (j *TimesV1) From(ms *[]models.Time, page int, perPage int, total int)

Jump to

Keyboard shortcuts

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