dto

package
v0.0.0-...-19c4467 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 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 ArticleResponse

type ArticleResponse struct {
	ID          string `json:"article_id" db:"article_id"`
	Title       string `json:"title" db:"title"`
	Content     string `json:"content" db:"content"`
	PublishedAt string `json:"published_at" db:"published_at"`
	Author      int    `json:"author" db:"author_id"`
}

type LoginRequest

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

type LoginResponse

type LoginResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token,omitempty"`
}

type NewArticleRequest

type NewArticleRequest struct {
	Title   string `json:"title"db:"title""`
	Content string `json:"content"db:"content"`
	Author  int    `json:"author"db:"author_id"`
}

func (NewArticleRequest) Validate

func (a NewArticleRequest) Validate() *errs.AppError

type UserResponse

type UserResponse struct {
	ID       int    `json:"user_id"db:"id"`
	Email    string `json:"email"db:"email"`
	FullName string `json:"full_name"db:"full_name"`
	Gender   string `json:"gender"db:"gender"`
}

Jump to

Keyboard shortcuts

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