locale

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PantsSourceID source ID for the pants module
	PantsSourceID = "github.com/snivilised/pants"
)

Variables

View Source
var ErrBadObservation = BadObservationError{
	LocalisableError: li18ngo.LocalisableError{
		Data: BadObservationErrorTemplData{},
	},
}
View Source
var ErrInvalidPoolExpiry = InvalidPoolExpiryError{
	LocalisableError: li18ngo.LocalisableError{
		Data: InvalidPoolExpiryErrorTemplData{},
	},
}
View Source
var ErrInvalidPreAllocSize = InvalidPreAllocSizeError{
	LocalisableError: li18ngo.LocalisableError{
		Data: InvalidPreAllocSizeErrorTemplData{},
	},
}
View Source
var ErrLackPoolFunc = LackPoolFuncError{
	LocalisableError: li18ngo.LocalisableError{
		Data: LackPoolFuncErrorTemplData{},
	},
}
View Source
var ErrPoolClosed = PoolClosedError{
	LocalisableError: li18ngo.LocalisableError{
		Data: PoolClosedErrorTemplData{},
	},
}
View Source
var ErrPoolOverload = PoolOverloadError{
	LocalisableError: li18ngo.LocalisableError{
		Data: PoolOverloadErrorTemplData{},
	},
}
View Source
var ErrQueueIsFull = QueueIsFullError{
	LocalisableError: li18ngo.LocalisableError{
		Data: QueueIsFullErrorTemplData{},
	},
}
View Source
var ErrQueueIsReleased = QueueIsReleasedError{
	LocalisableError: li18ngo.LocalisableError{
		Data: QueueIsReleasedErrorTemplData{},
	},
}
View Source
var ErrTimeout = TimeoutError{
	LocalisableError: li18ngo.LocalisableError{
		Data: TimeoutErrorTemplData{},
	},
}

Functions

This section is empty.

Types

type BadObservationError added in v0.1.4

type BadObservationError struct {
	li18ngo.LocalisableError
}

type BadObservationErrorTemplData added in v0.1.4

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

BadObservationTemplData will be returned when trying to insert item to a released worker queue

func (BadObservationErrorTemplData) Message added in v0.1.4

Message

func (BadObservationErrorTemplData) SourceID added in v0.1.4

func (td BadObservationErrorTemplData) SourceID() string

type FooBarError

type FooBarError struct {
	li18ngo.LocalisableError
}

func NewFooBarError

func NewFooBarError(path string, reason error) FooBarError

NewFooBarError creates a FooBarError

func (FooBarError) FooBar

func (e FooBarError) FooBar() bool

FooBar enables the client to check if error is FooBarError via FooBarErrorBehaviourQuery

type FooBarErrorBehaviourQuery

type FooBarErrorBehaviourQuery interface {
	FooBar() bool
}

FooBarErrorBehaviourQuery used to query if an error is: "Failed to read directory contents from the path specified"

type FooBarTemplData

type FooBarTemplData struct {
	Path   string
	Reason error
	// contains filtered or unexported fields
}

FooBarTemplData - TODO: this is a none existent error that should be replaced by the client. Its just defined here to illustrate the pattern that should be used to implement i18n with extendio. Also note, that this message has been removed from the translation files, so it is not useable at run time.

func (FooBarTemplData) Message

func (td FooBarTemplData) Message() *i18n.Message

the ID should use spp/library specific code, so replace astrolib with the name of the library implementing this template project.

func (FooBarTemplData) SourceID

func (td FooBarTemplData) SourceID() string

type InvalidPoolExpiryError

type InvalidPoolExpiryError struct {
	li18ngo.LocalisableError
}

type InvalidPoolExpiryErrorTemplData

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

InvalidPoolExpiryErrorTemplData will be returned when setting a negative number as the periodic duration to purge goroutines.

func (InvalidPoolExpiryErrorTemplData) Message

Message

func (InvalidPoolExpiryErrorTemplData) SourceID

func (td InvalidPoolExpiryErrorTemplData) SourceID() string

type InvalidPreAllocSizeError

type InvalidPreAllocSizeError struct {
	li18ngo.LocalisableError
}

type InvalidPreAllocSizeErrorTemplData

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

InvalidPreAllocSizeErrorTemplData will be returned when trying to set up a negative capacity under PreAlloc mode.

func (InvalidPreAllocSizeErrorTemplData) Message

Message

func (InvalidPreAllocSizeErrorTemplData) SourceID

func (td InvalidPreAllocSizeErrorTemplData) SourceID() string

type LackPoolFuncError

type LackPoolFuncError struct {
	li18ngo.LocalisableError
}

type LackPoolFuncErrorTemplData

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

LackPoolFuncErrorTemplData will be returned when invokers don't provide function for pool.

func (LackPoolFuncErrorTemplData) Message

func (td LackPoolFuncErrorTemplData) Message() *i18n.Message

Message

func (LackPoolFuncErrorTemplData) SourceID

func (td LackPoolFuncErrorTemplData) SourceID() string

type PoolClosedError

type PoolClosedError struct {
	li18ngo.LocalisableError
}

type PoolClosedErrorTemplData

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

PoolClosedErrorTemplData will be returned when submitting task to a closed pool.

func (PoolClosedErrorTemplData) Message

func (td PoolClosedErrorTemplData) Message() *i18n.Message

Message

func (PoolClosedErrorTemplData) SourceID

func (td PoolClosedErrorTemplData) SourceID() string

type PoolOverloadError

type PoolOverloadError struct {
	li18ngo.LocalisableError
}

type PoolOverloadErrorTemplData

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

PoolOverloadErrorTemplData will be returned when the pool is full and no workers available.

func (PoolOverloadErrorTemplData) Message

func (td PoolOverloadErrorTemplData) Message() *i18n.Message

Message

func (PoolOverloadErrorTemplData) SourceID

func (td PoolOverloadErrorTemplData) SourceID() string

type QueueIsFullError

type QueueIsFullError struct {
	li18ngo.LocalisableError
}

type QueueIsFullErrorTemplData

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

QueueIsFullTemplData error created when the worker queue is full.

func (QueueIsFullErrorTemplData) Message

func (td QueueIsFullErrorTemplData) Message() *i18n.Message

Message

func (QueueIsFullErrorTemplData) SourceID

func (td QueueIsFullErrorTemplData) SourceID() string

type QueueIsReleasedError

type QueueIsReleasedError struct {
	li18ngo.LocalisableError
}

type QueueIsReleasedErrorTemplData

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

QueueIsReleasedTemplData will be returned when trying to insert item to a released worker queue

func (QueueIsReleasedErrorTemplData) Message

Message

func (QueueIsReleasedErrorTemplData) SourceID

func (td QueueIsReleasedErrorTemplData) SourceID() string

type TimeoutError

type TimeoutError struct {
	li18ngo.LocalisableError
}

type TimeoutErrorTemplData

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

TimeoutErrorTemplData will be returned if an operation timed out.

func (TimeoutErrorTemplData) Message

func (td TimeoutErrorTemplData) Message() *i18n.Message

Message

func (TimeoutErrorTemplData) SourceID

func (td TimeoutErrorTemplData) SourceID() string

type UsingConfigFileTemplData

type UsingConfigFileTemplData struct {
	ConfigFileName string
	// contains filtered or unexported fields
}

func (UsingConfigFileTemplData) Message

func (td UsingConfigFileTemplData) Message() *i18n.Message

func (UsingConfigFileTemplData) SourceID

func (td UsingConfigFileTemplData) SourceID() string

Jump to

Keyboard shortcuts

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