domain

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyDepth = "depth"
	ContextKeyMsgId = "msgId"
)

Variables

View Source
var EventValues = []any{"newChecksum", "objectAdded", "objectDeleted", "objectModified", "getObject", "patchObject", "putObject"}

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	DeleteObject func(ctx context.Context, id ClusterKindName) error
	GetObject    func(ctx context.Context, id ClusterKindName, baseObject []byte) error
	PatchObject  func(ctx context.Context, id ClusterKindName, checksum string, patch []byte) error
	PutObject    func(ctx context.Context, id ClusterKindName, object []byte) error
	VerifyObject func(ctx context.Context, id ClusterKindName, checksum string) error
}

type ClusterKindName

type ClusterKindName struct {
	Cluster string
	Kind    *Kind
	Name    string
}

func (ClusterKindName) String

func (c ClusterKindName) String() string

type Event

type Event uint

Event represents an enum of Event.

const (
	EventNewChecksum Event = iota
	EventObjectAdded
	EventObjectDeleted
	EventObjectModified
	EventGetObject
	EventPatchObject
	EventPutObject
)

func (Event) Value

func (op Event) Value() any

Value returns the value of the enum.

type Generic

type Generic struct {
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	AdditionalProperties map[string]interface{}
}

Generic represents a Generic model.

type GetObject

type GetObject struct {
	BaseObject           string
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	AdditionalProperties map[string]interface{}
}

GetObject represents a GetObject model.

type Kind

type Kind struct {
	Group                string
	Version              string
	Resource             string
	AdditionalProperties map[string]interface{}
}

Kind represents a Kind model.

func (Kind) String

func (k Kind) String() string

Kind returns group/version/resource as a string.

type NewChecksum

type NewChecksum struct {
	Checksum             string
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	AdditionalProperties map[string]interface{}
}

NewChecksum represents a NewChecksum model.

type ObjectAdded

type ObjectAdded struct {
	Checksum             string
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	Object               string
	AdditionalProperties map[string]interface{}
}

ObjectAdded represents a ObjectAdded model.

type ObjectDeleted

type ObjectDeleted struct {
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	AdditionalProperties map[string]interface{}
}

ObjectDeleted represents a ObjectDeleted model.

type ObjectModified

type ObjectModified struct {
	Checksum             string
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	Object               string
	AdditionalProperties map[string]interface{}
}

ObjectModified represents a ObjectModified model.

type PatchObject

type PatchObject struct {
	Checksum             string
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	Patch                string
	AdditionalProperties map[string]interface{}
}

PatchObject represents a PatchObject model.

type PutObject

type PutObject struct {
	Cluster              string
	Depth                int
	Event                *Event
	Kind                 *Kind
	MsgId                string
	Name                 string
	Object               string
	AdditionalProperties map[string]interface{}
}

PutObject represents a PutObject model.

type Strategy

type Strategy string
const (
	CopyStrategy  Strategy = "copy"
	PatchStrategy Strategy = "patch"
)

Jump to

Keyboard shortcuts

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