application

package
v3.0.0-alpha6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: OSL-3.0 Imports: 4 Imported by: 3

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)

GetDateTimeFormatterFromIsoString 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)
}

DateTimeServiceInterface to define a service to obtain formatted date time data

type LabelService

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

LabelService for translatable labels

func (*LabelService) Inject

func (l *LabelService) Inject(labelProvider labelProvider, config *struct {
	DefaultLocaleCode string `inject:"config:locale.locale"`
})

Inject dependencies

func (*LabelService) NewLabel

func (l *LabelService) NewLabel(key string) *domain.Label

NewLabel factory

Jump to

Keyboard shortcuts

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