Sessions

Technical reference of Sesiones.

This API is used in Sessions.


Symbols

SymbolClassDescription
SessiontypeSession defines a public type of API.
ExpireSessiontypeExpireSession defines a public type of API.
SessionRegistryBindingstypeSessionRegistryBindings defines a public type of API.
SessionRegistrytypeSessionRegistry defines a public type of API.
SessionsvarSessions it exposes a shared value of the package.
SessionRegistry.GetfuncIt gets the first value associated with a key.

Session

Declaration:

gox
type Session = server.Session

Session defines a public type of API.


ExpireSession

Declaration:

gox
type ExpireSession = server.ExpireSession

ExpireSession defines a public type of API.


SessionRegistryBindings

Declaration:

gox
type SessionRegistryBindings struct {
	Get func(sessionID string) (*Session, error)
}

SessionRegistryBindings defines a public type of API.

Fields

FieldTypeDescription
Getfunc(sessionID string) (*Session, error)Query callback.

SessionRegistry

Declaration:

gox
type SessionRegistry struct {
	// contiene campos internos
}

SessionRegistry defines a public type of API.


Sessions

Declaration:

gox
var Sessions = newSessionRegistry()

Sessions it exposes a shared value of the package.


SessionRegistry.Get

Declaration:

gox
func (s *SessionRegistry) Get(sessionID string) (*Session, error)

It gets the first value associated with a key.

Parameters

ParameterTypeDescription
sessionIDstringType value string required by the operation.

Returns

ReturnTypeDescription
value*SessionType value *Session produced by the operation.
errerrornil if the operation ends correctly; otherwise, the error produced.

Behavior

When the key does not exist, it returns the zero value of T and false.

Errors

Get returns an error when the arguments, the status of the receiver or the underlying operation make it impossible to complete the call.

Usage syntax

gox
value, err := sessionRegistry.Get(value)

See also

Next step

Continue with global status and server information.

Status and information