application

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: OSL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateTimeService

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

dateTimeService is a basic support service for date/time parsing

func (*DateTimeService) GetDateTimeFormatter

func (dts *DateTimeService) GetDateTimeFormatter(timeValue time.Time) (*domain.DateTimeFormatter, error)

GetDateTimeFormatter from time

func (*DateTimeService) GetDateTimeFormatterFromIsoString

func (dts *DateTimeService) GetDateTimeFormatterFromIsoString(dateTimeString string) (*domain.DateTimeFormatter, error)

GetDateTimeFromString Need string in format ISO: "2017-11-25T06:30:00Z"

func (*DateTimeService) Inject

func (dts *DateTimeService) Inject(
	logger flamingo.Logger,
	config *struct {
		DateFormat     string `inject:"config:locale.date.dateFormat"`
		TimeFormat     string `inject:"config:locale.date.timeFormat"`
		DateTimeFormat string `inject:"config:locale.date.dateTimeFormat"`
		Location       string `inject:"config:locale.date.location"`
	},
)

Inject dependencies

type DateTimeServiceInterface

type DateTimeServiceInterface interface {
	GetDateTimeFormatterFromIsoString(dateTimeString string) (*domain.DateTimeFormatter, error)
	GetDateTimeFormatter(dateTime time.Time) (*domain.DateTimeFormatter, error)
}

type TranslationService

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

func (*TranslationService) Inject

func (ts *TranslationService) Inject(
	logger flamingo.Logger,
	config *struct {
		DefaultLocaleCode string       `inject:"config:locale.locale"`
		DevMode           bool         `inject:"config:debug.mode"`
		TranslationFile   string       `inject:"config:locale.translationFile,optional"`
		TranslationFiles  config.Slice `inject:"config:locale.translationFiles,optional"`
	},
)

Inject dependencies

func (*TranslationService) Translate

func (ts *TranslationService) Translate(key string, defaultLabel string, localeCode string, count int, translationArguments map[string]interface{}) string

type TranslationServiceInterface

type TranslationServiceInterface interface {
	Translate(key string, defaultLabel string, localeCode string, count int, translationArguments map[string]interface{}) string
}

TranslationServiceInterface defines the translation service

Jump to

Keyboard shortcuts

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