dto

package
v0.0.0-...-45a0741 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 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 BadRequestError

type BadRequestError struct {
	Message string
}

BadRequestError represents a general bad request error with custom message

func (BadRequestError) Error

func (e BadRequestError) Error() string

type ForbiddenError

type ForbiddenError struct {
	ResourceType string
	ResourceID   uint
}

ForbiddenError represents an error when authorized user tries to access resources that he has no access to

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

type NotFoundError

type NotFoundError struct {
	ResourceType string
	ResourceID   uint
}

NotFoundError represents an error when user tries to access resources that does not exist

func (NotFoundError) Error

func (e NotFoundError) Error() string

type SettingsPayload

type SettingsPayload struct {
	IsSetupTrackerEnabled  bool `json:"isSetupTrackerEnabled"`
	IsWelcomeDialogEnabled bool `json:"isWelcomeDialogEnabled"`
}

type TokenSessionResponse

type TokenSessionResponse struct {
	Token string `json:"token"`
}

type UnauthorizedError

type UnauthorizedError struct {
}

UnauthorizedError represents an error when user tries to access guarded resources without autohrization information

func (UnauthorizedError) Error

func (e UnauthorizedError) Error() string

type UserResponse

type UserResponse struct {
	ID      bson.ObjectId `json:"id"`
	Address string        `json:"address"`
	Alias   string        `json:"alias"`
	Rating  float32       `json:"rating,omitempty"`
}

func NewUserResponseFromModel

func NewUserResponseFromModel(m models.User) UserResponse

NewUserResponseFromModel creates json response object

type WrongRequestParametersError

type WrongRequestParametersError struct {
}

WrongRequestParametersError represents an error when user provides wrong parameters in a request

func (WrongRequestParametersError) Error

Jump to

Keyboard shortcuts

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