Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var HttpMethods = HttpMethod{}.New()
HttpMethods is an initialized HttpMethodEnum variable.
var Protocols = Protocol{}.New()
Protocols is an initialized ProtocolEnum variable.
Functions ¶
This section is empty.
Types ¶
type FuncMapper ¶
FuncMapper is an interface defining an object that returns a template.FuncMap
type HttpMethod ¶
type HttpMethod = Enum[HttpMethodEnum]
HttpMethod is an Enum aloas for HttpMethodEnum
type HttpMethodEnum ¶
type HttpMethodEnum struct {
GET,
HEAD,
POST,
PUT,
PATCH,
DELETE,
CONNECT,
OPTIONS,
TRACE,
USE HttpMethod
}
HttpMethodEnum is an Enum struct defining HTTP Methods
type LocaleFuncMap ¶
type LocaleFuncMap struct {
// contains filtered or unexported fields
}
LocaleFuncMap implements FuncMapper and deliver template functions to retrieve translation and localized message.
Functions :
- "translate": [LocaleMessageBundle.Translate]
- "cardinal": [LocaleMessageBundle.Cardinal]
- "ordinal": [LocaleMessageBundle.Ordinal]
- "ranges": [LocaleMessageBundle.Range]
func (*LocaleFuncMap) FuncMap ¶
func (this *LocaleFuncMap) FuncMap() template.FuncMap
FuncMap() implements FuncMapper
func (LocaleFuncMap) New ¶
func (this LocaleFuncMap) New(contextHolder LocaleContextHolder, messageSource MessageSource) *LocaleFuncMap
New() create a new LocaleFuncMap using a [ThreadLocaleContextHolder] and [MessageSource]
type ProtocolEnum ¶
type ProtocolEnum struct {
HTTP,
HTTPS,
GRPC Protocol
}
ProtocolEnum is an Enum struct defining web protocols
type RequestMapping ¶
type RequestMapping interface {
// contains filtered or unexported methods
}
RequestMapping is a marker interface used to indicate a possible mapping for a [core.Controller] or a [core.Controller] method.
It should contain in a struct tag the following elements :
- Path : the requested path URI to map to
- Method : the HttpMethod to map to
NOTE: Rays primary module (this project) does not provide by itself a working core.Controller implementation.
type TemplateFunctionMap ¶
type TemplateFunctionMap struct {
// contains filtered or unexported fields
}
TemplateFunctionMap is a container object for template.FuncMap
func (*TemplateFunctionMap) Add ¶
func (this *TemplateFunctionMap) Add(name string, fn any) Error
Add() adds a function "fn" with name "name" to the this TemplateFunctionMap
func (*TemplateFunctionMap) FuncMap ¶
func (this *TemplateFunctionMap) FuncMap() template.FuncMap
FuncMap() returns all the template function loaded as a template.FuncMap
func (*TemplateFunctionMap) Load ¶
func (this *TemplateFunctionMap) Load(fnmap template.FuncMap) Error
Load() will load an already defined template.FuncMap into itself.
func (TemplateFunctionMap) New ¶
func (this TemplateFunctionMap) New() *TemplateFunctionMap
New() creates a new TemplateFunctionMap