domain

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 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 AuthorRequestBody

type AuthorRequestBody struct {
	ID   int64
	Name string `json:"name,omitempty" validate:"min=5,max=20"`
	Bio  string `json:"bio,omitempty"`
}

AuthorRequestBody is the request body for the Author entity

type AuthorResponseBody

type AuthorResponseBody struct {
	ID   int64
	Name string `json:"name,omitempty" validate:"min=5,max=20"`
	Bio  string `json:"bio,omitempty"`
}

AuthorResponseBody is the response body for the Author entity

func FromDB

func FromDB(author repository.Author) *AuthorResponseBody

FromDB converts a repository.Author to an AuthorResponseBody

Jump to

Keyboard shortcuts

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