types

package
v0.0.0-...-d323686 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageSendEvent  = "message:send"
	InstructPushEvent = "instruct:push"
)
View Source
const (
	MountTypeVolume string = "volume"
	MountTypeBind   string = "bind"
	MountTypeTmpfs  string = "tmpfs"
)

Variables

This section is empty.

Functions

func AppUrl

func AppUrl() string

func ExtractText

func ExtractText(content interface{}) string

func Id

func Id() string

func TimeNow

func TimeNow() time.Time

TimeNow returns current wall time in UTC rounded to milliseconds.

func Tye

func Tye(payload MsgPayload) string

Types

type Action

type Action string
const (
	Info  Action = "info"
	Pull  Action = "pull"
	Agent Action = "agent"
	Bots  Action = "bots"
	Help  Action = "help"
	Ack   Action = "ack"
)

type ActionMsg

type ActionMsg struct {
	ID     string   `json:"id"`
	Title  string   `json:"title"`
	Option []string `json:"option"`
	Value  string   `json:"value"`
}

func (ActionMsg) Convert

func (a ActionMsg) Convert() (KV, interface{})

type AttachmentOption

type AttachmentOption struct {
	Mime        string
	RelativeUrl string
	Size        int
}

type AudioMsg

type AudioMsg struct {
	Src      string  `json:"src"`
	Alt      string  `json:"alt"`
	Duration float64 `json:"duration"`
}

func (AudioMsg) Convert

func (i AudioMsg) Convert() (KV, interface{})

type Bot

type Bot string

type CardListMsg

type CardListMsg struct {
	Cards []CardMsg
}

func (CardListMsg) Convert

func (m CardListMsg) Convert() (KV, interface{})

type CardMsg

type CardMsg struct {
	Name  string
	Image string
	URI   string
	Text  string
}

func (CardMsg) Convert

func (m CardMsg) Convert() (KV, interface{})

type ChartMsg

type ChartMsg struct {
	Title    string    `json:"title"`
	SubTitle string    `json:"sub_title"`
	XAxis    []string  `json:"x_axis"`
	Series   []float64 `json:"series"`
}

func (ChartMsg) Convert

func (t ChartMsg) Convert() (KV, interface{})

type ChatMessage

type ChatMessage struct {
	Text        string       `json:"txt,omitempty"`
	Fmt         []FmtMessage `json:"fmt,omitempty"`
	Ent         []EntMessage `json:"ent,omitempty"`
	IsPlainText bool         `json:"-"`
	MessageType string       `json:"-"`

	Src MsgPayload `json:"src,omitempty"`
	Tye string     `json:"tye,omitempty"`
}

func (ChatMessage) Content

func (c ChatMessage) Content() (map[string]interface{}, interface{})

func (ChatMessage) GetEntDatas

func (c ChatMessage) GetEntDatas(tp string) []EntData

GetEntDatas get entity from chat message by entity type

func (ChatMessage) GetFormattedText

func (c ChatMessage) GetFormattedText() string

GetFormattedText Get original text message, inlude original '\n'

func (ChatMessage) GetGenericAttachment

func (c ChatMessage) GetGenericAttachment() []EntData

GetGenericAttachment get generic attachment

func (ChatMessage) GetHashTags

func (c ChatMessage) GetHashTags() []EntData

GetHashTags get hashtags

func (ChatMessage) GetImages

func (c ChatMessage) GetImages() []EntData

GetImages get images

func (c ChatMessage) GetLinks() []EntData

GetLinks get links

func (ChatMessage) GetMentions

func (c ChatMessage) GetMentions() []EntData

GetMentions get mentioned users

type Context

type Context struct {
	// Message ID denormalized
	Id string
	// Un-routable (original) topic name denormalized from XXX.Topic.
	Original string
	// Routable (expanded) topic name.
	RcptTo string
	// Sender's UserId as string.
	AsUser Uid
	// Sender's authentication level.
	AuthLvl int
	// Denormalized 'what' field of meta messages (set, get, del).
	MetaWhat int
	// Timestamp when this message was received by the server.
	Timestamp time.Time
	// OAuth token
	Token string
	// form id
	FormId string
	// form Rule id
	FormRuleId string
	// seq id
	SeqId int
	// form Rule id
	ActionRuleId string
	// condition
	Condition string
	// agent
	AgentId string
	// agent
	AgentVersion int
	// session Rule id
	SessionRuleId string
	// session init values
	SessionInitValues KV
	// session last values
	SessionLastValues KV
	// group event
	GroupEvent GroupEvent
	// pipeline flag id
	PipelineFlag string
	// pipeline rule id
	PipelineRuleId string
	// pipeline version
	PipelineVersion int
	// pipeline stage index
	PipelineStepIndex int
	// page rule id
	PageRuleId string
	// workflow rule id
	WorkflowRuleId string
}

