Documentation
¶
Index ¶
- Constants
- func Fail(c *gin.Context)
- func FailWithDetailed(data interface{}, message string, c *gin.Context)
- func FailWithMessage(message string, c *gin.Context)
- func Ok(c *gin.Context)
- func OkWithData(data interface{}, c *gin.Context)
- func OkWithDetailed(data interface{}, message string, c *gin.Context)
- func OkWithMessage(message string, c *gin.Context)
- func Result(code int, data interface{}, msg string, c *gin.Context)
- type CabinInReceive
- type DevopsModel
- type LocalTime
- type PageRequest
- type PageResult
- type Repository
- func (r *Repository) Counts(dst *int64, filter ...interface{}) error
- func (r *Repository) Delete(dst interface{}, filter ...interface{}) error
- func (r *Repository) Find(dst interface{}, filter ...interface{}) error
- func (r *Repository) First(dst interface{}, filter interface{}) error
- func (r *Repository) GetDB() *gorm.DB
- func (r *Repository) Last(dst interface{}, filter interface{}) error
- func (r *Repository) List(dst interface{}, pageSize int64, page int64, filter ...interface{}) error
- func (r *Repository) Save(data interface{}) error
- func (r *Repository) SetRepository(model interface{}) *Repository
- func (r *Repository) Take(dst interface{}, filter interface{}) error
- type Response
- type Token
Constants ¶
View Source
const ( ERROR = -1 SUCCESS = 1 )
Variables ¶
This section is empty.
Functions ¶
func FailWithDetailed ¶
func FailWithMessage ¶
func OkWithData ¶
func OkWithDetailed ¶
func OkWithMessage ¶
Types ¶
type CabinInReceive ¶
type CabinInReceive struct {
PType string `json:"pType"` //
Source string `json:"source"` //
Resource string `json:"resource"` // 路径
Domain string `json:"domain"` //
Method string `json:"method"` //
}
CabinInReceive Cabin structure for input parameters
type DevopsModel ¶
type PageRequest ¶
type PageResult ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository prepare for domain
func NewRepository ¶
func NewRepository(db *gorm.DB, dstStruct interface{}) *Repository
func (*Repository) Counts ¶
func (r *Repository) Counts(dst *int64, filter ...interface{}) error
Counts 根据条件获取列表
func (*Repository) Delete ¶
func (r *Repository) Delete(dst interface{}, filter ...interface{}) error
func (*Repository) Find ¶
func (r *Repository) Find(dst interface{}, filter ...interface{}) error
Find 根据条件获取全部
func (*Repository) First ¶
func (r *Repository) First(dst interface{}, filter interface{}) error
First 根据条件查询第一条记录
func (*Repository) GetDB ¶
func (r *Repository) GetDB() *gorm.DB
func (*Repository) Last ¶
func (r *Repository) Last(dst interface{}, filter interface{}) error
Last 随机获取一条记录
func (*Repository) List ¶
func (r *Repository) List(dst interface{}, pageSize int64, page int64, filter ...interface{}) error
List 根据条件获取列表
func (*Repository) Save ¶
func (r *Repository) Save(data interface{}) error
func (*Repository) SetRepository ¶
func (r *Repository) SetRepository(model interface{}) *Repository
func (*Repository) Take ¶
func (r *Repository) Take(dst interface{}, filter interface{}) error
Take 随机获取一条记录
type Token ¶
type Token struct {
Value string
}
func (*Token) GetRequestMetadata ¶
GetRequestMetadata 获取当前请求认证所需的元数据
func (*Token) RequireTransportSecurity ¶
RequireTransportSecurity 是否需要基于 TLS 认证进行安全传输
Click to show internal directories.
Click to hide internal directories.