repositoryimpl

package
v0.0.0-...-a53383b Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAsyncTaskRepo

func NewAsyncTaskRepo(cfg *Config) repository.AsyncTask

Types

type Config

type Config struct {
	Table Table `json:"table" required:"true"`
}

type JSONMap

type JSONMap map[string]interface{}

JSONMap

func (*JSONMap) Scan

func (j *JSONMap) Scan(src interface{}) error

Scan implement sql.Scanner interfacne

func (JSONMap) Value

func (j JSONMap) Value() (driver.Value, error)

Value implement driver.Valuer interface

type TAsyncTask

type TAsyncTask struct {
	Id        uint64  `gorm:"primaryKey;column:id"`
	User      string  `gorm:"column:username"`
	TaskType  string  `gorm:"column:task_type"`
	Status    string  `gorm:"column:status"`
	CreatedAt int64   `gorm:"column:created_at;default:extract(epoch from now())"`
	MetaData  JSONMap `gorm:"column:metadata;type:json;default: '{}'::json"`
}

func NewTAsyncTask

func NewTAsyncTask() *TAsyncTask

func (TAsyncTask) TableName

func (w TAsyncTask) TableName() string

type Table

type Table struct {
	AsyncTask string `json:"async_task" required:"true"`
}

Jump to

Keyboard shortcuts

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