model

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsControlRecord added in v0.4.0

type AwsControlRecord struct {
	ControlGroup   string         `json:"control_group,omitempty"`
	ControlID      string         `json:"control_id,omitempty"`
	ControlIntent  uint64         `json:"control_intent,omitempty"`
	ControlType    AwsControlType `json:"control_type,omitempty"`
	ControlTime    int64          `json:"control_time,omitempty"`
	HandlerID      string         `json:"handler_id,omitempty"`
	HandlerVersion string         `json:"handler_version,omitempty"`
	HandlerTimeout uint64         `json:"handler_timeout,omitempty"`
	EventSource    string         `json:"event_source,omitempty"`
	EventID        string         `json:"event_id,omitempty"`
	Transaction    string         `json:"transaction,omitempty"`
}

type AwsControlType added in v0.4.0

type AwsControlType string
const (
	BlockControl   AwsControlType = "B"
	ConfirmControl AwsControlType = "C"
)

type AwsEventBus added in v0.4.0

type AwsEventBus interface {
	PublishEvent(ctx context.Context, event *AwsEventRecord)
}

type AwsEventRecord added in v0.4.0

type AwsEventRecord struct {
	EventSource     *string                 `json:"event_source,omitempty"`
	EventID         *string                 `json:"event_id,omitempty"`
	EventClass      *string                 `json:"event_class,omitempty"`
	EventType       *string                 `json:"event_type,omitempty"`
	EventTime       *int64                  `json:"event_time,omitempty"`
	EventAuthor     *string                 `json:"event_author,omitempty"`
	EventData       *map[string]interface{} `json:"event_data,omitempty"`
	EntityID        *string                 `json:"entity_id,omitempty"`
	EntityType      *string                 `json:"entity_type,omitempty"`
	EntityState     *map[string]interface{} `json:"entity_state,omitempty"`
	EntityCreatedAt *int64                  `json:"entity_created_at,omitempty"`
	EntityCreatedBy *string                 `json:"entity_created_by,omitempty"`
	TriggerSource   *string                 `json:"trigger_source,omitempty"`
	TriggerID       *string                 `json:"trigger_id,omitempty"`
	Transaction     *string                 `json:"transaction,omitempty"`
	Reference       *string                 `json:"reference,omitempty"`
}

type AwsEventStore added in v0.4.0

type AwsEventStore interface {
	CreateControlRecord(ctx context.Context, record *AwsControlRecord)
	CreateUncontrolledEventRecord(ctx context.Context, record *AwsEventRecord)
	CreateControlledEventRecord(ctx context.Context, event *AwsEventRecord, control *AwsControlRecord)

	GetControlRecords(ctx context.Context, group string) []*AwsControlRecord
	GetEventRecordByID(ctx context.Context, source string, id string) *AwsEventRecord
	GetLastEventRecord(ctx context.Context, source string) *AwsEventRecord
}

type AwsGraphqlGateway added in v0.4.0

type AwsGraphqlGateway interface {
	ExecuteGraphql(ctx context.Context, request *AwsGraphqlRequest) *AwsGraphqlResponse
}

type AwsGraphqlRequest added in v0.4.0

type AwsGraphqlRequest struct {
	Query     string                 `json:"query"`
	Variables map[string]interface{} `json:"variables"`
}

type AwsGraphqlResponse added in v0.4.0

type AwsGraphqlResponse struct {
	Data   map[string]interface{}   `json:"data"`
	Errors []map[string]interface{} `json:"errors"`
}

type AwsObjectStore added in v0.4.0

type AwsObjectStore interface {
	GetRawObject(ctx context.Context, id string) []byte
	SaveRawObject(ctx context.Context, id string, buffer []byte)
	GetJsonObject(ctx context.Context, id string, v interface{})
	SaveJsonObject(ctx context.Context, id string, v interface{})
}

type AwsStateRecord added in v0.4.0

type AwsStateRecord struct {
	Type      string                 `json:"type,omitempty"`
	ID        string                 `json:"id,omitempty"`
	Version   uint64                 `json:"version,omitempty"`
	State     map[string]interface{} `json:"state,omitempty"`
	UpdatedAt int64                  `json:"updated_at,omitempty"`
	UpdatedBy string                 `json:"updated_by,omitempty"`
	CreatedAt int64                  `json:"created_at,omitempty"`
	CreatedBy string                 `json:"created_by,omitempty"`
}

type AwsStateStore added in v0.4.0

type AwsStateStore interface {
	UpdateState(ctx context.Context, state *AwsStateRecord)
	UpdateStates(ctx context.Context, state []*AwsStateRecord)
}

Jump to

Keyboard shortcuts

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