Documentation ¶
Index ¶
- func AsFloat(v string) float64
- func AsFloatSlice(v string) []float64
- func AsInt(v string) int64
- func AsIntSlice(v string) []int64
- func AsStringSlice(v string) []string
- func UpdateTags(tags types.JSONStringMap, updates []*types.TagUpdate) []bool
- type Client
- type Env
- type Room
- type Source
- type TagsEnv
- type Target
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsFloatSlice ¶
AsFloatSlice parses the TagValue as a comma-separated slice of float64s (0.0 in every unparsable item)
func AsIntSlice ¶
AsIntSlice parses the TagValue as a comma-separated slice of int64s (0 in every unparsable item)
func AsStringSlice ¶
AsStringSlice parses the TagValue as a comma-separated slice of strings
func UpdateTags ¶
func UpdateTags(tags types.JSONStringMap, updates []*types.TagUpdate) []bool
UpdateTags modifies the tags map (required to be non-nil!) according to the given set of updates. Each types.TagUpdate contains the name of the map entry to update, the type of the entry (one of the TagValueType* consts), an index (for the slice types) and an expression to be applied (the tags are accessible as "Tags", the helper functions for type conversion of the entries are listed above). UpdateTags is supposed to be called from within the persister transactions in persister.UpdateUserTags and persister.UpdateRoomTags
Types ¶
type Client ¶
type Client struct {
ClientLanguage string
}
Client is the representation of the connected client ws.Client inside the Env
type Env ¶
type Env struct { Room Source Target Created int64 Language string Name string Tags map[string]string AsInt func(string) int64 AsFloat func(string) float64 AsStringSlice func(string) []string AsIntSlice func(string) []int64 AsFloatSlice func(string) []float64 }
Env is the complete environment of input data for target or plugin filters
type TagsEnv ¶
type TagsEnv struct { Tags map[string]string AsInt func(string) int64 AsFloat func(string) float64 AsStringSlice func(string) []string AsIntSlice func(string) []int64 AsFloatSlice func(string) []float64 }
TagsEnv is the environment for tag updates (see UpdateTags)