Documentation ¶
Index ¶
- func RandStringRunes(n int) string
- type BoolQueryBuilder
- type BytesQueryBuilder
- type DateQueryBuilder
- type EnumQueryBuilder
- type Float32QueryBuilder
- type Float64QueryBuilder
- type Int32QueryBuilder
- type Int64QueryBuilder
- type ListQueryBuilder
- type MapQueryBuilder
- type ObjectQueryBuilder
- type Property
- type PropertyTypeSpecificQueryBuilder
- type QueryBuilder
- func (q QueryBuilder) And(list ...*model.BooleanExpression) *model.BooleanExpression
- func (q QueryBuilder) Equal(property *model.ResourceProperty, value *structpb.Value) *model.BooleanExpression
- func (q QueryBuilder) FromProperties(resource *model.Resource, props map[string]*structpb.Value) *model.BooleanExpression
- func (q QueryBuilder) In(property string, values []interface{}) *model.BooleanExpression
- func (q QueryBuilder) Not(condition *model.BooleanExpression) *model.BooleanExpression
- func (q QueryBuilder) Or(list ...*model.BooleanExpression) *model.BooleanExpression
- type RecordInlineSelector
- type RecordSpecialColumnHelper
- func (h RecordSpecialColumnHelper) GetCreatedBy() *string
- func (h RecordSpecialColumnHelper) GetCreatedOn() *timestamppb.Timestamp
- func (h RecordSpecialColumnHelper) GetVersion() uint32
- func (h RecordSpecialColumnHelper) IncreaseVersion()
- func (h RecordSpecialColumnHelper) InitVersion()
- func (h RecordSpecialColumnHelper) IsAuditEnabled() bool
- func (h RecordSpecialColumnHelper) IsVersionEnabled() bool
- func (h RecordSpecialColumnHelper) SetCreatedBy(createdBy string)
- func (h RecordSpecialColumnHelper) SetCreatedOn(createdOn *timestamppb.Timestamp)
- func (h RecordSpecialColumnHelper) SetId(id string)
- func (h RecordSpecialColumnHelper) SetUpdatedBy(updatedBy string)
- func (h RecordSpecialColumnHelper) SetUpdatedOn(updatedOn *timestamppb.Timestamp)
- type StringQueryBuilder
- type StructQueryBuilder
- type TimeQueryBuilder
- type TimestampQueryBuilder
- type UuidQueryBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandStringRunes ¶
Types ¶
type BoolQueryBuilder ¶
type BoolQueryBuilder struct {
PropName string
}
func (BoolQueryBuilder) Equals ¶
func (i BoolQueryBuilder) Equals(val bool) *model.BooleanExpression
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 ¶
func (i DateQueryBuilder) Equals(val time.Time) *model.BooleanExpression
type EnumQueryBuilder ¶
type EnumQueryBuilder struct {
PropName string
}
func (EnumQueryBuilder) Equals ¶
func (sq EnumQueryBuilder) Equals(val string) *model.BooleanExpression
type Float32QueryBuilder ¶
type Float32QueryBuilder struct {
PropName string
}
func (Float32QueryBuilder) Equals ¶
func (i Float32QueryBuilder) Equals(val float32) *model.BooleanExpression
type Float64QueryBuilder ¶
type Float64QueryBuilder struct {
PropName string
}
func (Float64QueryBuilder) Equals ¶
func (i Float64QueryBuilder) Equals(val float64) *model.BooleanExpression
type Int32QueryBuilder ¶
type Int32QueryBuilder struct {
PropName string
}
func (Int32QueryBuilder) Equals ¶
func (i Int32QueryBuilder) Equals(val int32) *model.BooleanExpression
type Int64QueryBuilder ¶
type Int64QueryBuilder struct {
PropName string
}
func (Int64QueryBuilder) Equals ¶
func (i Int64QueryBuilder) Equals(val int64) *model.BooleanExpression
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 (q QueryBuilder) And(list ...*model.BooleanExpression) *model.BooleanExpression
func (QueryBuilder) Equal ¶
func (q QueryBuilder) Equal(property *model.ResourceProperty, value *structpb.Value) *model.BooleanExpression
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 (q QueryBuilder) Not(condition *model.BooleanExpression) *model.BooleanExpression
func (QueryBuilder) Or ¶
func (q QueryBuilder) Or(list ...*model.BooleanExpression) *model.BooleanExpression
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 ¶
func (RecordSpecialColumnHelper) GetCreatedBy ¶
func (h RecordSpecialColumnHelper) GetCreatedBy() *string
func (RecordSpecialColumnHelper) GetCreatedOn ¶
func (h RecordSpecialColumnHelper) GetCreatedOn() *timestamppb.Timestamp
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 (sq StringQueryBuilder) Contains(val string) *model.BooleanExpression
func (StringQueryBuilder) Equals ¶
func (sq StringQueryBuilder) Equals(val string) *model.BooleanExpression
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 ¶
func (i TimeQueryBuilder) Equals(val time.Time) *model.BooleanExpression
type TimestampQueryBuilder ¶
type TimestampQueryBuilder struct {
PropName string
}
func (TimestampQueryBuilder) Equals ¶
func (i TimestampQueryBuilder) Equals(val time.Time) *model.BooleanExpression
type UuidQueryBuilder ¶
type UuidQueryBuilder struct {
PropName string
}
func (UuidQueryBuilder) Equals ¶
func (u UuidQueryBuilder) Equals(val uuid.UUID) *model.BooleanExpression
Click to show internal directories.
Click to hide internal directories.