Documentation ¶
Index ¶
- func Get[V any](vars *ServerVars, key string) (V, error)
- type ServerVars
- func (vars *ServerVars) Decode(ctx context.Context, b []byte) error
- func (vars *ServerVars) Encode(ctx context.Context) ([]byte, error)
- func (vars *ServerVars) GetBool(key string) (bool, error)
- func (vars *ServerVars) GetFloat64(key string) (float64, error)
- func (vars *ServerVars) GetInt64(key string) (int64, error)
- func (vars *ServerVars) GetString(key string) (string, error)
- func (vars *ServerVars) Keys() iter.Seq[string]
- func (vars *ServerVars) Len() int
- func (vars *ServerVars) SetBool(key string, value bool)
- func (vars *ServerVars) SetFloat64(key string, value float64)
- func (vars *ServerVars) SetInt64(key string, value int64)
- func (vars *ServerVars) SetString(key string, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServerVars ¶
ServerVars manages server variables with a map of key-value pairs.
func NewServerVars ¶
func NewServerVars() *ServerVars
NewServerVars creates and returns a new instance of Vars,
func (*ServerVars) Decode ¶
func (vars *ServerVars) Decode(ctx context.Context, b []byte) error
Decode decodes a go binary object containing workflow variables.
func (*ServerVars) Encode ¶
func (vars *ServerVars) Encode(ctx context.Context) ([]byte, error)
Encode encodes the map of workflow variables into a go binary to be sent across the wire.
func (*ServerVars) GetBool ¶
func (vars *ServerVars) GetBool(key string) (bool, error)
GetBool validates that a key has an underlying value in the map[int]interface{} vars and safely returns the result.
func (*ServerVars) GetFloat64 ¶
func (vars *ServerVars) GetFloat64(key string) (float64, error)
GetFloat64 validates that a key has an underlying value in the map[int]interface{} vars and safely returns the result.
func (*ServerVars) GetInt64 ¶
func (vars *ServerVars) GetInt64(key string) (int64, error)
GetInt64 validates that a key has an underlying value in the map[int]interface{} vars and safely returns the result.
func (*ServerVars) GetString ¶
func (vars *ServerVars) GetString(key string) (string, error)
GetString validates that a key has an underlying value in the map[string]interface{} vars and safely returns the result.
func (*ServerVars) Keys ¶
func (vars *ServerVars) Keys() iter.Seq[string]
Keys returns a sequence of all keys present in the Vars map.
func (*ServerVars) Len ¶
func (vars *ServerVars) Len() int
Len returns the number of key-value pairs in the Vals map of ServerVars.
func (*ServerVars) SetBool ¶
func (vars *ServerVars) SetBool(key string, value bool)
SetBool sets a boolean value for the specified key in the Vars map.
func (*ServerVars) SetFloat64 ¶
func (vars *ServerVars) SetFloat64(key string, value float64)
SetFloat64 sets a float64 value for the specified key in the Vars map.
func (*ServerVars) SetInt64 ¶
func (vars *ServerVars) SetInt64(key string, value int64)
SetInt64 sets an int64 value for the specified key in the Vars map.
func (*ServerVars) SetString ¶
func (vars *ServerVars) SetString(key string, value string)
SetString sets a string value for the specified key in the Vars map.