utils

package
v0.0.0-...-b4fdffc Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64PEM

func DecodeBase64PEM(pemString string) (string, error)

DecodeBase64PEM return string parsed from base64 string

func FilterEvents

func FilterEvents(events []string) []string

FilterEvents is return filters if existed in service

func GenerateApiKey

func GenerateApiKey(text string) (string, error)

func NewLogger

func NewLogger(output io.Writer) interfaces.ServiceLogger

NewLogger return new logger

func ValidateAdminApiKey

func ValidateAdminApiKey(apiKey, adminBase64 string) (bool, dto.AdminObject)

func VerifyIfUrlIsDuplicated

func VerifyIfUrlIsDuplicated(elems []dto.SubscriptionDTO, url, event string) bool

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is struct of logger default

func (*Logger) Error

func (l *Logger) Error(message string)

Error print error logs

func (*Logger) Info

func (l *Logger) Info(message string)

Info print info logs

func (*Logger) Warning

func (l *Logger) Warning(message string)

Warning print warning logs

Jump to

Keyboard shortcuts

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