models

package
v0.0.0-...-b9e412e Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// mode
	MetaDataModeWeb MetaDataMode = "web"
	MetaDataModeApp MetaDataMode = "app"

	// channel
	MetaDataChannelAdmin  MetaDataChannel = "admin"
	MetaDataChannelClient MetaDataChannel = "client"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	App struct {
		Server struct {
			Port string `mapstructure:"port"`
			Host string `mapstructure:"host"`
		} `mapstructure:"server"`
		Redis struct {
			Password string `mapstructure:"password"`
			Host     string `mapstructure:"host"`
		} `mapstructure:"redis"`
		Postgres struct {
			Password string `mapstructure:"password"`
			User     string `mapstructure:"user"`
			Host     string `mapstructure:"host"`
			Port     int    `mapstructure:"port"`
			DBName   string `mapstructure:"name"`
		} `mapstructure:"postgres"`
		Postgres2 struct {
			Password string `mapstructure:"password"`
			User     string `mapstructure:"user"`
			Host     string `mapstructure:"host"`
			Port     int    `mapstructure:"port"`
			DBName   string `mapstructure:"name"`
		} `mapstructure:"postgres2"`
	} `mapstructure:"app"`
}

type HandlerCtx

type HandlerCtx struct {
	DB            *gorm.DB
	AnotherDB     *gorm.DB
	UserSessionDB *redis.Client
	OtpSessionDB  *redis.Client
}

type Hello

type Hello struct {
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
}

type MetaData

type MetaData struct {
	Mode    MetaDataMode
	Channel MetaDataChannel
}

type MetaDataChannel

type MetaDataChannel string

type MetaDataMode

type MetaDataMode string

type RequestData

type RequestData string
const (
	RequestDataMetaData RequestData = "meta-data"
)

Jump to

Keyboard shortcuts

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