Documentation ¶
Index ¶
- func GroupReferenceValidation(sl validator.StructLevel)
- func LabelReferenceValidation(sl validator.StructLevel)
- type AssetSource
- type Channel
- type ChannelReference
- type ChannelRole
- type ChannelUUID
- type Field
- type FieldReference
- type FieldType
- type Flow
- type FlowReference
- type FlowUUID
- type Group
- type GroupReference
- type GroupUUID
- type Label
- type LabelReference
- type LabelUUID
- type LocationHierarchy
- type Resthook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupReferenceValidation ¶ added in v0.15.1
func GroupReferenceValidation(sl validator.StructLevel)
GroupReferenceValidation validates that the given group reference is either a concrete reference or a name matcher
func LabelReferenceValidation ¶ added in v0.15.1
func LabelReferenceValidation(sl validator.StructLevel)
LabelReferenceValidation validates that the given label reference is either a concrete reference or a name matcher
Types ¶
type AssetSource ¶ added in v0.15.0
type AssetSource interface { Channels() ([]Channel, error) Fields() ([]Field, error) Flow(FlowUUID) (Flow, error) Groups() ([]Group, error) Labels() ([]Label, error) Locations() ([]LocationHierarchy, error) Resthooks() ([]Resthook, error) }
AssetSource is a source of assets
type Channel ¶ added in v0.15.0
type Channel interface { UUID() ChannelUUID Name() string Address() string Schemes() []string Roles() []ChannelRole Parent() *ChannelReference Country() string MatchPrefixes() []string }
Channel is something that can send/receive messages
type ChannelReference ¶ added in v0.15.1
type ChannelReference struct { UUID ChannelUUID `json:"uuid" validate:"required,uuid"` Name string `json:"name"` }
ChannelReference is used to reference a channel
func NewChannelReference ¶ added in v0.15.1
func NewChannelReference(uuid ChannelUUID, name string) *ChannelReference
NewChannelReference creates a new channel reference with the given UUID and name
type ChannelRole ¶ added in v0.15.0
type ChannelRole string
ChannelRole is a role that a channel can perform
const ( ChannelRoleSend ChannelRole = "send" ChannelRoleReceive ChannelRole = "receive" ChannelRoleCall ChannelRole = "call" ChannelRoleAnswer ChannelRole = "answer" ChannelRoleUSSD ChannelRole = "ussd" )
different roles that channels can perform
type ChannelUUID ¶ added in v0.15.0
ChannelUUID is the UUID of a channel
type FieldReference ¶ added in v0.15.1
type FieldReference struct { Key string `json:"key" validate:"required"` Name string `json:"name"` }
FieldReference is a reference to field
func NewFieldReference ¶ added in v0.15.1
func NewFieldReference(key string, label string) *FieldReference
NewFieldReference creates a new field reference with the given key and label
type FieldType ¶ added in v0.15.0
type FieldType string
FieldType is the data type of values for each field
type Flow ¶ added in v0.15.0
type Flow interface { UUID() FlowUUID Name() string Definition() json.RawMessage }
Flow is graph of nodes with actions and routers
type FlowReference ¶ added in v0.15.1
type FlowReference struct { UUID FlowUUID `json:"uuid" validate:"required,uuid4"` Name string `json:"name"` }
FlowReference is used to reference a flow from another flow
func NewFlowReference ¶ added in v0.15.1
func NewFlowReference(uuid FlowUUID, name string) *FlowReference
NewFlowReference creates a new flow reference with the given UUID and name
type GroupReference ¶ added in v0.15.1
type GroupReference struct { UUID GroupUUID `json:"uuid,omitempty" validate:"omitempty,uuid4"` Name string `json:"name,omitempty"` NameMatch string `json:"name_match,omitempty"` }
GroupReference is used to reference a group
func NewGroupReference ¶ added in v0.15.1
func NewGroupReference(uuid GroupUUID, name string) *GroupReference
NewGroupReference creates a new group reference with the given UUID and name
func NewVariableGroupReference ¶ added in v0.15.1
func NewVariableGroupReference(nameMatch string) *GroupReference
NewVariableGroupReference creates a new group reference from the given templatized name match
type LabelReference ¶ added in v0.15.1
type LabelReference struct { UUID LabelUUID `json:"uuid,omitempty" validate:"omitempty,uuid4"` Name string `json:"name,omitempty"` NameMatch string `json:"name_match,omitempty"` }
LabelReference is used to reference a label
func NewLabelReference ¶ added in v0.15.1
func NewLabelReference(uuid LabelUUID, name string) *LabelReference
NewLabelReference creates a new label reference with the given UUID and name
func NewVariableLabelReference ¶ added in v0.15.1
func NewVariableLabelReference(nameMatch string) *LabelReference
NewVariableLabelReference creates a new label reference from the given templatized name match
Directories ¶
Path | Synopsis |
---|---|
Package rest is an implementation of AssetSource which fetches assets from a REST server.
|
Package rest is an implementation of AssetSource which fetches assets from a REST server. |
Package static is an implementation of AssetSource which loads assets from a static JSON file.
|
Package static is an implementation of AssetSource which loads assets from a static JSON file. |