api

package
v0.0.0-...-ae6897b Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 通用系统状态
	MetaOk                  = Meta{Code: 200, Message: "OK"}
	MetaCreated             = Meta{Code: 201, Message: "Created"}
	MetaNoContent           = Meta{Code: 204, Message: "No Content"}
	MetaNotModified         = Meta{Code: 304, Message: "Not Modified"}
	MetaBadRequest          = Meta{Code: 400, Message: "Bad Request"}
	MetaNotSupported        = Meta{Code: 400, Message: "Not Supported"}
	MetaResourceNotFound    = Meta{Code: 400, Message: "Resource Not Found"}
	MetaUnauthorized        = Meta{Code: 401, Message: "Unauthorized"}
	MetaForbidden           = Meta{Code: 403, Message: "Forbidden"}
	MetaNotFound            = Meta{Code: 404, Message: "Not Found"}
	MetaMethodNotAllowed    = Meta{Code: 405, Message: "Method Not Allowed"}
	MetaConflict            = Meta{Code: 409, Message: "Conflict"}
	MetaRangeNotSatisfiable = Meta{Code: 416, Message: "Request Range Not Satisfiable"}
	MetaUnprocessableEntity = Meta{Code: 422, Message: "Unprocessable Entity"}
	MetaInternalError       = Meta{Code: 500, Message: "Internal Server Error"}
	MetaNotImplemented      = Meta{Code: 501, Message: "Not Implemented"}

	// API 操作权限状态
	MetaAuthCreateForbidden = Meta{Code: 40301, Message: "Authorized Create Forbidden"}
	MetaAuthDeleteForbidden = Meta{Code: 40302, Message: "Authorized Delete Forbidden"}
	MetaAuthUpdateForbidden = Meta{Code: 40303, Message: "Authorized Update Forbidden"}
	MetaAuthDetailForbidden = Meta{Code: 40304, Message: "Authorized Detail Forbidden"}

	// 未授权状态
	MetaCertificateUnauthorized = Meta{Code: 40101, Message: "Certificate Not Authorized"}
)

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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