internal

package
v0.0.0-...-31a6bf9 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSentryEmptyParam = errors.New("[err] sentry empty params")
)
View Source
var (
	ErrorEmptyParams = errors.New("[err] empty params")
)

Functions

func DailyStringToTime

func DailyStringToTime(s string) time.Time

DailyStringToTime converts string formatted daily layout to time.

func GenerateBadge

func GenerateBadge(leftText, leftBgColor, rightText, rightBgColor string, edgeFlat bool) badge.Badge

GenerateBadge makes Flat-Badge struct which is used go-counter-badge/badge.

func GetRoot

func GetRoot() string

GetRoot returns root path.

func HourlyStringToTime

func HourlyStringToTime(s string) time.Time

HourlyStringToTime converts string formatted hourly layout to time.

func InitSentry

func InitSentry(sentryDSN, environment, release, hostname string, stack, debug bool) error

InitSentry is to initialize Sentry setting.

func MonthlyStringToTime

func MonthlyStringToTime(s string) time.Time

MonthlyStringToTime converts string formatted monthly layout to time.

func NewLogger

func NewLogger(dir, filename string) (*log.Logger, error)

NewLogger is to create a logger object for Echo platform.

func ParseURL

func ParseURL(s string) (schema, host, port, path, query, fragment string, err error)

ParseURL parses url.

func SentryError

func SentryError(err error)

Error sends an error to Sentry.

func SentryErrorWithContext

func SentryErrorWithContext(err error, ctx echo.Context, info map[string]string)

ErrorWithEcho sends an error with the Echo of context information to the Sentry.

func StringInSlice

func StringInSlice(str string, list []string) bool

StringInSlice checks a string element is included to string array.

func StringToTime

func StringToTime(s string) time.Time

StringToTime converts string to time.

func TimeToDailyStringFormat

func TimeToDailyStringFormat(t time.Time) string

TimeToDailyStringFormat converts time to string formatted daily layout

func TimeToHourlyStringFormat

func TimeToHourlyStringFormat(t time.Time) string

TimeToHourlyStringFormat converts time to string formatted hourly layout

func TimeToMonthlyStringFormat

func TimeToMonthlyStringFormat(t time.Time) string

TimeToMonthlyStringFormat converts time to string formatted monthly layout.

func TimeToString

func TimeToString(t time.Time) string

TimeToString converts time to string.

func TimeToYearlyStringFormat

func TimeToYearlyStringFormat(t time.Time) string

TimeToYearlyStringFormat converts time to string formatted yearly layout.

func TimestampByMaxTime

func TimestampByMaxTime() int64

TimestampByMaxTime returns max unix nano.

func YearlyStringToTime

func YearlyStringToTime(s string) time.Time

YearlyStringToTime converts string formatted yearly layout to time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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