Documentation ¶
Index ¶
- Variables
- type AndCondition
- type BasicCondition
- type BasicOperator
- type BoolCondition
- type BoolOperator
- type Buildr
- func (b *Buildr) Build() (*View, error)
- func (b *Buildr) Columns(columns *ColumnList) *Buildr
- func (b *Buildr) Filter(filter *Condition) *Buildr
- func (b *Buildr) ID(id ID) *Buildr
- func (b *Buildr) Model(model ModelID) *Buildr
- func (b *Buildr) MustBuild() *View
- func (b *Buildr) Name(name string) *Buildr
- func (b *Buildr) NewID() *Buildr
- func (b *Buildr) Order(order int) *Buildr
- func (b *Buildr) Project(project ProjectID) *Buildr
- func (b *Buildr) Schema(schema SchemaID) *Buildr
- func (b *Buildr) Sort(sort *Sort) *Buildr
- func (b *Buildr) UpdatedAt(updatedAt time.Time) *Buildr
- func (b *Buildr) User(user UserID) *Buildr
- type Column
- type ColumnList
- type Condition
- type ConditionType
- type Direction
- type FieldSelector
- type FieldSelectorList
- type FieldType
- type ID
- type IDList
- type List
- type ModelID
- type MultipleCondition
- type MultipleOperator
- type NullableCondition
- type NullableOperator
- type NumberCondition
- type NumberOperator
- type OrCondition
- type ProjectID
- type SchemaID
- type Sort
- type StringCondition
- type StringOperator
- type TimeCondition
- type TimeOperator
- type UserID
- type View
- func (v *View) Clone() *View
- func (v *View) Columns() *ColumnList
- func (v *View) Filter() *Condition
- func (v *View) ID() ID
- func (v *View) Model() ModelID
- func (v *View) Name() string
- func (g *View) Order() int
- func (v *View) Project() ProjectID
- func (v *View) Schema() SchemaID
- func (v *View) SetColumns(columns *ColumnList)
- func (v *View) SetFilter(condition *Condition)
- func (v *View) SetName(name string)
- func (g *View) SetOrder(order int)
- func (v *View) SetSort(sort *Sort)
- func (v *View) SetUpdatedAt(now time.Time)
- func (v *View) Sort() *Sort
- func (v *View) UpdatedAt() time.Time
- func (v *View) User() UserID
Constants ¶
This section is empty.
Variables ¶
View Source
var NewID = id.NewViewID
View Source
var NewModelID = id.NewModelID
View Source
var NewProjectID = id.NewProjectID
View Source
var NewSchemaID = id.NewSchemaID
View Source
var NewUserID = accountdomain.NewUserID
Functions ¶
This section is empty.
Types ¶
type AndCondition ¶
type AndCondition struct {
Conditions []Condition
}
type BasicCondition ¶
type BasicCondition struct { Field FieldSelector Op BasicOperator Value any }
type BasicOperator ¶
type BasicOperator string
const ( BasicOperatorEquals BasicOperator = "EQUALS" BasicOperatorNotEquals BasicOperator = "NOT_EQUALS" )
type BoolCondition ¶
type BoolCondition struct { Field FieldSelector Op BoolOperator Value bool }
type BoolOperator ¶
type BoolOperator string
const ( BoolOperatorEquals BoolOperator = "EQUALS" BoolOperatorNotEquals BoolOperator = "NOT_EQUALS" )
type Buildr ¶
type Buildr struct {
// contains filtered or unexported fields
}
func (*Buildr) Columns ¶
func (b *Buildr) Columns(columns *ColumnList) *Buildr
type Column ¶
type Column struct { Field FieldSelector Visible bool }
type ColumnList ¶
type ColumnList []Column
type Condition ¶
type Condition struct { ConditionType ConditionType AndCondition *AndCondition OrCondition *OrCondition BasicCondition *BasicCondition NullableCondition *NullableCondition MultipleCondition *MultipleCondition BoolCondition *BoolCondition StringCondition *StringCondition NumberCondition *NumberCondition TimeCondition *TimeCondition }
func (Condition) FieldsByType ¶
func (c Condition) FieldsByType(t FieldType) FieldSelectorList
func (Condition) ItemFields ¶
func (c Condition) ItemFields() FieldSelectorList
func (Condition) MetaFields ¶
func (c Condition) MetaFields() FieldSelectorList
type ConditionType ¶
type ConditionType string
const ( ConditionTypeAnd ConditionType = "AND" ConditionTypeOr ConditionType = "OR" ConditionTypeBasic ConditionType = "BASIC" ConditionTypeNullable ConditionType = "NULLABLE" ConditionTypeMultiple ConditionType = "MULTIPLE" ConditionTypeBool ConditionType = "BOOL" ConditionTypeString ConditionType = "STRING" ConditionTypeNumber ConditionType = "NUMBER" ConditionTypeTime ConditionType = "TIME" )
type FieldSelector ¶
type FieldSelectorList ¶
type FieldSelectorList []FieldSelector
type FieldType ¶
type FieldType string
const ( FieldTypeId FieldType = "ID" FieldTypeCreationDate FieldType = "CREATIONDATE" FieldTypeCreationUser FieldType = "CREATIONUSER" FieldTypeModificationDate FieldType = "MODIFICATIONDATE" FieldTypeModificationUser FieldType = "MODIFICATIONUSER" FieldTypeStatus FieldType = "STATUS" FieldTypeField FieldType = "FIELD" FieldTypeMetaField FieldType = "METAFIELD" )
type IDList ¶
type IDList = id.ViewIDList
type List ¶
type List []*View
func (List) AreViewsInTheSameModel ¶
func (List) OrderByIDs ¶
func (l List) OrderByIDs(ids id.ViewIDList) List
func (List) Projects ¶
func (l List) Projects() id.ProjectIDList
type MultipleCondition ¶
type MultipleCondition struct { Field FieldSelector Op MultipleOperator Value []any }
type MultipleOperator ¶
type MultipleOperator string
const ( MultipleOperatorIncludesAny MultipleOperator = "INCLUDES_ANY" MultipleOperatorNotIncludesAny MultipleOperator = "NOT_INCLUDES_ANY" MultipleOperatorIncludesAll MultipleOperator = "INCLUDES_ALL" MultipleOperatorNotIncludesAll MultipleOperator = "NOT_INCLUDES_ALL" )
type NullableCondition ¶
type NullableCondition struct { Field FieldSelector Op NullableOperator }
type NullableOperator ¶
type NullableOperator string
const ( NullableOperatorEmpty NullableOperator = "EMPTY" NullableOperatorNotEmpty NullableOperator = "NOT_EMPTY" )
type NumberCondition ¶
type NumberCondition struct { Field FieldSelector Op NumberOperator Value float64 }
type NumberOperator ¶
type NumberOperator string
const ( NumberOperatorGreaterThan NumberOperator = "GREATER_THAN" NumberOperatorLessThan NumberOperator = "LESS_THAN" NumberOperatorGreaterThanOrEqualTo NumberOperator = "GREATER_THAN_OR_EQUAL_TO" NumberOperatorLessThanOrEqualTo NumberOperator = "LESS_THAN_OR_EQUAL_TO" )
type OrCondition ¶
type OrCondition struct {
Conditions []Condition
}
type Sort ¶
type Sort struct { Field FieldSelector Direction Direction }
type StringCondition ¶
type StringCondition struct { Field FieldSelector Op StringOperator Value string }
type StringOperator ¶
type StringOperator string
const ( StringOperatorContains StringOperator = "CONTAINS" StringOperatorNotContains StringOperator = "NOT_CONTAINS" StringOperatorStartsWith StringOperator = "STARTS_WITH" StringOperatorEndsWith StringOperator = "ENDS_WITH" StringOperatorNotStartsWith StringOperator = "NOT_STARTS_WITH" StringOperatorNotEndsWith StringOperator = "NOT_ENDS_WITH" )
type TimeCondition ¶
type TimeCondition struct { Field FieldSelector Op TimeOperator Value time.Time }
type TimeOperator ¶
type TimeOperator string
const ( TimeOperatorBefore TimeOperator = "BEFORE" TimeOperatorAfter TimeOperator = "AFTER" TimeOperatorBeforeOrOn TimeOperator = "BEFORE_OR_ON" TimeOperatorAfterOrOn TimeOperator = "AFTER_OR_ON" TimeOperatorOfThisWeek TimeOperator = "OF_THIS_WEEK" TimeOperatorOfThisMonth TimeOperator = "OF_THIS_MONTH" TimeOperatorOfThisYear TimeOperator = "OF_THIS_YEAR" )
type UserID ¶
type UserID = accountdomain.UserID
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) Columns ¶
func (v *View) Columns() *ColumnList
func (*View) SetColumns ¶
func (v *View) SetColumns(columns *ColumnList)
func (*View) SetUpdatedAt ¶
Click to show internal directories.
Click to hide internal directories.