response

package
v0.0.0-...-57f2031 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderError

func RenderError(statusCode int, msg string, w http.ResponseWriter)

Types

type Error

type Error struct {
	Message string `json:"message"`
}

type Plan

type Plan struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	CreatorId string `json:"creator_id"`
	TraineeId string `json:"trainee_id"`
}

Plan is the structure used for the serialization of training entity

func FromPlanModel

func FromPlanModel(plan *model.Plan) *Plan

type PlanSession

type PlanSession struct {
	Id          string    `json:"id"`
	PlanId      string    `json:"plan_id"`
	From        time.Time `json:"from"`
	To          time.Time `json:"to"`
	Description string    `json:"description"`
	Comments    string    `json:"comments"`
}

func FromPlanSessionModel

func FromPlanSessionModel(planSession *model.PlanSession) *PlanSession

type User

type User struct {
	Id        string `id:"json"`
	Login     string `login:"json"`
	Email     string `email:"json"`
	FirstName string `firstName:"json"`
	LastName  string `lastName:"json"`
}

User is the type used as a response to a sign-in or a login request

func FromUserModel

func FromUserModel(user *model.User) *User

FromUserModel create a user response from a model

Jump to

Keyboard shortcuts

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