inventory

package
v0.0.0-...-4c147c7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_platform_inventory_inventory_proto protoreflect.FileDescriptor

Functions

func AsItemValue

func AsItemValue[T any](in T) (isItemValue_Value, error)

func Produce

func Produce[T any](out chan<- *Item, key string, dimensions map[string]string, v T) error

Types

type Executor

type Executor func(conn driver.Connection, out chan<- *Item) executor.RunFunc

func ExecuteAQL

func ExecuteAQL(db string, aql string, bind map[string]any) Executor

type Item

type Item struct {

	// Item Type
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Dimensions
	Dimensions map[string]string `` /* 161-byte string literal not displayed */
	// Value of the Item
	Value *ItemValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Defines inventory item

func (*Item) Descriptor deprecated

func (*Item) Descriptor() ([]byte, []int)

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetDimensions

func (x *Item) GetDimensions() map[string]string

func (*Item) GetType

func (x *Item) GetType() string

func (*Item) GetValue

func (x *Item) GetValue() *ItemValue

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

func (x *Item) ProtoReflect() protoreflect.Message

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

func (*Item) Validate

func (i *Item) Validate() error

type ItemValue

type ItemValue struct {

	// One of the Values
	//
	// Types that are assignable to Value:
	//
	//	*ItemValue_Str
	//	*ItemValue_Dec
	//	*ItemValue_Num
	//	*ItemValue_Bool
	//	*ItemValue_Time
	//	*ItemValue_Duration
	//	*ItemValue_LongNum
	Value isItemValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Value of the Item

func (*ItemValue) Descriptor deprecated

func (*ItemValue) Descriptor() ([]byte, []int)

Deprecated: Use ItemValue.ProtoReflect.Descriptor instead.

func (*ItemValue) GetBool

func (x *ItemValue) GetBool() bool

func (*ItemValue) GetDec

func (x *ItemValue) GetDec() float32

func (*ItemValue) GetDuration

func (x *ItemValue) GetDuration() *durationpb.Duration

func (*ItemValue) GetLongNum

func (x *ItemValue) GetLongNum() int64

func (*ItemValue) GetNum

func (x *ItemValue) GetNum() int32

func (*ItemValue) GetStr

func (x *ItemValue) GetStr() string

func (*ItemValue) GetTime

func (x *ItemValue) GetTime() *timestamppb.Timestamp

func (*ItemValue) GetValue

func (m *ItemValue) GetValue() isItemValue_Value

func (*ItemValue) ProtoMessage

func (*ItemValue) ProtoMessage()

func (*ItemValue) ProtoReflect

func (x *ItemValue) ProtoReflect() protoreflect.Message

func (*ItemValue) Reset

func (x *ItemValue) Reset()

func (*ItemValue) String

func (x *ItemValue) String() string

func (*ItemValue) Type

func (i *ItemValue) Type() (reflect.Type, error)

func (*ItemValue) Validate

func (i *ItemValue) Validate() error

type ItemValue_Bool

type ItemValue_Bool struct {
	// Boolean
	Bool bool `protobuf:"varint,4,opt,name=bool,proto3,oneof"`
}

type ItemValue_Dec

type ItemValue_Dec struct {
	// Float64
	Dec float32 `protobuf:"fixed32,2,opt,name=dec,proto3,oneof"`
}

type ItemValue_Duration

type ItemValue_Duration struct {
	// Duration
	Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3,oneof"`
}

type ItemValue_LongNum

type ItemValue_LongNum struct {
	// Int64
	LongNum int64 `protobuf:"varint,7,opt,name=long_num,json=longNum,proto3,oneof"`
}

type ItemValue_Num

type ItemValue_Num struct {
	// Int
	Num int32 `protobuf:"varint,3,opt,name=num,proto3,oneof"`
}

type ItemValue_Str

type ItemValue_Str struct {
	// String
	Str string `protobuf:"bytes,1,opt,name=str,proto3,oneof"`
}

type ItemValue_Time

type ItemValue_Time struct {
	// Time
	Time *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=time,proto3,oneof"`
}

type Items

type Items []*Item

func FetchInventory

func FetchInventory(ctx context.Context, logger logging.Logger, threads int, conn driver.Connection) (Items, error)

type Spec

type Spec struct {

	// Deployment ID
	DeploymentId string `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"`
	// Items
	Items []*Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

Defines inventory spec

func (*Spec) Descriptor deprecated

func (*Spec) Descriptor() ([]byte, []int)

Deprecated: Use Spec.ProtoReflect.Descriptor instead.

func (*Spec) GetDeploymentId

func (x *Spec) GetDeploymentId() string

func (*Spec) GetItems

func (x *Spec) GetItems() []*Item

func (*Spec) ProtoMessage

func (*Spec) ProtoMessage()

func (*Spec) ProtoReflect

func (x *Spec) ProtoReflect() protoreflect.Message

func (*Spec) Reset

func (x *Spec) Reset()

func (*Spec) String

func (x *Spec) String() string

Jump to

Keyboard shortcuts

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