Documentation ¶
Index ¶
Constants ¶
View Source
const ( LOG_OK = "OK" LOG_INFO = "INFO" LOG_DEBUG = "DEBUG" LOG_ERROR = "ERROR" )
Variables ¶
This section is empty.
Functions ¶
func EncodeJSON ¶
EncodeJSON marshals the body to produce a string format JSON.
Types ¶
type KVP ¶
type KVP struct { Key string Value interface{} }
KVP is a Key-Value Pair. Also called an attribute-value pair. It's a data representation in computing systems and applications
type Logs ¶
type Logs struct { Code string `json:"log_code"` Message any `json:"log_msg"` ErrorMessage string `json:"log_errmsg,omitempty"` Level string `json:"log_level"` Keys map[string]any `json:"log_keys,omitempty"` TimeStamp string `json:"log_timestamp"` }
func (*Logs) Print ¶
func (log *Logs) Print()
Print marshal response JSON to print a string format JSON.
func (*Logs) SetKeys ¶
SetKeys checks if Log Keys are empty in order to create an empty map. If it's not empty, set its key-value pair.
func (*Logs) SetTimeStamp ¶
func (l *Logs) SetTimeStamp()
SetTimeStamp sets the current timestamp with the ff. format: 2006-01-02 15:04:05.
Click to show internal directories.
Click to hide internal directories.