audit

package
v0.0.0-...-3faa8e7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlow

func GetFlow(w http.ResponseWriter, r *http.Request)

func GetFlows

func GetFlows(w http.ResponseWriter, r *http.Request)

Types

type Action

type Action struct {
	Id         string            `json:"id" bson:"_id"`
	Name       string            `json:"name" bson:"name"`
	PackName   string            `json:"packName" bson:"packName"`
	PackLabels map[string]string `json:"packLabels,omitempty" bson:"packLabels,omitempty"`
	Input      json.Json         `json:"input,omitempty" bson:"input,omitempty"`
	State      State             `json:"state" bson:"state"`
	States     []State           `json:"states,omitempty" bson:"states"`

	CorrelationId string `json:"correlationId" bson:"correlationId"`
	FlowName      string `json:"flowName" bson:"flowName"`
	FlowUUID      string `json:"flowUUID" bson:"flowUUID"`
	StepId        string `json:"stepId" bson:"stepId"`

	Context map[string]string `json:"context,omitempty" bson:"context,omitempty"`
	Trigger Event             `json:"trigger" bson:"trigger"`
	Result  Event             `json:"result,omitempty" bson:"result,omitempty"`
}

type Command

type Command struct {
	Name       string            `json:"name" bson:"name"`
	PackName   string            `json:"packName" bson:"packName"`
	PackLabels map[string]string `json:"packLabels,omitempty" bson:"packLabels,omitempty"`
	Input      json.Json         `json:"input" bson:"input,omitempty"`
}

type Event

type Event struct {
	Name       string    `json:"event" bson:"name"`
	Pack       Pack      `json:"pack" bson:"pack"`
	Payload    json.Json `json:"payload,omitempty" bson:"payload,omitempty"`
	CreatedAt  time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"`
	ReceivedAt time.Time `json:"receivedAt,omitempty" bson:"receivedAt,omitempty"`
}

type EventDef

type EventDef struct {
	Name       string            `json:"name" bson:"name"`
	PackName   string            `json:"packName" bson:"packName"`
	PackLabels map[string]string `json:"packLabels,omitempty" bson:"packLabels,omitempty"`
}

type Flow

type Flow struct {
	Name          string            `json:"name" bson:"name"`
	UUID          string            `json:"uuid" bson:"uuid"`
	CorrelationId string            `json:"correlationId" bson:"-"`
	Steps         []Step            `json:"steps" bson:"steps,omitempty"`
	Actions       map[string]Action `json:"actions" bson:"-"`
}

type Pack

type Pack struct {
	Id     string            `json:"id" bson:"_id"`
	Name   string            `json:"name" bson:"name"`
	Labels map[string]string `json:"labels,omitempty" bson:"labels,omitempty"`
}

type Repository

type Repository interface {
	Get(correlationId string) (*Flow, error)
	Find(filter flowsFilter) ([]Flow, error)
}

type State

type State struct {
	Value string    `json:"value" bson:"value"`
	Time  time.Time `json:"time" bson:"time"`
}

type Step

type Step struct {
	Id        string            `json:"id" bson:"id"`
	DependsOn []string          `json:"dependsOn,omitempty" bson:"dependsOn,omitempty"`
	Event     EventDef          `json:"event" bson:"event"`
	Context   map[string]string `json:"context,omitempty" bson:"context,omitempty"`
	Criteria  string            `json:"criteria,omitempty" bson:"criteria,omitempty"`
	Command   Command           `json:"command" bson:"command"`
}

Jump to

Keyboard shortcuts

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