func WithContext

func WithContext(ctx Context) Context

type CrateMsg

type CrateMsg struct {
	ID            string `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	Description   string `json:"description,omitempty"`
	Documentation string `json:"documentation,omitempty"`
	Homepage      string `json:"homepage,omitempty"`
	Repository    string `json:"repository,omitempty"`
	NewestVersion string `json:"newest_version,omitempty"`
	Downloads     int    `json:"downloads,omitempty"`
}

func (CrateMsg) Convert

func (c CrateMsg) Convert() (KV, interface{})

type DataFilter

type DataFilter struct {
	Prefix       *string
	CreatedStart *time.Time
	CreatedEnd   *time.Time
}

type DigitMsg

type DigitMsg struct {
	Title string `json:"title"`
	Digit int    `json:"digit"`
}

func (DigitMsg) Convert

func (a DigitMsg) Convert() (KV, interface{})

type EntData

type EntData struct {
	Mime   string      `json:"mime,omitempty"`
	Val    interface{} `json:"val,omitempty"`
	Url    string      `json:"url,omitempty"`
	Ref    string      `json:"ref,omitempty"`
	Width  int         `json:"width,omitempty"`
	Height int         `json:"height,omitempty"`
	Name   string      `json:"name,omitempty"`
	Size   int         `json:"size,omitempty"`
	Act    string      `json:"act,omitempty"`
}

type EntMessage

type EntMessage struct {
	Tp   string  `json:"tp,omitempty"`
	Data EntData `json:"data"`
}

type EventPayload

type EventPayload struct {
	Type   string
	Params KV
}

type FileDef

type FileDef struct {
	ObjHeader `bson:",inline"`
	// Status of upload
	Status int
	// User who created the file
	User string
	// Type of the file.
	MimeType string
	// Size of the file in bytes.
	Size int64
	// Internal file location, i.e. path on disk or an S3 blob address.
	Location string
}

FileDef is a stored record of a file upload

func (*FileDef) Uid

func (i *FileDef) Uid() Uid

type FileMsg

type FileMsg struct {
	Src string `json:"src"`
	Alt string `json:"alt"`
}

func (FileMsg) Convert

func (i FileMsg) Convert() (KV, interface{})

type FileOption

type FileOption struct {
	Mime          string
	ContentBase64 string
}

type FlowkitData

type FlowkitData struct {
	Action  Action `json:"action"`
	Version int    `json:"version"`
	Content KV     `json:"content"`
}

type FmtMessage

type FmtMessage struct {
	At  int    `json:"at,omitempty"`
	Len int    `json:"len,omitempty"`
	Tp  string `json:"tp,omitempty"`
	Key int    `json:"key,omitempty"`
}

type FormField

type FormField struct {
	Type        FormFieldType      `json:"type"`
	Key         string             `json:"key"`
	Value       interface{}        `json:"value"`
	ValueType   FormFieldValueType `json:"value_type"`
	Label       string             `json:"label"`
	Placeholder string             `json:"placeholder"`
	Option      []string           `json:"option"`
	Rule        string             `json:"rule"`
}

type FormFieldType

type FormFieldType string
const (
	FormFieldText     FormFieldType = "text"
	FormFieldPassword FormFieldType = "password"
	FormFieldNumber   FormFieldType = "number"
	FormFieldColor    FormFieldType = "color"
	FormFieldFile     FormFieldType = "file"
	FormFieldMonth    FormFieldType = "month"
	FormFieldDate     FormFieldType = "date"
	FormFieldTime     FormFieldType = "time"
	FormFieldEmail    FormFieldType = "email"
	FormFieldUrl      FormFieldType = "url"
	FormFieldRadio    FormFieldType = "radio"
	FormFieldCheckbox FormFieldType = "checkbox"
	FormFieldRange    FormFieldType = "range"
	FormFieldSelect   FormFieldType = "select"
	FormFieldTextarea FormFieldType = "textarea"
	FormFieldHidden   FormFieldType = "hidden"
)

type FormFieldValueType

type FormFieldValueType string
const (
	FormFieldValueString       FormFieldValueType = "string"
	FormFieldValueBool         FormFieldValueType = "bool"
	FormFieldValueInt64        FormFieldValueType = "int64"
	FormFieldValueFloat64      FormFieldValueType = "float64"
	FormFieldValueStringSlice  FormFieldValueType = "string_slice"
	FormFieldValueInt64Slice   FormFieldValueType = "int64_slice"
	FormFieldValueFloat64Slice FormFieldValueType = "float64_slice"
)

type FormMsg

type FormMsg struct {
	ID    string      `json:"id"`
	Title string      `json:"title"`
	Field []FormField `json:"field"`
}

func (FormMsg) Convert

func (a FormMsg) Convert() (KV, interface{})

type GroupEvent

type GroupEvent int
const (
	GroupEventUnknown GroupEvent = iota
	GroupEventJoin
	GroupEventExit
	GroupEventReceive
)

type HtmlMsg

type HtmlMsg struct {
	Raw string
}

func (HtmlMsg) Convert

func (m HtmlMsg) Convert() (KV, interface{})

type ImageMsg

type ImageMsg struct {
	Src         string `json:"src"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
	Alt         string `json:"alt"`
	Mime        string `json:"mime"`
	Size        int    `json:"size"`
	ImageBase64 string `json:"-"`
}

