Versions in this module Expand all Collapse all v0 v0.0.2 Apr 18, 2024 Changes in this version + var AllPhoneNumberSortableField = []PhoneNumberSortableField + var AllUserSortableField = []UserSortableField + var AllXgenResourceActionType = []XgenResourceActionType + var AllXgenResourceListActionType = []XgenResourceListActionType + var AllXgenSortDirection = []XgenSortDirection + func NewExecutableSchema(cfg Config) graphql.ExecutableSchema + func NewGormDB(sts *settings.EnvironmentSettings) (*gorm.DB, error) + func Paginate(paginationInput *XgenPaginationInput) func(db *gorm.DB) *gorm.DB + func Sort(sort sort.Sortables) func(db *gorm.DB) *gorm.DB + type Action struct + Action XgenResourceActionType + Resource string + Route *string + SchemaFieldName *string + type ActionAnnotationSingle struct + Name *string + Value *Action + type ActionField struct + Description *string + Label *string + MapTo []string + type BrowseUserInput struct + ID *int + Name *string + func (ra *BrowseUserInput) ToUserModel(ctx context.Context) (*User, error) + type BrowseUserInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type ComplexityRoot struct + Action struct{ ... } + ActionAnnotationSingle struct{ ... } + ActionField struct{ ... } + BrowseUserInputXgenDef struct{ ... } + Field struct{ ... } + ListAction struct{ ... } + ListActionAnnotationSingle struct{ ... } + Mutation struct{ ... } + Phone struct{ ... } + PhoneNumberInputXgenDef struct{ ... } + PhoneXgenDef struct{ ... } + Query struct{ ... } + Resource struct{ ... } + ResourceAnnotationSingle struct{ ... } + User struct{ ... } + UserInputXgenDef struct{ ... } + UserXgenDef struct{ ... } + XgenAnnotationMap struct{ ... } + XgenCursorPaginationInputXgenDef struct{ ... } + XgenFieldDef struct{ ... } + XgenIntrospection struct{ ... } + XgenObjectDefinition struct{ ... } + XgenObjectField struct{ ... } + XgenObjectMap struct{ ... } + XgenPaginationInputXgenDef struct{ ... } + XgenResourceAction struct{ ... } + XgenResourceActionTypeXgenDef struct{ ... } + XgenResourceDbConfigInputXgenDef struct{ ... } + XgenResourceDefinition struct{ ... } + XgenResourceFieldDbConfigInputXgenDef struct{ ... } + XgenResourceListActionTypeXgenDef struct{ ... } + XgenResourceMap struct{ ... } + XgenResourceProperty struct{ ... } + XgenSort struct{ ... } + XgenSortDirectionXgenDef struct{ ... } + XgenSortInputXgenDef struct{ ... } + XgenSortResourceConfig struct{ ... } + XgenSortResourceConfigInputXgenDef struct{ ... } + XgenSortResourceConfigXgenDef struct{ ... } + XgenSortXgenDef struct{ ... } + type Config struct + Complexity ComplexityRoot + Directives DirectiveRoot + Resolvers ResolverRoot + type DirectiveRoot struct + Action func(ctx context.Context, obj interface{}, next graphql.Resolver, resource string, ...) (res interface{}, err error) + ActionField func(ctx context.Context, obj interface{}, next graphql.Resolver, label *string, ...) (res interface{}, err error) + ExcludeArgumentFromType func(ctx context.Context, obj interface{}, next graphql.Resolver, exclude *bool) (res interface{}, err error) + Field func(ctx context.Context, obj interface{}, next graphql.Resolver, label *string, ...) (res interface{}, err error) + ListAction func(ctx context.Context, obj interface{}, next graphql.Resolver, resource string, ...) (res interface{}, err error) + Resource func(ctx context.Context, obj interface{}, next graphql.Resolver, name string, ...) (res interface{}, err error) + ToObjectType func(ctx context.Context, obj interface{}, next graphql.Resolver, typeArg string) (res interface{}, err error) + type Field struct + Description *string + Label *string + type ListAction struct + Action XgenResourceListActionType + Pagination *bool + Resource string + Route *string + SchemaFieldName *string + Sort *XgenSortResourceConfig + type ListActionAnnotationSingle struct + Name *string + Value *ListAction + type MutationResolver interface + PhoneNumberCreate func(ctx context.Context, input *PhoneNumberInput) (*Phone, error) + PhoneNumberUpdate func(ctx context.Context, input *PhoneNumberInput) (*Phone, error) + UserCreate func(ctx context.Context, input *UserInput) (*User, error) + UserUpdate func(ctx context.Context, input *UserInput) (*User, error) + type Phone struct + ID int + Number string + User *User + UserID int + type PhoneNumberInput struct + ID *int + Number *string + User *UserInput + func (ra *PhoneNumberInput) ToPhoneModel(ctx context.Context) (*Phone, error) + type PhoneNumberInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type PhoneNumberSingleSortInput struct + Direction *XgenSortDirection + Field PhoneNumberSortableField + type PhoneNumberSortInput struct + By []*PhoneNumberSingleSortInput + func (io *PhoneNumberSortInput) SortSqlStrings() []string + type PhoneNumberSortableField string + const PhoneNumberSortableFieldID + const PhoneNumberSortableFieldNumber + const PhoneNumberSortableFieldUser + func (e *PhoneNumberSortableField) UnmarshalGQL(v interface{}) error + func (e PhoneNumberSortableField) IsValid() bool + func (e PhoneNumberSortableField) MarshalGQL(w io.Writer) + func (e PhoneNumberSortableField) String() string + type PhoneXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type QueryResolver interface + UserBrowse func(ctx context.Context, where *BrowseUserInput, pagination *XgenPaginationInput, ...) ([]*User, error) + XgenIntrospection func(ctx context.Context) (*XgenIntrospection, error) + type ResolverRoot interface + Mutation func() MutationResolver + Query func() QueryResolver + type Resource struct + Name string + Primary *bool + Route *string + type ResourceAnnotationSingle struct + Name *string + Value *Resource + type User struct + ID int + Name string + PhoneNumbers []*Phone + type UserInput struct + ID *int + Name *string + Phones []*PhoneNumberInput + func (ra *UserInput) ToUserModel(ctx context.Context) (*User, error) + type UserInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type UserSingleSortInput struct + Direction *XgenSortDirection + Field UserSortableField + type UserSortInput struct + By []*UserSingleSortInput + func (io *UserSortInput) SortSqlStrings() []string + type UserSortableField string + const UserSortableFieldID + const UserSortableFieldName + const UserSortableFieldPhoneNumbers + func (e *UserSortableField) UnmarshalGQL(v interface{}) error + func (e UserSortableField) IsValid() bool + func (e UserSortableField) MarshalGQL(w io.Writer) + func (e UserSortableField) String() string + type UserXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenAnnotationMap struct + Action []*ActionAnnotationSingle + ListAction []*ListActionAnnotationSingle + Resource []*ResourceAnnotationSingle + type XgenCursorPaginationInput struct + After *string + Before *string + First int + Last int + type XgenCursorPaginationInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenFieldDef struct + ActionField *ActionField + Field *Field + type XgenIntrospection struct + Annotation *XgenAnnotationMap + Object *XgenObjectMap + Resource *XgenResourceMap + func XgenIntrospectionValues() (*XgenIntrospection, error) + type XgenObjectDefinition struct + Action *Action + ListAction *ListAction + Resource *Resource + type XgenObjectField struct + Definition *XgenFieldDef + Name *string + type XgenObjectMap struct + BrowseUserInput *BrowseUserInputXgenDef + Phone *PhoneXgenDef + PhoneNumberInput *PhoneNumberInputXgenDef + User *UserXgenDef + UserInput *UserInputXgenDef + XgenCursorPaginationInput *XgenCursorPaginationInputXgenDef + XgenPaginationInput *XgenPaginationInputXgenDef + XgenResourceActionType *XgenResourceActionTypeXgenDef + XgenResourceDbConfigInput *XgenResourceDbConfigInputXgenDef + XgenResourceFieldDbConfigInput *XgenResourceFieldDbConfigInputXgenDef + XgenResourceListActionType *XgenResourceListActionTypeXgenDef + XgenSort *XgenSortXgenDef + XgenSortDirection *XgenSortDirectionXgenDef + XgenSortInput *XgenSortInputXgenDef + XgenSortResourceConfig *XgenSortResourceConfigXgenDef + XgenSortResourceConfigInput *XgenSortResourceConfigInputXgenDef + type XgenPaginationInput struct + Page int + Size int + type XgenPaginationInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenResourceAction struct + Action XgenResourceActionType + Resource string + Route *string + SchemaFieldName *string + type XgenResourceActionType string + const XgenResourceActionTypeCreateMutation + const XgenResourceActionTypeDeleteMutation + const XgenResourceActionTypeReadQuery + const XgenResourceActionTypeUpdateMutation + func (e *XgenResourceActionType) UnmarshalGQL(v interface{}) error + func (e XgenResourceActionType) IsValid() bool + func (e XgenResourceActionType) MarshalGQL(w io.Writer) + func (e XgenResourceActionType) String() string + type XgenResourceActionTypeXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenResourceDbConfigInput struct + Table *string + type XgenResourceDbConfigInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenResourceDefinition struct + Actions []*XgenResourceAction + ObjectName *string + Properties *XgenResourceProperty + type XgenResourceFieldDbConfigInput struct + AutoIncrement *bool + AutoIncrementIncrement *int + Column *string + Index *bool + NotNull *bool + Precision *int + PrimaryKey *bool + Scale *int + Size *int + Type *string + Unique *bool + UniqueIndex *bool + type XgenResourceFieldDbConfigInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenResourceListActionType string + const XgenResourceListActionTypeBatchDeleteMutation + const XgenResourceListActionTypeBrowseQuery + func (e *XgenResourceListActionType) UnmarshalGQL(v interface{}) error + func (e XgenResourceListActionType) IsValid() bool + func (e XgenResourceListActionType) MarshalGQL(w io.Writer) + func (e XgenResourceListActionType) String() string + type XgenResourceListActionTypeXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenResourceMap struct + PhoneNumber *XgenResourceDefinition + User *XgenResourceDefinition + type XgenResourceProperty struct + Name string + Primary *bool + Route *string + type XgenSort struct + By string + Direction *XgenSortDirection + type XgenSortDirection string + const XgenSortDirectionAsc + const XgenSortDirectionDesc + func (e *XgenSortDirection) UnmarshalGQL(v interface{}) error + func (e XgenSortDirection) IsValid() bool + func (e XgenSortDirection) MarshalGQL(w io.Writer) + func (e XgenSortDirection) String() string + type XgenSortDirectionXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenSortInput struct + By string + Direction *XgenSortDirection + type XgenSortInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenSortResourceConfig struct + Default []*XgenSort + Disabled *bool + type XgenSortResourceConfigInput struct + Default []*XgenSortInput + Disabled *bool + type XgenSortResourceConfigInputXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenSortResourceConfigXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition + type XgenSortXgenDef struct + Field []*XgenObjectField + Object *XgenObjectDefinition