orm

package
v0.0.0-...-ee94258 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alive

func Alive() error

func GetDB

func GetDB() *gorm.DB

func StartORM

func StartORM()

Types

type Backup

type Backup struct {
	gorm.Model
	UserID   string `gorm:"index:backup_user_id"`
	Hash     string `gorm:"hash"`
	S3Path   string `gorm:"s3_path"`
	IsActive bool   `gorm:"-"`
}

type Device

type Device struct {
	gorm.Model
	ID                     uint   `gorm:"primarykey"`
	UserID                 string `gorm:"index:device_user_id"`
	Token                  string `gorm:"uniqueIndex:token"`
	UserAgentOS            string `json:"user_agent_os"`
	UserAgentOSVersion     string `json:"user_agent_os_version"`
	UserAgentDevice        string `json:"user_agent_device"`
	UserAgentDeviceVersion string `json:"user_agent_device_version"`
	LastIP                 string `json:"last_ip"`
	LastCountry            string `json:"last_country"`
}

type Logger

type Logger struct {
}

func (Logger) Error

func (l Logger) Error(ctx context.Context, msg string, opts ...interface{})

func (Logger) Info

func (l Logger) Info(ctx context.Context, msg string, opts ...interface{})

func (Logger) LogMode

func (l Logger) LogMode(logger.LogLevel) logger.Interface

func (Logger) Trace

func (l Logger) Trace(ctx context.Context, begin time.Time, f func() (string, int64), err error)

func (Logger) Warn

func (l Logger) Warn(ctx context.Context, msg string, opts ...interface{})

Jump to

Keyboard shortcuts

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