func ImageConvert

func ImageConvert(data []byte, name string, width, height int) ImageMsg

func (ImageMsg) Convert

func (i ImageMsg) Convert() (KV, interface{})

type ImageOption

type ImageOption struct {
	Mime        string
	Width       int
	Height      int
	ImageBase64 string
	Size        int
}

type InfoMsg

type InfoMsg struct {
	Title string      `json:"title"`
	Model interface{} `json:"model"`
}

func (InfoMsg) Convert

func (i InfoMsg) Convert() (KV, interface{})

type InstructMsg

type InstructMsg struct {
	No       string
	Object   model.InstructObject
	Bot      string
	Flag     string
	Content  KV
	Priority model.InstructPriority
	State    model.InstructState
	ExpireAt time.Time
}

func (InstructMsg) Convert

func (t InstructMsg) Convert() (KV, interface{})

type KV

type KV map[string]interface{}

func Convert

func Convert(payloads []MsgPayload) ([]KV, []any)

func (KV) Any

func (j KV) Any(key string) (any, bool)

func (KV) Float64

func (j KV) Float64(key string) (float64, bool)

func (KV) Float64Value

func (j KV) Float64Value() (float64, bool)

func (KV) Int64

func (j KV) Int64(key string) (int64, bool)

func (KV) Int64Value

func (j KV) Int64Value() (int64, bool)

func (KV) Map

func (j KV) Map(key string) (map[string]interface{}, bool)

func (KV) Merge

func (j KV) Merge(kvs ...KV) KV

func (*KV) Scan

func (j *KV) Scan(value interface{}) error

func (KV) String

func (j KV) String(key string) (string, bool)

func (KV) StringValue

func (j KV) StringValue() (string, bool)

func (KV) Uint64

func (j KV) Uint64(key string) (uint64, bool)

func (KV) Uint64Value

func (j KV) Uint64Value() (uint64, bool)

func (KV) Value

func (j KV) Value() (driver.Value, error)

type LinkListMsg

type LinkListMsg struct {
	Links []LinkMsg
}

func (LinkListMsg) Convert

func (m LinkListMsg) Convert() (KV, interface{})

type LinkMsg

type LinkMsg struct {
	Title string `json:"title"`
	Cover string `json:"cover"`
	Url   string `json:"url"`
}

func (LinkMsg) Convert

func (a LinkMsg) Convert() (KV, interface{})

type LocationMsg

type LocationMsg struct {
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
	Address   string  `json:"address"`
}

func (LocationMsg) Convert

func (a LocationMsg) Convert() (KV, interface{})

type MarkdownMsg

type MarkdownMsg struct {
	Title string `json:"title"`
	Raw   string `json:"raw"`
}

func (MarkdownMsg) Convert

func (m MarkdownMsg) Convert() (KV, interface{})

type Message

type Message struct {
	Platform string
	Topic    string
	Payload  MsgPayload
}

type Mount

type Mount struct {
	Type   string `json:"type,omitempty"`
	Source string `json:"source,omitempty"`
	Target string `json:"target,omitempty"`
}

type MsgBuilder

