common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, result interface{}) error

func GetAddressFromControlProgram

func GetAddressFromControlProgram(prog []byte) string

func GetControlProgramFromAddress

func GetControlProgramFromAddress(address string) ([]byte, error)

func NewMySQLDB

func NewMySQLDB(cfg MySQLConfig) (*gorm.DB, error)

func Post

func Post(url string, payload []byte, result interface{}) error

Types

type MySQLConfig

type MySQLConfig struct {
	Connection MySQLConnection `json:"connection"`
	LogMode    bool            `json:"log_mode"`
}

type MySQLConnection

type MySQLConnection struct {
	Host     string `json:"host"`
	Port     uint   `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	DbName   string `json:"database"`
}

Jump to

Keyboard shortcuts

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