Documentation ¶
Overview ¶
* Copyright 2023 Caio Matheus Marcatti Calimério * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeContextManager ¶
type SafeContextManager struct {
// contains filtered or unexported fields
}
func NewSafeContextManager ¶
func NewSafeContextManager() *SafeContextManager
NewSafeContextManager retorna a única instância do SafeContextManager.
func (*SafeContextManager) CreateValue ¶
func (scm *SafeContextManager) CreateValue(key string, value interface{}) map[interface{}]interface{}
CreateValue cria e retorna um valor no formato aceito pelo gls.Values a partir de uma única chave-valor.
func (*SafeContextManager) GetValue ¶
func (scm *SafeContextManager) GetValue(key string) (interface{}, bool)
GetValue recupera um valor específico do contexto.
func (*SafeContextManager) SetValues ¶
func (scm *SafeContextManager) SetValues(values map[interface{}]interface{}, handler func())
SetValues define vários valores no contexto e executa a função handler.