type MsgBuilder struct {
	Payload MsgPayload
	Message ChatMessage
}

func (*MsgBuilder) AppendAttachment

func (m *MsgBuilder) AppendAttachment(fileName string, opt AttachmentOption)

AppendAttachment append a attachment file to chat message

func (*MsgBuilder) AppendFile

func (m *MsgBuilder) AppendFile(fileName string, opt FileOption)

AppendFile Append file to build message

func (*MsgBuilder) AppendImage

func (m *MsgBuilder) AppendImage(imageName string, opt ImageOption)

AppendImage Append image to build message

func (*MsgBuilder) AppendText

func (m *MsgBuilder) AppendText(text string, opt TextOption)

AppendText Append text message to build message

func (*MsgBuilder) AppendTextLine

func (m *MsgBuilder) AppendTextLine(text string, opt TextOption)

AppendTextLine Append text message and line break to build message

func (*MsgBuilder) BuildAttachmentMessage

func (m *MsgBuilder) BuildAttachmentMessage(fileName string, text string, opt AttachmentOption) ChatMessage

BuildAttachmentMessage build a attachment message

func (*MsgBuilder) BuildFileMessage

func (m *MsgBuilder) BuildFileMessage(fileName string, text string, opt FileOption) ChatMessage

BuildFileMessage build a file chat message

func (*MsgBuilder) BuildImageMessage

func (m *MsgBuilder) BuildImageMessage(imageName string, text string, opt ImageOption) ChatMessage

BuildImageMessage build a image chat message

func (*MsgBuilder) BuildTextMessage

func (m *MsgBuilder) BuildTextMessage(text string) ChatMessage

BuildTextMessage build text chat message with formatted

func (*MsgBuilder) Content

func (m *MsgBuilder) Content() (map[string]interface{}, interface{})

func (*MsgBuilder) Parse

func (m *MsgBuilder) Parse(message ServerData) (ChatMessage, error)

Parse a raw ServerData to friendly ChatMessage

type MsgPayload

type MsgPayload interface {
	Convert() (KV, interface{})
}

func ToPayload

func ToPayload(typ string, src []byte) MsgPayload

type ObjHeader

type ObjHeader struct {
	// using string to get around rethinkdb's problems with uint64;
	// `bson:"_id"` tag is for mongodb to use as primary key '_id'.
	Id string `bson:"_id"`
	//id        Uid
	CreatedAt time.Time
	UpdatedAt time.Time
}

ObjHeader is the header shared by all stored objects.

type OkrMsg

type OkrMsg struct {
	Title     string             `json:"title"`
	Objective *model.Objective   `json:"objective"`
	KeyResult []*model.KeyResult `json:"key_result"`
}

func (OkrMsg) Convert

func (o OkrMsg) Convert() (KV, interface{})

type PipelineOperate

type PipelineOperate string
const (
	PipelineCommandTriggerOperate PipelineOperate = "command_trigger"
	PipelineProcessOperate        PipelineOperate = "pipeline_process"
	PipelineNextOperate           PipelineOperate = "pipeline_next"
)

type QuestionMsg

type QuestionMsg struct {
	Id         int
	Title      string
	Slug       string
	Difficulty int
	Source     string
}

func (QuestionMsg) Convert

func (m QuestionMsg) Convert() (KV, interface{})

type QueuePayload

type QueuePayload struct {
	RcptTo string `json:"rcpt_to"`
	Uid    string `json:"uid"`
	Type   string `json:"type"`
	Msg    []byte `json:"msg"`
}

func ConvertQueuePayload

func ConvertQueuePayload(rcptTo string, uid string, msg MsgPayload) (QueuePayload, error)

type Registry

type Registry struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*Registry) Clone

func (r *Registry) Clone() *Registry

type RepoMsg

type RepoMsg struct {
	ID               *int64     `json:"id,omitempty"`
	NodeID           *string    `json:"node_id,omitempty"`
	Name             *string    `json:"name,omitempty"`
	FullName         *string    `json:"full_name,omitempty"`
	Description      *string    `json:"description,omitempty"`
	Homepage         *string    `json:"homepage,omitempty"`
	CreatedAt        *time.Time `json:"created_at,omitempty"`
	PushedAt         *time.Time `json:"pushed_at,omitempty"`
	UpdatedAt        *time.Time `json:"updated_at,omitempty"`
	HTMLURL          *string    `json:"html_url,omitempty"`
	Language         *string    `json:"language,omitempty"`
	Fork             *bool      `json:"fork,omitempty"`
	ForksCount       *int       `json:"forks_count,omitempty"`
	NetworkCount     *int       `json:"network_count,omitempty"`
	OpenIssuesCount  *int       `json:"open_issues_count,omitempty"`
	StargazersCount  *int       `json:"stargazers_count,omitempty"`
	SubscribersCount *int       `json:"subscribers_count,omitempty"`
	WatchersCount    *int       `json:"watchers_count,omitempty"`
	Size             *int       `json:"size,omitempty"`
	Topics           []string   `json:"topics,omitempty"`
	Archived         *bool      `json:"archived,omitempty"`
	Disabled         *bool      `json:"disabled,omitempty"`
}

