Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// JWT variable instance of intef
	JWT intef = &wt{}
)
View Source
var (
	// Validator var
	Validator validate = &valid{}
)

Functions

This section is empty.

Types

type DBLogger

type DBLogger struct {
	SlowThreshold         time.Duration
	SourceField           string
	SkipErrRecordNotFound bool
}

DBLogger struct

func NewDBLogger

func NewDBLogger() *DBLogger

NewDBLogger func

func (*DBLogger) Error

func (l *DBLogger) Error(ctx context.Context, s string, args ...interface{})

Error func

func (*DBLogger) Info

func (l *DBLogger) Info(ctx context.Context, s string, args ...interface{})

Info func

func (*DBLogger) LogMode

LogMode func

func (*DBLogger) Trace

func (l *DBLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

Trace func

func (*DBLogger) Warn

func (l *DBLogger) Warn(ctx context.Context, s string, args ...interface{})

Warn func

type Details

type Details struct {
	ID      uint64 `json:"-" gorm:"primaryKey"`
	PointID uint64 `json:"-"`

	Point       int       `json:"point"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	// contains filtered or unexported fields
}

Details struct

type Point

type Point struct {
	ID        uint64    `json:"-" gorm:"primaryKey"`
	UserID    uint64    `validate:"required" json:"user_id"  gorm:"unique;not null"`
	Point     uint64    `validate:"required" json:"point"`
	UpdatedAt time.Time `json:"-"`
}

Point struct