states

package
v0.0.0-...-36aec5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 11 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectState

func GetObjectState(ctx context.Context, stateProvider IStateProvider, resourceType validation.ResourceType, name string, namespace string) (interface{}, error)

func GetObjectStateWithUniqueName

func GetObjectStateWithUniqueName(ctx context.Context, stateProvider IStateProvider, resourceType validation.ResourceType, displayName string, namespace string) (interface{}, error)

func InMemoryFilter

func InMemoryFilter(entity map[string]interface{}, filter string) (bool, error)

func JsonPathMatch

func JsonPathMatch(jsonData interface{}, path string, target string) bool

func ListObjectStateWithLabels

func ListObjectStateWithLabels(ctx context.Context, stateProvider IStateProvider, resourceType validation.ResourceType, namespace string, labels map[string]string, count int64) ([]interface{}, error)

func MatchFilter

func MatchFilter(entry StateEntry, filterType string, filterValue string) (bool, error)

Types

type DeleteOption

type DeleteOption struct {
	Concurrency string `json:"concurency"` //concurrency
	Consistency string `json:"consistency` //eventual or strong
}

type DeleteRequest

type DeleteRequest struct {
	ID       string                 `json:"id"`
	ETag     *string                `json:"etag,omitempty"`
	Metadata map[string]interface{} `json:"metadata"`
	Options  DeleteOption           `json:"options,omitempty"`
}

type GetOption

type GetOption struct {
	Consistency string `json:"consistency"` //eventual or strong
}

type GetRequest

type GetRequest struct {
	ID       string                 `json:"id"`
	Metadata map[string]interface{} `json:"metadata"`
	Options  GetOption              `json:"options,omitempty"`
}

type ListRequest

type ListRequest struct {
	FilterType  string                 `json:"filterType"`
	FilterValue string                 `json:"filterValue"`
	Metadata    map[string]interface{} `json:"metadata"`
}

type StateEntry

type StateEntry struct {
	ID   string      `json:"id"`
	Body interface{} `json:"body"`
	ETag string      `json:"etag,omitempty"`
}

type UpsertOption

type UpsertOption struct {
	Concurrency      string `json:"concurrency,omitempty"` //first-write, last-write
	Consistency      string `json:"consistency"`           //eventual, strong
	UpdateStatusOnly bool   `json:"updateStatusOnly,omitempty"`
}

type UpsertRequest

type UpsertRequest struct {
	Value    StateEntry             `json:"value"`
	ETag     *string                `json:"etag,omitempty"`
	Metadata map[string]interface{} `json:"metadata"`
	Options  UpsertOption           `json:"options,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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