core

package
v0.0.0-...-2678e4d Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
}

func (*Controller) Json

func (controller *Controller) Json(c *gin.Context, result *gorm.DB, data interface{})

func (*Controller) JsonFail

func (controller *Controller) JsonFail(c *gin.Context, status int, message string)

func (*Controller) JsonSuccess

func (controller *Controller) JsonSuccess(c *gin.Context, status int, h gin.H)

type Model

type Model struct {
	ID        int        `json:"id" gorm:"primarykey"`
	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt time.Time  `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty" gorm:"index"`
}

func (*Model) Db

func (m *Model) Db() *gorm.DB

type Resolver

type Resolver struct {
}

func (*Resolver) Db

func (r *Resolver) Db() *gorm.DB

type Service

type Service struct {
}

func (*Service) Db

func (m *Service) Db() *gorm.DB

func (*Service) Find

func (s *Service) Find(m interface{})

Jump to

Keyboard shortcuts

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