fcsutility2

package module
v0.0.0-...-1f101e5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Statement = "1"
	Detail    = "2"
	Panic     = "P"
	NoPanic   = "NP"
	INSERT    = "INSERT"
	UPDATE    = "UPDATE"
)

Variables

This section is empty.

Functions

func Debug

func Debug(db *sql.DB, defaultdisp string, debug string, debuglevel string, pdebuglevel string, programid string, program string, msg string)

-------------------------------------------------------------------- function to insert debug message into db --------------------------------------------------------------------

func EmailLog

func EmailLog(db *sql.DB, email EmailLogType) error

--------------------------------------------------------------------------------- Function to manage record for email log table ---------------------------------------------------------------------------------

func Error

func Error(db *sql.DB, programid string, program string, msg string)

-------------------------------------------------------------------- function to insert debug message into db --------------------------------------------------------------------

func ErrorNP

func ErrorNP(db *sql.DB, programid string, program string, msg string)

-------------------------------------------------------------------- function to insert debug message into db --------------------------------------------------------------------

func GetCoreSettingValue

func GetCoreSettingValue(db *sql.DB, key string) string

-------------------------------------------------------------------- function to get value from core setting for a given Key --------------------------------------------------------------------

func GetCurrentHr

func GetCurrentHr() string

-------------------------------------------------------------------- function to get system hour --------------------------------------------------------------------

func Getdb

func Getdb(dbtype string, dbdtl Database) (*sql.DB, error)

-------------------------------------------------------------------- function establishes DB connection --------------------------------------------------------------------

func InsertTicketLog

func InsertTicketLog(db *sql.DB, ticket TicketLog) error

--------------------------------------------------------------------------------- Function inserts record into ticket log table ---------------------------------------------------------------------------------

func InsertTicketLog2

func InsertTicketLog2(db *sql.DB, ticket TicketLog) (error, int)

--------------------------------------------------------------------------------- Function inserts record into ticket log table with return of id ---------------------------------------------------------------------------------

func InsertUploadMaster

func InsertUploadMaster(db *sql.DB, uploadMasterRec UploadMaster) (int, error)

--------------------------------------------------------------------------------- Function inserts and return upload master ID ---------------------------------------------------------------------------------

func LogError

func LogError(logtype string, msg interface{})

-------------------------------------------------------------------- function to log error --------------------------------------------------------------------

func RecordRunDetails

func RecordRunDetails(db *sql.DB, id int, runType string, programName string, count int, cmt string) (int, error)

-------------------------------------------------------------------- function to record program start and end time details into db --------------------------------------------------------------------

func ReturnNil

func ReturnNil(s string) interface{}

func UpdateTicketLog

func UpdateTicketLog(db *sql.DB, ticket TicketLog) error

--------------------------------------------------------------------------------- Function inserts record into ticket log table ---------------------------------------------------------------------------------

func UpdateTicketLog2

func UpdateTicketLog2(db *sql.DB, ticket TicketLog) error

--------------------------------------------------------------------------------- Function inserts record into ticket log table with spawned, processed ---------------------------------------------------------------------------------

Types

type Behaviour

type Behaviour struct {
	Debug        string
	DebugLevel   string
	DisplayDebug string
	ProgramId    string
	ProgramUser  string
	ProgramName  string
}

type Database

type Database struct {
	Server   string
	Port     string
	Database string
	User     string
	Password string
	DbType   string
}

type EmailLogType

type EmailLogType struct {
	Action         string
	Id             string
	EmailServer    string
	Type           string
	From           string
	FromDspName    string
	To             string
	Cc             string
	Bcc            string
	ReplyTo        string
	Subject        string
	Body           string
	CreationDate   string
	SentDate       string
	Status         string
	ErrorMsg       string
	CreatedProgram string
}

type TicketLog

type TicketLog struct {
	Id                 string
	ClientId           string
	Description        string
	Source             string
	SummaryUser        string
	TicketStatus       string
	ZohoDepartmentId   string
	UploadDataMasterId int
	AssigneeId         string
	Spawned            bool
	Processed          bool
	STCode             string
	CreatedBy          string
	CreatedProgram     string
	UpdatedBy          string
	UpdatedProgram     string
}

type UploadMaster

type UploadMaster struct {
	Summary          string
	SourceCode       string
	IsDefault        string
	IsForceDefault   string
	ZohoDepartmentId string
	UploadFileName   string
	UploadedBy       string
	CampaignId       string
	IsCampaign       string
}

Jump to

Keyboard shortcuts

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