Documentation ¶
Index ¶
- func FatalError(message string, err error)
- func GenerateUUID() string
- func GetEnv() string
- func GetEnvVariable(variable string) string
- func GetLogLevelFromString(loglevel string) zapcore.Level
- func InitLogging(options LoggerOptions)
- func IsJSON(s string) bool
- func LoadHtmlTemplates(server *gin.Engine, templates map[string]string) error
- func StrToInt(value string) int
- func StrToInt64(value string) int64
- func WinningDefault(value string, values ...string) string
- type Domain
- type IdentityMessage
- type LogMessage
- type LoggerOptions
- type Message
- func (m Message) Marshal() ([]byte, error)
- func (message Message) MarshalLogObject(encoder zapcore.ObjectEncoder) error
- func (m Message) MarshalPayload() ([]byte, error)
- func (m Message) ToIdentityMessage() (IdentityMessage, error)
- func (m Message) ToLogMessage() (LogMessage, error)
- func (m Message) ToSubscriberConnectedMessage() (SubscriberConnectedMessage, error)
- type SubscriberConnectedMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalError ¶
func GenerateUUID ¶
func GenerateUUID() string
func GetEnvVariable ¶
func GetLogLevelFromString ¶
func InitLogging ¶
func InitLogging(options LoggerOptions)
func LoadHtmlTemplates ¶
func StrToInt64 ¶
func WinningDefault ¶
Function will pick first argument if it was not empty, or it will loop over the rest of the arguments And pick the first not empty one
Types ¶
type Domain ¶
func BuildDomain ¶
type IdentityMessage ¶
type LogMessage ¶
type LogMessage struct {
Line string `json:"line"`
}
type LoggerOptions ¶
type Message ¶
type Message struct { Id string `json:"id"` Payload interface{} `json:"payload"` Event string `json:"event"` }
func NewMessageFromString ¶
func (Message) MarshalLogObject ¶
func (message Message) MarshalLogObject(encoder zapcore.ObjectEncoder) error
func (Message) MarshalPayload ¶
func (Message) ToIdentityMessage ¶
func (m Message) ToIdentityMessage() (IdentityMessage, error)
func (Message) ToLogMessage ¶
func (m Message) ToLogMessage() (LogMessage, error)
func (Message) ToSubscriberConnectedMessage ¶
func (m Message) ToSubscriberConnectedMessage() (SubscriberConnectedMessage, error)
type SubscriberConnectedMessage ¶
type SubscriberConnectedMessage struct {
Connected bool `json:"connected"`
}
func (SubscriberConnectedMessage) Marshal ¶
func (m SubscriberConnectedMessage) Marshal() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.