postgresdb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRecord

func CreateRecord(dbConn *gorm.DB)

func CreateTable

func CreateTable(dbConn *gorm.DB)

func GetAllRecords

func GetAllRecords(dbConn *gorm.DB)

func GetConnection

func GetConnection() *gorm.DB

Types

type APIModelConfig

type APIModelConfig struct {
	SID         int32       `json:"sid" gorm:"type:int"`
	AppID       string      `json:"app_id" gorm:"type:varchar(32)"`
	API         string      `json:"api" gorm:"type:varchar(64)"`
	ModelConfig interface{} `json:"model_config" gorm:"type:jsonb"`
	EnvConfig   interface{} `json:"env_config" gorm:"type:jsonb"`
	Status      bool        `json:"status" gorm:"type:bool"`
	CreatedAt   time.Time   `json:"created_at" gorm:"type:timestamp"`
	UpdatedAt   time.Time   `json:"updated_at" gorm:"type:timestamp"`
}

APIModelConfig Table 2

type AppConfig

type AppConfig struct {
	AppID     string    `json:"app_id"  gorm:"type:varchar(32)"`
	Status    bool      `json:"status" gorm:"type:bool"`
	CreatedAt time.Time `json:"created_at" gorm:"type:timestamp"`
	UpdatedAt time.Time `json:"updated_at" gorm:"type:timestamp"`
}

AppConfig Table 1

type DB

type DB interface {
	GetConnection() *gorm.DB
	CreateTable(dbConn *gorm.DB)
	GetAllRecords(dbConn *gorm.DB)
	CreateRecord(dbConn *gorm.DB)
}

type EnvConfig

type EnvConfig struct {
	DeliveryMode    string `json:"delivery_mode"`
	BirdmanRedirect bool   `json:"birdman_redirect"`
}

type ModelConfig

type ModelConfig struct {
	Status string `json:"status"`
	Accept bool   `json:"accept"`
}

type ModelName

type ModelName string

Jump to

Keyboard shortcuts

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