data

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadProductionConfig added in v1.0.5

func LoadProductionConfig()

LoadProductionConfig load config

Types

type APIResponse added in v1.0.5

type APIResponse struct {
	Message string      `json:",omitempty"`
	Data    interface{} `json:",omitempty"`
}

APIResponse api response

type AlertData

type AlertData struct {
	IsInfo    bool
	IsSuccess bool
	IsWarning bool
	IsDanger  bool
	Message   string
}

AlertData used in web pages and api responses

type Configuration

type Configuration struct {
	DatabaseConfig    *DatabaseConfiguration
	RedisConfig       *RedisConfiguration
	GoogleOauthConfig *GoogleOauthConfiguration
	EmailConfig       *EmailConfiguration

	RapidAPIKey string

	JwtKey          []byte
	Host            string
	ResourceVersion string

	HTTPS         bool
	EnableSitemap bool
	IsDebug       bool
}

Configuration app configuration

var Config *Configuration

Config global config

type DatabaseConfiguration

type DatabaseConfiguration struct {
	ConnectionString string
	Driver           string
}

DatabaseConfiguration gorm

type EmailConfiguration added in v1.1.4

type EmailConfiguration struct {
	SMTPServer   string
	EmailAddress string
	Password     string
}

EmailConfiguration email configuration for email sms

type GoogleOauthConfiguration

type GoogleOauthConfiguration struct {
	ClientID     string
	ClientSecret string
}

GoogleOauthConfiguration google oauth2

type HeaderData

type HeaderData struct {
	Title           string
	Description     string
	ResourceVersion string
	PageStyle       *PageStyleData `json:",omitempty"`
	Nav             *NavData       `json:",omitempty"`
	Alert           *AlertData     `json:",omitempty"`
}

HeaderData header data

type LoginData

type LoginData struct {
	Username string
	ImageURL string
}

LoginData page login info

type NavData struct {
	StyleName string
	Login     *LoginData `json:",omitempty"`
}

NavData nav bar

type PageResponse added in v1.0.5

type PageResponse struct {
	Header *HeaderData `json:",omitempty"`
	Data   interface{}
}

PageResponse page response

func (*PageResponse) SetAlert added in v1.0.5

func (r *PageResponse) SetAlert(alert *AlertData)

SetAlert set alert

func (*PageResponse) SetLogin added in v1.0.5

func (r *PageResponse) SetLogin(login *LoginData)

SetLogin set login

func (*PageResponse) SetNavStyleName added in v1.0.5

func (r *PageResponse) SetNavStyleName(style *PageStyleData)

SetNavStyleName set nav style name

type PageStyleData

type PageStyleData struct {
	Name      string
	Link      string
	Integrity string
}

PageStyleData bootswatch styles

type RedisConfiguration

type RedisConfiguration struct {
	Addr     string
	Password string
	DB       int
}

RedisConfiguration redis config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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