utils

package
v0.0.0-...-cba6ad5 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Id         string
	UserId     string
	ActionType string
	Sink       string
	ErrorFlag  bool
	Metadata   map[string]string
	Body       []byte
}

func ConvertAction

func ConvertAction(ctx context.Context, actionId, ruleId uint) *Action

---------------------------------convert action

func ConvertActionZ

func ConvertActionZ(ac *dao.Target) *Action

type ActionOption

type ActionOption struct {
	Version string                 `json:"version"`
	Option  map[string]interface{} `json:"option"`
}

type Field

type Field struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Rule

type Rule struct {
	UserId  string
	Id      string
	Body    []byte
	Topic   string
	Actions []*Action
}

func ConvertRule

func ConvertRule(ctx context.Context, id uint, userId string) (*Rule, error)

Jump to

Keyboard shortcuts

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