responseutils

package
v0.0.0-...-3ee563d Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkCreateRequest

type LinkCreateRequest struct {
	URL string `json:"url"`
}

type LinkResponse

type LinkResponse struct {
	ID       uint   `json:"id"`
	URL      string `json:"url"`
	ShortURL string `json:"short_url"`
}

func MapLinkListResponse

func MapLinkListResponse(links []domain.Link) []LinkResponse

func MapLinkResponse

func MapLinkResponse(link domain.Link) LinkResponse

type UserLoginRequest

type UserLoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserLoginResponse

type UserLoginResponse struct {
	ID          uint   `json:"id"`
	Email       string `json:"email"`
	AccessToken string `json:"access_token"`
}

type UserResponse

type UserResponse struct {
	ID    uint           `json:"id"`
	Email string         `json:"email"`
	Links []LinkResponse `json:"links"`
}

func MapUserResponse

func MapUserResponse(user *domain.User) *UserResponse

Jump to

Keyboard shortcuts

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