Documentation
¶
Index ¶
- Variables
- func JSONDefaultValue[T any](val string) T
- func JSONDefaultValueWithError[T any](val string) (T, error)
- func ValidateEmail(val string) error
- func ValidateJSONDefaultValue(val string) error
- func ValidatePhone(val string) error
- type CreateEdgeInput
- type CreateEntityInput
- type CreateFieldInput
- type CreateManyEdgesInput
- type CreateManyFieldsInput
- type Edge
- type EdgeWhereUniqueInput
- type Entity
- type EntityConnectInput
- type EntityOwner
- type EntityWhereUniqueInput
- type Field
- type FieldType
- type FieldWhereUniqueInput
- type RelationType
- type UpdateEdgeInput
- type UpdateEntityInput
- type UpdateFieldInput
- type UpdateManyEdgesInput
- type UpdateManyFieldsInput
- type UpdateOneEdgeInput
- type UpdateOneFieldInput
Constants ¶
This section is empty.
Variables ¶
View Source
var AllEntityOwner = []EntityOwner{ EntityOwnerAdmin, EntityOwnerUser, }
View Source
var AllRelationType = []RelationType{ RelationTypeOne, RelationTypeMany, RelationTypeO2O, RelationTypeO2M, RelationTypeM2O, RelationTypeM2M, }
Functions ¶
func JSONDefaultValue ¶
func ValidateEmail ¶
func ValidatePhone ¶
Types ¶
type CreateEdgeInput ¶
type CreateEdgeInput struct {
Caption string
RelatedEntity *EntityConnectInput
Required *bool
RelationType RelationType
Private *bool
BelongsToCaption *string
Type *string
Ref string
}
type CreateEntityInput ¶
type CreateEntityInput struct {
Caption string
DisplayField FieldWhereUniqueInput
Fields *CreateManyFieldsInput
Edges *CreateManyEdgesInput
}
type CreateFieldInput ¶
type CreateManyEdgesInput ¶
type CreateManyEdgesInput struct {
Create []*CreateEdgeInput
}
type CreateManyFieldsInput ¶
type CreateManyFieldsInput struct {
Create []*CreateFieldInput
}
type Edge ¶
type Edge struct {
Name string
EntName string
Caption string
Type string
BelongsToCaption *string
Required *bool
RelationType RelationType
Private *bool
Ref string
}
func (*Edge) ApplyUpdateInput ¶
func (e *Edge) ApplyUpdateInput(data UpdateEdgeInput)
func (Edge) Equals ¶
func (f Edge) Equals(uniqueInput EdgeWhereUniqueInput) bool
type EdgeWhereUniqueInput ¶
type Entity ¶
type Entity struct {
Name string
EntName string
Caption string
Owner EntityOwner
DisplayFieldName string
}
func (*Entity) ApplyUpdateInput ¶
func (e *Entity) ApplyUpdateInput(data UpdateEntityInput)
func (Entity) Equals ¶
func (f Entity) Equals(uniqueInput EntityWhereUniqueInput) bool
type EntityConnectInput ¶
type EntityConnectInput struct {
Connect EntityWhereUniqueInput
}
type EntityOwner ¶
type EntityOwner string
const ( EntityOwnerAdmin EntityOwner = "Admin" EntityOwnerUser EntityOwner = "User" )
func (EntityOwner) IsValid ¶
func (e EntityOwner) IsValid() bool
func (EntityOwner) MarshalGQL ¶
func (e EntityOwner) MarshalGQL(w io.Writer)
func (EntityOwner) String ¶
func (e EntityOwner) String() string
func (*EntityOwner) UnmarshalGQL ¶
func (e *EntityOwner) UnmarshalGQL(v interface{}) error
type EntityWhereUniqueInput ¶
type Field ¶
type Field struct {
Name string
EntName string
Caption string
Type string
Required *bool
Unique *bool
DefaultValue *string
Min *string
Max *string
Private *bool
Nillable bool
UpdateDefault bool
AcceptedValues []string
}
func (*Field) ApplyUpdateInput ¶
func (f *Field) ApplyUpdateInput(data UpdateFieldInput)
func (Field) Equals ¶
func (f Field) Equals(uniqueInput FieldWhereUniqueInput) bool
type FieldType ¶
type FieldType string
const ( FieldTypeID FieldType = "ID" FieldTypeShortText FieldType = "ShortText" FieldTypeLongText FieldType = "LongText" FieldTypeRichText FieldType = "RichText" FieldTypeEmail FieldType = "Email" FieldTypeInteger FieldType = "Integer" FieldTypeDecimal FieldType = "Decimal" FieldTypeFloat FieldType = "Float" FieldTypeBoolean FieldType = "Boolean" FieldTypeSingleChoice FieldType = "SingleChoice" FieldTypeMultipleChoice FieldType = "MultipleChoice" FieldTypeDateTime FieldType = "DateTime" FieldTypeDate FieldType = "Date" FieldTypeTime FieldType = "Time" FieldTypeJson FieldType = "Json" FieldTypeEnum FieldType = "Enum" FieldTypeEnums FieldType = "Enums" )
type FieldWhereUniqueInput ¶
type RelationType ¶
type RelationType string
const ( RelationTypeOne RelationType = "One" RelationTypeMany RelationType = "Many" RelationTypeO2O RelationType = "OneToOne" RelationTypeO2M RelationType = "OneToMany" RelationTypeM2O RelationType = "ManyToOne" RelationTypeM2M RelationType = "ManyToMany" )
func (RelationType) IsValid ¶
func (e RelationType) IsValid() bool
func (RelationType) MarshalGQL ¶
func (e RelationType) MarshalGQL(w io.Writer)
func (RelationType) String ¶
func (e RelationType) String() string
func (*RelationType) UnmarshalGQL ¶
func (e *RelationType) UnmarshalGQL(v interface{}) error
func (RelationType) VariableName ¶
func (e RelationType) VariableName() string
type UpdateEdgeInput ¶
type UpdateEntityInput ¶
type UpdateEntityInput struct {
Caption *string
DisplayField *FieldWhereUniqueInput
Fields *UpdateManyFieldsInput
Edges *UpdateManyEdgesInput
}
type UpdateFieldInput ¶
type UpdateManyEdgesInput ¶
type UpdateManyEdgesInput struct {
Create []*CreateEdgeInput `json:"create"`
Update []*UpdateOneEdgeInput `json:"update"`
Delete []*EdgeWhereUniqueInput `json:"delete"`
}
type UpdateManyFieldsInput ¶
type UpdateManyFieldsInput struct {
Create []*CreateFieldInput `json:"create"`
Update []*UpdateOneFieldInput `json:"update"`
Delete []*FieldWhereUniqueInput `json:"delete"`
}
type UpdateOneEdgeInput ¶
type UpdateOneEdgeInput struct {
Where EdgeWhereUniqueInput
Data UpdateEdgeInput
}
type UpdateOneFieldInput ¶
type UpdateOneFieldInput struct {
Where FieldWhereUniqueInput
Data UpdateFieldInput
}
Click to show internal directories.
Click to hide internal directories.