helper

package
v1.3.84 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStringRunes

func RandStringRunes(n int) string

Types

type BoolQueryBuilder

type BoolQueryBuilder struct {
	PropName string
}

func (BoolQueryBuilder) Equals

type BytesQueryBuilder

type BytesQueryBuilder struct {
	PropName string
}

func (BytesQueryBuilder) Equals

func (i BytesQueryBuilder) Equals(val []byte) *model.BooleanExpression

type DateQueryBuilder

type DateQueryBuilder struct {
	PropName string
}

func (DateQueryBuilder) Equals

type EnumQueryBuilder

type EnumQueryBuilder struct {
	PropName string
}

func (EnumQueryBuilder) Equals

type Float32QueryBuilder

type Float32QueryBuilder struct {
	PropName string
}

func (Float32QueryBuilder) Equals

type Float64QueryBuilder

type Float64QueryBuilder struct {
	PropName string
}

func (Float64QueryBuilder) Equals

type Int32QueryBuilder

type Int32QueryBuilder struct {
	PropName string
}

func (Int32QueryBuilder) Equals

type Int64QueryBuilder

type Int64QueryBuilder struct {
	PropName string
}

func (Int64QueryBuilder) Equals

type ListQueryBuilder

type ListQueryBuilder struct {
	PropName string
}

func (ListQueryBuilder) Contains

func (sq ListQueryBuilder) Contains(val []interface{}) *model.BooleanExpression

func (ListQueryBuilder) Equals

func (sq ListQueryBuilder) Equals(val []interface{}) *model.BooleanExpression

type MapQueryBuilder

type MapQueryBuilder struct {
	PropName string
}

func (MapQueryBuilder) Contains

func (sq MapQueryBuilder) Contains(val map[string]interface{}) *model.BooleanExpression

func (MapQueryBuilder) Equals

func (sq MapQueryBuilder) Equals(val map[string]interface{}) *model.BooleanExpression

type ObjectQueryBuilder

type ObjectQueryBuilder struct {
	PropName string
}

func (ObjectQueryBuilder) Equals

func (i ObjectQueryBuilder) Equals(val map[string]interface{}) *model.BooleanExpression

type Property added in v1.1.37

type Property[GoType any, QueryBuilderType PropertyTypeSpecificQueryBuilder[GoType]] interface {
	GetName() string
	GetType() model.ResourceProperty_Type
	Query() QueryBuilderType
}

func DefineProperty added in v1.1.37

func DefineProperty[GoType any, QueryBuilderType PropertyTypeSpecificQueryBuilder[GoType]](name string, typ model.ResourceProperty_Type, queryBuilderType QueryBuilderType) Property[GoType, QueryBuilderType]

type PropertyTypeSpecificQueryBuilder

type PropertyTypeSpecificQueryBuilder[GoType any] interface {
	Equals(val GoType) *model.BooleanExpression
}

type QueryBuilder

type QueryBuilder struct {
}

func NewQueryBuilder

func NewQueryBuilder() QueryBuilder

func (QueryBuilder) And

func (QueryBuilder) Equal

func (QueryBuilder) FromProperties

func (q QueryBuilder) FromProperties(resource *model.Resource, props map[string]*structpb.Value) *model.BooleanExpression

func (QueryBuilder) In added in v1.1.37

func (q QueryBuilder) In(property string, values []interface{}) *model.BooleanExpression

func (QueryBuilder) Not

func (QueryBuilder) Or

type RecordInlineSelector added in v1.2.39

type RecordInlineSelector struct {
}

func (RecordInlineSelector) EvaluateRecord added in v1.2.39

func (s RecordInlineSelector) EvaluateRecord(ctx context.Context, resource *model.Resource, record *model.Record, selector *resource_model.BooleanExpression) (bool, error)

func (RecordInlineSelector) SelectRecords added in v1.2.39

func (s RecordInlineSelector) SelectRecords(ctx context.Context, resource *model.Resource, records *[]*model.Record, selector *resource_model.BooleanExpression) ([]*model.Record, error)

type RecordSpecialColumnHelper

type RecordSpecialColumnHelper struct {
	Resource *model.Resource
	Record   *model.Record
}

func (RecordSpecialColumnHelper) GetCreatedBy

func (h RecordSpecialColumnHelper) GetCreatedBy() *string

func (RecordSpecialColumnHelper) GetCreatedOn

func (RecordSpecialColumnHelper) GetVersion

func (h RecordSpecialColumnHelper) GetVersion() uint32

func (RecordSpecialColumnHelper) IncreaseVersion

func (h RecordSpecialColumnHelper) IncreaseVersion()

func (RecordSpecialColumnHelper) InitVersion

func (h RecordSpecialColumnHelper) InitVersion()

func (RecordSpecialColumnHelper) IsAuditEnabled

func (h RecordSpecialColumnHelper) IsAuditEnabled() bool

func (RecordSpecialColumnHelper) IsVersionEnabled

func (h RecordSpecialColumnHelper) IsVersionEnabled() bool

func (RecordSpecialColumnHelper) SetCreatedBy

func (h RecordSpecialColumnHelper) SetCreatedBy(createdBy string)

func (RecordSpecialColumnHelper) SetCreatedOn

func (h RecordSpecialColumnHelper) SetCreatedOn(createdOn *timestamppb.Timestamp)

func (RecordSpecialColumnHelper) SetId

func (h RecordSpecialColumnHelper) SetId(id string)

func (RecordSpecialColumnHelper) SetUpdatedBy

func (h RecordSpecialColumnHelper) SetUpdatedBy(updatedBy string)

func (RecordSpecialColumnHelper) SetUpdatedOn

func (h RecordSpecialColumnHelper) SetUpdatedOn(updatedOn *timestamppb.Timestamp)

type StringQueryBuilder

type StringQueryBuilder struct {
	PropName string
}

func (StringQueryBuilder) Contains

func (StringQueryBuilder) Equals

type StructQueryBuilder

type StructQueryBuilder struct {
	PropName string
}

func (StructQueryBuilder) Contains

func (sq StructQueryBuilder) Contains(val map[string]interface{}) *model.BooleanExpression

func (StructQueryBuilder) Equals

func (sq StructQueryBuilder) Equals(val map[string]interface{}) *model.BooleanExpression

type TimeQueryBuilder

type TimeQueryBuilder struct {
	PropName string
}

func (TimeQueryBuilder) Equals

type TimestampQueryBuilder

type TimestampQueryBuilder struct {
	PropName string
}

func (TimestampQueryBuilder) Equals

type UuidQueryBuilder

type UuidQueryBuilder struct {
	PropName string
}

func (UuidQueryBuilder) Equals

Jump to

Keyboard shortcuts

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