utils

package
v0.0.0-...-6a5cec0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATETIME_FORMAT = "2006-01-02 15:04:05"
	DATE_FORMAT     = "2006-01-02"
)

Variables

This section is empty.

Functions

func Auth

func Auth(c *gin.Context) string

func Coid

func Coid(c *gin.Context) string

func CreateService

func CreateService(serviceName string, port int, fnc func(*gin.Engine))

func FormatDate

func FormatDate(date time.Time) string

func FormatDatetime

func FormatDatetime(date time.Time) string

func Log

func Log(service, coid, date, message string)

func NewAuthFilter

func NewAuthFilter(serviceName string) gin.HandlerFunc

func NewLoggerFilter

func NewLoggerFilter(service string) gin.HandlerFunc

func ToDate

func ToDate(value string) (time.Time, error)

Types

type LogEntry

type LogEntry struct {
	Service string
	Coid    string
	Date    string
	Message string
}

func (*LogEntry) String

func (entry *LogEntry) String() string

Jump to

Keyboard shortcuts

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