entity

package
v0.0.0-...-533e1e5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Code    x.Code `json:"code"`
	Message string `json:"message"`
}

type Article

type Article struct {
	ID        int64        `param:"id" json:"id"`
	Author    string       `param:"author" json:"author"`
	Title     string       `param:"title" json:"title"`
	Body      string       `param:"body" json:"body"`
	CreatedAt sql.NullTime `param:"created_at" json:"created_at"`
}

type ArticleParam

type ArticleParam struct {
	ID        int64        `param:"id" json:"id" db:"id"`
	Author    string       `param:"author" json:"author" db:"author"`
	Title     string       `param:"title" json:"title" db:"title"`
	Body      string       `param:"body" json:"body" db:"body"`
	CreatedAt sql.NullTime `param:"created_at" json:"created_at" db:"created_at"`
	SortBy    []string     `param:"sort_by" db:"sort_by" json:"sort_by"`
	Page      int64        `param:"page" db:"page" json:"page"`
	Limit     int64        `param:"limit" db:"limit" json:"limit"`
}

type CacheControl

type CacheControl struct {
	MustRevalidate bool
}

type CreateArticleParam

type CreateArticleParam struct {
	Author string `json:"author"`
	Title  string `json:"title"`
	Body   string `json:"body"`
}

type Meta

type Meta struct {
	Path       string      `json:"path"`
	StatusCode int         `json:"status_code"`
	Status     string      `json:"status"`
	Message    string      `json:"message"`
	Error      *x.AppError `json:"error,omitempty" swaggertype:"primitive,object"`
	Timestamp  string      `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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