dbman

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 13 Imported by: 0

README

Статья на 1div0.ru

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResultToJson

func ResultToJson(rows *sql.Rows) ([]byte, error)

Types

type CommandDescriptor

type CommandDescriptor struct {
	CommandName string                       `json:"cmd_name"`
	DbProcName  string                       `json:"db_proc_name"`
	CallMethod  string                       `json:"call_method"`
	Parameters  []CommandParameterDescriptor `json:"parameters"`
}

type CommandParameterDescriptor

type CommandParameterDescriptor struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Default string `json:"default"`
}

type DataBaseManager

type DataBaseManager struct {
	// contains filtered or unexported fields
}

func (*DataBaseManager) ExecuteCommand

func (db *DataBaseManager) ExecuteCommand(w http.ResponseWriter, r *http.Request, user_id int64) error

func (*DataBaseManager) Init

func (db *DataBaseManager) Init(SqlExec SqlExecutor, CommandParametersFileName string, CommandPathPrefix string, ParametersCountLimit int) error

func (*DataBaseManager) UserRegistration

func (db *DataBaseManager) UserRegistration(u *oauth.UserData) error

type SqlExecutor

type SqlExecutor interface {
	SqlExecute(cmd_name string, cmd_arg ...interface{}) (*sql.Rows, error)
}

Jump to

Keyboard shortcuts

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