func (RepoMsg) Convert

func (i RepoMsg) Convert() (KV, interface{})

type ScriptMsg

type ScriptMsg struct {
	Kind string `json:"kind"`
	Code string `json:"code"`
}

func (ScriptMsg) Convert

func (a ScriptMsg) Convert() (KV, interface{})

type SendFunc

type SendFunc func(rcptTo string, uid Uid, out MsgPayload, option ...interface{})

type ServerData

type ServerData struct {
	Head    string
	Content string
	Topic   string
}

type Stage

type Stage struct {
	Type StageType
	Bot  Bot
	Flag string
	Args []string
}

type StageType

type StageType string
const (
	ActionStage   StageType = "action"
	CommandStage  StageType = "command"
	FormStage     StageType = "form"
	InstructStage StageType = "instruct"
	SessionStage  StageType = "session"
)

type TableMsg

type TableMsg struct {
	Title  string          `json:"title"`
	Header []string        `json:"header"`
	Row    [][]interface{} `json:"row"`
}

func (TableMsg) Convert

func (t TableMsg) Convert() (KV, interface{})

type Task

type Task struct {
	ID          string            `json:"id,omitempty"`
	State       TaskState         `json:"state,omitempty"`
	CreatedAt   *time.Time        `json:"createdAt,omitempty"`
	StartedAt   *time.Time        `json:"startedAt,omitempty"`
	CompletedAt *time.Time        `json:"completedAt,omitempty"`
	FailedAt    *time.Time        `json:"failedAt,omitempty"`
	CMD         []string          `json:"cmd,omitempty"`
	Entrypoint  []string          `json:"entrypoint,omitempty"`
	Run         string            `json:"run,omitempty"`
	Image       string            `json:"image,omitempty"`
	Registry    *Registry         `json:"registry,omitempty"`
	Env         map[string]string `json:"env,omitempty"`
	Files       map[string]string `json:"files,omitempty"`
	Error       string            `json:"error,omitempty"`
	Pre         []*Task           `json:"pre,omitempty"`
	Post        []*Task           `json:"post,omitempty"`
	Mounts      []Mount           `json:"mounts,omitempty"`
	Networks    []string          `json:"networks,omitempty"`
	Retry       *TaskRetry        `json:"retry,omitempty"`
	Limits      *TaskLimits       `json:"limits,omitempty"`
	Timeout     string            `json:"timeout,omitempty"`
	Result      string            `json:"result,omitempty"`
	GPUs        string            `json:"gpus,omitempty"`
}

Task is the basic unit of work that a Worker can handle.

func CloneTasks

func CloneTasks(tasks []*Task) []*Task

func (*Task) Clone

func (t *Task) Clone() *Task

type TaskLimits

type TaskLimits struct {
	CPUs   string `json:"cpus,omitempty"`
	Memory string `json:"memory,omitempty"`
}

func (*TaskLimits) Clone

func (l *TaskLimits) Clone() *TaskLimits

type TaskRetry

type TaskRetry struct {
	Limit    int `json:"limit,omitempty"`
	Attempts int `json:"attempts,omitempty"`
}

func (*TaskRetry) Clone

func (r *TaskRetry) Clone() *TaskRetry

type TaskState

type TaskState string

TaskState State defines the list of states that a task can be in, at any given moment.

const (
	TaskStatePending   TaskState = "PENDING"
	TaskStateRunning   TaskState = "RUNNING"
	TaskStateCancelled TaskState = "CANCELLED"
	TaskStateStopped   TaskState = "STOPPED"
	TaskStateCompleted TaskState = "COMPLETED"
	TaskStateFailed    TaskState = "FAILED"
)

func (TaskState) IsActive

func (s TaskState) IsActive() bool

type TextListMsg

type TextListMsg struct {
	Texts []string
}

func (TextListMsg) Convert

func (m TextListMsg) Convert() (KV, interface{})

type TextMsg

type TextMsg struct {
	Text string `json:"text"`
}

func (TextMsg) Convert

func (t TextMsg) Convert() (KV, interface{})

type TextOption

type TextOption struct {
	IsBold         bool
	IsItalic       bool
	IsDeleted      bool
	IsCode         bool
	IsLink         bool
	IsMention      bool
	IsHashTag      bool
	IsForm         bool
	IsButton       bool
	ButtonDataName string
	ButtonDataAct  string
	ButtonDataVal  string
	ButtonDataRef  string
}

type TheCard

type TheCard struct {
	Fn    string `json:"fn,omitempty"`
	Phone struct {
		Type   string `json:"type,omitempty"`
		Data   string `json:"data,omitempty"`
		Ref    string `json:"ref,omitempty"`
		Width  int    `json:"width,omitempty"`
		Height int    `json:"height,omitempty"`
		Size   int    `json:"size,omitempty"`
	} `json:"phone"`
	Note string `json:"note,omitempty"`
	N    struct {
		Surname    string `json:"surname,omitempty"`
		Given      string `json:"given,omitempty"`
		Additional string `json:"additional,omitempty"`
		Prefix     string `json:"prefix,omitempty"`
		Suffix     string `json:"suffix,omitempty"`
	} `json:"n"`
	Org struct {
		Fn    string `json:"fn,omitempty"`
		Title string `json:"title,omitempty"`
	} `json:"org"`
	Tel []struct {
		Type string `json:"type,omitempty"`
		Uri  string `json:"uri,omitempty"`
	} `json:"tel,omitempty"`
	Email []struct {
		Type string `json:"type,omitempty"`
		Uri  string `json:"uri,omitempty"`
	} `json:"email,omitempty"`
	Comm []struct {
		Type string `json:"type,omitempty"`
		Name string `json:"name,omitempty"`
		Uri  string `json:"uri,omitempty"`
	} `json:"comm,omitempty"`
	Bday struct {
		Y int `json:"y,omitempty"`
		M int `json:"m,omitempty"`
		D int `json:"d,omitempty"`
	} `json:"bday"`
}

type TodoMsg

type TodoMsg struct {
	Title string        `json:"title"`
	Todo  []*model.Todo `json:"todo"`
}

func (TodoMsg) Convert

func (t TodoMsg) Convert() (KV, interface{})

type Trigger

type Trigger struct {
	Type   TriggerType
	Define string
}

type TriggerType

type TriggerType string
const (
	TriggerCommandType TriggerType = "command"
)

type UI

type UI struct {
	Title  string
	App    app.UI
	CSS    []app.UI
	JS     []app.HTMLScript
	Global KV
}

type Uid

type Uid string

Uid is a database-specific record id, suitable to be used as a primary key.

const ZeroUid Uid = ""

ZeroUid is a constant representing uninitialized Uid.

func (Uid) IsZero

func (uid Uid) IsZero() bool

IsZero checks if Uid is uninitialized.

func (Uid) String

func (uid Uid) String() string

stringer implements fmt.Stringer interface.

type VideoMsg

type VideoMsg struct {
	Src      string  `json:"src"`
	Width    int     `json:"width"`
	Height   int     `json:"height"`
	Alt      string  `json:"alt"`
	Duration float64 `json:"duration"`
}

func (VideoMsg) Convert

func (i VideoMsg) Convert() (KV, interface{})

type WorkflowMetadata

type WorkflowMetadata struct {
	Name     string `json:"name" yaml:"name"`
	Describe string `json:"describe" yaml:"describe"`
	Triggers []struct {
		Type string `json:"type" yaml:"type"`
		Rule KV     `json:"rule,omitempty" yaml:"rule"`
	} `json:"triggers" yaml:"triggers"`
	Pipeline []string `json:"pipeline" yaml:"pipeline"`
	Tasks    []struct {
		ID       string   `json:"id" yaml:"id"`
		Action   string   `json:"action" yaml:"action"`
		Describe string   `json:"describe,omitempty" yaml:"describe"`
		Params   KV       `json:"params,omitempty" yaml:"params"`
		Vars     []string `json:"vars,omitempty" yaml:"vars"`
		Conn     []string `json:"conn,omitempty" yaml:"conn"`
	} `json:"tasks" yaml:"tasks"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL