Documentation
¶
Index ¶
- Variables
- 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
- type ActionAnnotationSingle
- type ActionField
- type Car
- type CarBrowseInput
- type CarBrowseInputXgenDef
- type CarInput
- type CarInputXgenDef
- type CarSingleSortInput
- type CarSortInput
- type CarSortableField
- type CarXgenDef
- type ComplexityRoot
- type Config
- type DeleteUsers
- type DeleteUsersXgenDef
- type DirectiveRoot
- type Field
- type ListAction
- type ListActionAnnotationSingle
- type ListUser
- type ListUserXgenDef
- type MutationResolver
- type Phone
- type PhoneNumberBrowseInput
- type PhoneNumberBrowseInputXgenDef
- type PhoneNumberInput
- type PhoneNumberInputXgenDef
- type PhoneNumberSingleSortInput
- type PhoneNumberSortInput
- type PhoneNumberSortableField
- type PhoneXgenDef
- type QueryResolver
- type ResolverRoot
- type Resource
- type ResourceAnnotationSingle
- type User
- type UserInput
- type UserInputXgenDef
- type UserSingleSortInput
- type UserSortInput
- type UserSortableField
- type UserXgenDef
- type XgenAnnotationMap
- type XgenCursorPaginationInput
- type XgenCursorPaginationInputXgenDef
- type XgenFieldDef
- type XgenIntrospection
- type XgenObjectDefinition
- type XgenObjectField
- type XgenObjectMap
- type XgenPaginationInput
- type XgenPaginationInputXgenDef
- type XgenResourceAction
- type XgenResourceActionType
- type XgenResourceActionTypeXgenDef
- type XgenResourceDbConfigInput
- type XgenResourceDbConfigInputXgenDef
- type XgenResourceDefinition
- type XgenResourceFieldDbConfigInput
- type XgenResourceFieldDbConfigInputXgenDef
- type XgenResourceListActionType
- type XgenResourceListActionTypeXgenDef
- type XgenResourceMap
- type XgenResourceProperty
- type XgenSort
- type XgenSortDirection
- type XgenSortDirectionXgenDef
- type XgenSortInput
- type XgenSortInputXgenDef
- type XgenSortResourceConfig
- type XgenSortResourceConfigInput
- type XgenSortResourceConfigInputXgenDef
- type XgenSortResourceConfigXgenDef
- type XgenSortXgenDef
Constants ¶
This section is empty.
Variables ¶
View Source
var AllCarSortableField = []CarSortableField{ CarSortableFieldID, CarSortableFieldMake, CarSortableFieldDone, CarSortableFieldUser, }
View Source
var AllPhoneNumberSortableField = []PhoneNumberSortableField{ PhoneNumberSortableFieldID, PhoneNumberSortableFieldNumber, PhoneNumberSortableFieldUser, }
View Source
var AllUserSortableField = []UserSortableField{ UserSortableFieldID, UserSortableFieldName, UserSortableFieldCars, UserSortableFieldPhoneNumbers, }
View Source
var AllXgenResourceActionType = []XgenResourceActionType{ XgenResourceActionTypeCreateMutation, XgenResourceActionTypeReadQuery, XgenResourceActionTypeUpdateMutation, XgenResourceActionTypeDeleteMutation, }
View Source
var AllXgenResourceListActionType = []XgenResourceListActionType{ XgenResourceListActionTypeBrowseQuery, XgenResourceListActionTypeBatchDeleteMutation, }
View Source
var AllXgenSortDirection = []XgenSortDirection{ XgenSortDirectionAsc, XgenSortDirectionDesc, }
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type Action ¶
type Action struct {
Resource string `json:"Resource"`
Action XgenResourceActionType `json:"Action"`
Route *string `json:"Route,omitempty"`
SchemaFieldName *string `json:"SchemaFieldName,omitempty"`
}
This directive is used to mark the object as a resource action
type ActionAnnotationSingle ¶
type ActionField ¶
type ActionField struct {
Label *string `json:"Label,omitempty"`
Description *string `json:"Description,omitempty"`
// Map field to resource field, {resource}.{field}, eg. user.id
MapTo []string `json:"MapTo,omitempty"`
}
This directive is used to mark the object as a resource field
type CarBrowseInput ¶
type CarBrowseInput struct {
ID *int `json:"id,omitempty" mapto:""`
UserID *int `json:"userId,omitempty" mapto:""`
Make *string `json:"make,omitempty" mapto:""`
}
func (*CarBrowseInput) ToCarModel ¶
func (ra *CarBrowseInput) ToCarModel(ctx context.Context) (*Car, error)
ToCarModel Map CarBrowseInput to Car model
type CarBrowseInputXgenDef ¶
type CarBrowseInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type CarInput ¶
type CarInputXgenDef ¶
type CarInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type CarSingleSortInput ¶
type CarSingleSortInput struct {
Field CarSortableField `json:"field"`
Direction *XgenSortDirection `json:"direction,omitempty"`
}
type CarSortInput ¶
type CarSortInput struct {
By []*CarSingleSortInput `json:"by,omitempty"`
}
func (*CarSortInput) SortSqlStrings ¶
func (io *CarSortInput) SortSqlStrings() []string
type CarSortableField ¶
type CarSortableField string
const ( CarSortableFieldID CarSortableField = "id" CarSortableFieldMake CarSortableField = "make" CarSortableFieldDone CarSortableField = "done" CarSortableFieldUser CarSortableField = "user" )
func (CarSortableField) IsValid ¶
func (e CarSortableField) IsValid() bool
func (CarSortableField) MarshalGQL ¶
func (e CarSortableField) MarshalGQL(w io.Writer)
func (CarSortableField) String ¶
func (e CarSortableField) String() string
func (*CarSortableField) UnmarshalGQL ¶
func (e *CarSortableField) UnmarshalGQL(v interface{}) error
type CarXgenDef ¶
type CarXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type ComplexityRoot ¶
type ComplexityRoot struct {
Action struct {
Action func(childComplexity int) int
Resource func(childComplexity int) int
Route func(childComplexity int) int
SchemaFieldName func(childComplexity int) int
}
ActionAnnotationSingle struct {
Name func(childComplexity int) int
Value func(childComplexity int) int
}
ActionField struct {
Description func(childComplexity int) int
Label func(childComplexity int) int
MapTo func(childComplexity int) int
}
Car struct {
Done func(childComplexity int) int
ID func(childComplexity int) int
Make func(childComplexity int) int
User func(childComplexity int) int
}
CarBrowseInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
CarInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
CarXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
DeleteUsersXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
Field struct {
Description func(childComplexity int) int
Label func(childComplexity int) int
}
ListAction struct {
Action func(childComplexity int) int
Pagination func(childComplexity int) int
Resource func(childComplexity int) int
Route func(childComplexity int) int
SchemaFieldName func(childComplexity int) int
Sort func(childComplexity int) int
}
ListActionAnnotationSingle struct {
Name func(childComplexity int) int
Value func(childComplexity int) int
}
ListUserXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
Mutation struct {
CarCreate func(childComplexity int, input *CarInput) int
CarUpdate func(childComplexity int, input *CarInput) int
PhoneNumberCreate func(childComplexity int, input *PhoneNumberInput) int
PhoneNumberUpdate func(childComplexity int, input *PhoneNumberInput) int
UserBatchDelete func(childComplexity int, input *DeleteUsers) int
UserCreate func(childComplexity int, input *UserInput) int
UserUpdate func(childComplexity int, input *UserInput) int
}
Phone struct {
ID func(childComplexity int) int
Number func(childComplexity int) int
User func(childComplexity int) int
}
PhoneNumberBrowseInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
PhoneNumberInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
PhoneXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
Query struct {
CarBrowse func(childComplexity int, where *CarBrowseInput) int
PhoneNumberBrowse func(childComplexity int, where *PhoneNumberBrowseInput) int
UserBrowse func(childComplexity int, where *ListUser, pagination *XgenPaginationInput, sort *UserSortInput) int
XgenIntrospection func(childComplexity int) int
}
Resource struct {
Name func(childComplexity int) int
Primary func(childComplexity int) int
Route func(childComplexity int) int
}
ResourceAnnotationSingle struct {
Name func(childComplexity int) int
Value func(childComplexity int) int
}
User struct {
Cars func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
PhoneNumbers func(childComplexity int) int
}
UserInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
UserXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenAnnotationMap struct {
Action func(childComplexity int) int
ListAction func(childComplexity int) int
Resource func(childComplexity int) int
}
XgenCursorPaginationInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenFieldDef struct {
ActionField func(childComplexity int) int
Field func(childComplexity int) int
}
XgenIntrospection struct {
Annotation func(childComplexity int) int
Object func(childComplexity int) int
Resource func(childComplexity int) int
}
XgenObjectDefinition struct {
Action func(childComplexity int) int
ListAction func(childComplexity int) int
Resource func(childComplexity int) int
}
XgenObjectField struct {
Definition func(childComplexity int) int
Name func(childComplexity int) int
}
XgenObjectMap struct {
Car func(childComplexity int) int
CarBrowseInput func(childComplexity int) int
CarInput func(childComplexity int) int
DeleteUsers func(childComplexity int) int
ListUser func(childComplexity int) int
Phone func(childComplexity int) int
PhoneNumberBrowseInput func(childComplexity int) int
PhoneNumberInput func(childComplexity int) int
User func(childComplexity int) int
UserInput func(childComplexity int) int
XgenCursorPaginationInput func(childComplexity int) int
XgenPaginationInput func(childComplexity int) int
XgenResourceActionType func(childComplexity int) int
XgenResourceDbConfigInput func(childComplexity int) int
XgenResourceFieldDbConfigInput func(childComplexity int) int
XgenResourceListActionType func(childComplexity int) int
XgenSort func(childComplexity int) int
XgenSortDirection func(childComplexity int) int
XgenSortInput func(childComplexity int) int
XgenSortResourceConfig func(childComplexity int) int
XgenSortResourceConfigInput func(childComplexity int) int
}
XgenPaginationInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenResourceAction struct {
Action func(childComplexity int) int
Resource func(childComplexity int) int
Route func(childComplexity int) int
SchemaFieldName func(childComplexity int) int
}
XgenResourceActionTypeXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenResourceDbConfigInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenResourceDefinition struct {
Actions func(childComplexity int) int
ObjectName func(childComplexity int) int
Properties func(childComplexity int) int
}
XgenResourceFieldDbConfigInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenResourceListActionTypeXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenResourceMap struct {
Car func(childComplexity int) int
PhoneNumber func(childComplexity int) int
User func(childComplexity int) int
}
XgenResourceProperty struct {
Name func(childComplexity int) int
Primary func(childComplexity int) int
Route func(childComplexity int) int
}
XgenSort struct {
By func(childComplexity int) int
Direction func(childComplexity int) int
}
XgenSortDirectionXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenSortInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenSortResourceConfig struct {
Default func(childComplexity int) int
Disabled func(childComplexity int) int
}
XgenSortResourceConfigInputXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenSortResourceConfigXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
XgenSortXgenDef struct {
Field func(childComplexity int) int
Object func(childComplexity int) int
}
}
type Config ¶
type Config struct {
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type DeleteUsers ¶
type DeleteUsers struct {
Ids []int `json:"ids,omitempty" mapto:""`
}
func (*DeleteUsers) ToUserModel ¶
func (ra *DeleteUsers) ToUserModel(ctx context.Context) (*User, error)
ToUserModel Map DeleteUsers to User model
type DeleteUsersXgenDef ¶
type DeleteUsersXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type DirectiveRoot ¶
type DirectiveRoot struct {
Action func(ctx context.Context, obj interface{}, next graphql.Resolver, resource string, action XgenResourceActionType, route *string, schemaFieldName *string) (res interface{}, err error)
ActionField func(ctx context.Context, obj interface{}, next graphql.Resolver, label *string, description *string, mapTo []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, description *string, db *XgenResourceFieldDbConfigInput) (res interface{}, err error)
ListAction func(ctx context.Context, obj interface{}, next graphql.Resolver, resource string, action XgenResourceListActionType, route *string, pagination *bool, sort *XgenSortResourceConfigInput, schemaFieldName *string) (res interface{}, err error)
Resource func(ctx context.Context, obj interface{}, next graphql.Resolver, name string, route *string, primary *bool, db *XgenResourceDbConfigInput) (res interface{}, err error)
ToObjectType func(ctx context.Context, obj interface{}, next graphql.Resolver, typeArg string) (res interface{}, err error)
}
type Field ¶
type Field struct {
Label *string `json:"Label,omitempty"`
Description *string `json:"Description,omitempty"`
}
This directive is used to mark the object as a resource field
type ListAction ¶
type ListAction struct {
Resource string `json:"Resource"`
Action XgenResourceListActionType `json:"Action"`
Route *string `json:"Route,omitempty"`
Pagination *bool `json:"Pagination,omitempty"`
Sort *XgenSortResourceConfig `json:"Sort,omitempty"`
SchemaFieldName *string `json:"SchemaFieldName,omitempty"`
}
This directive is used to mark the object as a resource list action
type ListActionAnnotationSingle ¶
type ListActionAnnotationSingle struct {
Name *string `json:"name,omitempty"`
Value *ListAction `json:"value,omitempty"`
}
type ListUser ¶
type ListUserXgenDef ¶
type ListUserXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type MutationResolver ¶
type MutationResolver interface {
UserBatchDelete(ctx context.Context, input *DeleteUsers) ([]*User, error)
UserCreate(ctx context.Context, input *UserInput) (*User, error)
UserUpdate(ctx context.Context, input *UserInput) (*User, error)
CarCreate(ctx context.Context, input *CarInput) (*Car, error)
CarUpdate(ctx context.Context, input *CarInput) (*Car, error)
PhoneNumberCreate(ctx context.Context, input *PhoneNumberInput) (*Phone, error)
PhoneNumberUpdate(ctx context.Context, input *PhoneNumberInput) (*Phone, error)
}
type PhoneNumberBrowseInput ¶
type PhoneNumberBrowseInput struct {
ID *int `json:"id,omitempty" mapto:"Phone.ID"`
Number *int `json:"number,omitempty" mapto:"Phone.Number"`
}
func (*PhoneNumberBrowseInput) ToPhoneModel ¶
func (ra *PhoneNumberBrowseInput) ToPhoneModel(ctx context.Context) (*Phone, error)
ToPhoneModel Map PhoneNumberBrowseInput to Phone model
type PhoneNumberBrowseInputXgenDef ¶
type PhoneNumberBrowseInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type PhoneNumberInput ¶
type PhoneNumberInput struct {
ID *int `json:"id,omitempty" mapto:"Phone.ID"`
Number *string `json:"number,omitempty" mapto:"Phone.Number"`
User *UserInput `json:"user,omitempty" mapto:"Phone.User"`
}
func (*PhoneNumberInput) ToPhoneModel ¶
func (ra *PhoneNumberInput) ToPhoneModel(ctx context.Context) (*Phone, error)
ToPhoneModel Map PhoneNumberInput to Phone model
type PhoneNumberInputXgenDef ¶
type PhoneNumberInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type PhoneNumberSingleSortInput ¶
type PhoneNumberSingleSortInput struct {
Field PhoneNumberSortableField `json:"field"`
Direction *XgenSortDirection `json:"direction,omitempty"`
}
type PhoneNumberSortInput ¶
type PhoneNumberSortInput struct {
By []*PhoneNumberSingleSortInput `json:"by,omitempty"`
}
func (*PhoneNumberSortInput) SortSqlStrings ¶
func (io *PhoneNumberSortInput) SortSqlStrings() []string
type PhoneNumberSortableField ¶
type PhoneNumberSortableField string
const ( PhoneNumberSortableFieldID PhoneNumberSortableField = "id" PhoneNumberSortableFieldNumber PhoneNumberSortableField = "number" PhoneNumberSortableFieldUser PhoneNumberSortableField = "user" )
func (PhoneNumberSortableField) IsValid ¶
func (e PhoneNumberSortableField) IsValid() bool
func (PhoneNumberSortableField) MarshalGQL ¶
func (e PhoneNumberSortableField) MarshalGQL(w io.Writer)
func (PhoneNumberSortableField) String ¶
func (e PhoneNumberSortableField) String() string
func (*PhoneNumberSortableField) UnmarshalGQL ¶
func (e *PhoneNumberSortableField) UnmarshalGQL(v interface{}) error
type PhoneXgenDef ¶
type PhoneXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type QueryResolver ¶
type QueryResolver interface {
XgenIntrospection(ctx context.Context) (*XgenIntrospection, error)
CarBrowse(ctx context.Context, where *CarBrowseInput) ([]*Car, error)
UserBrowse(ctx context.Context, where *ListUser, pagination *XgenPaginationInput, sort *UserSortInput) ([]*User, error)
PhoneNumberBrowse(ctx context.Context, where *PhoneNumberBrowseInput) ([]*Phone, error)
}
type ResolverRoot ¶
type ResolverRoot interface {
Mutation() MutationResolver
Query() QueryResolver
}
type Resource ¶
type Resource struct {
Name string `json:"Name"`
Route *string `json:"Route,omitempty"`
Primary *bool `json:"Primary,omitempty"`
}
This directive is used to mark the object as a resource
type UserInput ¶
type UserInput struct {
ID *int `json:"id,omitempty" mapto:"User.ID"`
Name *string `json:"name,omitempty" mapto:"User.Name"`
Cars []*CarInput `json:"cars,omitempty" mapto:"User.Cars"`
Phones []*PhoneNumberInput `json:"phones,omitempty" mapto:"User.PhoneNumbers"`
}
type UserInputXgenDef ¶
type UserInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type UserSingleSortInput ¶
type UserSingleSortInput struct {
Field UserSortableField `json:"field"`
Direction *XgenSortDirection `json:"direction,omitempty"`
}
type UserSortInput ¶
type UserSortInput struct {
By []*UserSingleSortInput `json:"by,omitempty"`
}
func (*UserSortInput) SortSqlStrings ¶
func (io *UserSortInput) SortSqlStrings() []string
type UserSortableField ¶
type UserSortableField string
const ( UserSortableFieldID UserSortableField = "id" UserSortableFieldName UserSortableField = "name" UserSortableFieldCars UserSortableField = "cars" UserSortableFieldPhoneNumbers UserSortableField = "phoneNumbers" )
func (UserSortableField) IsValid ¶
func (e UserSortableField) IsValid() bool
func (UserSortableField) MarshalGQL ¶
func (e UserSortableField) MarshalGQL(w io.Writer)
func (UserSortableField) String ¶
func (e UserSortableField) String() string
func (*UserSortableField) UnmarshalGQL ¶
func (e *UserSortableField) UnmarshalGQL(v interface{}) error
type UserXgenDef ¶
type UserXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenAnnotationMap ¶
type XgenAnnotationMap struct {
ListAction []*ListActionAnnotationSingle `json:"ListAction"`
Resource []*ResourceAnnotationSingle `json:"Resource"`
Action []*ActionAnnotationSingle `json:"Action"`
}
type XgenCursorPaginationInputXgenDef ¶
type XgenCursorPaginationInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenFieldDef ¶
type XgenFieldDef struct {
Field *Field `json:"Field,omitempty"`
ActionField *ActionField `json:"ActionField,omitempty"`
}
type XgenIntrospection ¶
type XgenIntrospection struct {
Annotation *XgenAnnotationMap `json:"annotation,omitempty"`
Object *XgenObjectMap `json:"object,omitempty"`
Resource *XgenResourceMap `json:"resource,omitempty"`
}
func XgenIntrospectionValues ¶
func XgenIntrospectionValues() (*XgenIntrospection, error)
XgenIntrospection is the resolver for the XgenIntrospection field.
type XgenObjectDefinition ¶
type XgenObjectDefinition struct {
Action *Action `json:"Action,omitempty"`
Resource *Resource `json:"Resource,omitempty"`
ListAction *ListAction `json:"ListAction,omitempty"`
}
type XgenObjectField ¶
type XgenObjectField struct {
Name *string `json:"name,omitempty"`
Definition *XgenFieldDef `json:"definition,omitempty"`
}
type XgenObjectMap ¶
type XgenObjectMap struct {
XgenPaginationInput *XgenPaginationInputXgenDef `json:"XgenPaginationInput,omitempty"`
XgenResourceFieldDbConfigInput *XgenResourceFieldDbConfigInputXgenDef `json:"XgenResourceFieldDbConfigInput,omitempty"`
XgenResourceListActionType *XgenResourceListActionTypeXgenDef `json:"XgenResourceListActionType,omitempty"`
XgenResourceActionType *XgenResourceActionTypeXgenDef `json:"XgenResourceActionType,omitempty"`
CarInput *CarInputXgenDef `json:"CarInput,omitempty"`
ListUser *ListUserXgenDef `json:"ListUser,omitempty"`
Phone *PhoneXgenDef `json:"Phone,omitempty"`
DeleteUsers *DeleteUsersXgenDef `json:"DeleteUsers,omitempty"`
XgenSortInput *XgenSortInputXgenDef `json:"XgenSortInput,omitempty"`
Car *CarXgenDef `json:"Car,omitempty"`
XgenCursorPaginationInput *XgenCursorPaginationInputXgenDef `json:"XgenCursorPaginationInput,omitempty"`
XgenSortResourceConfig *XgenSortResourceConfigXgenDef `json:"XgenSortResourceConfig,omitempty"`
XgenResourceDbConfigInput *XgenResourceDbConfigInputXgenDef `json:"XgenResourceDbConfigInput,omitempty"`
PhoneNumberBrowseInput *PhoneNumberBrowseInputXgenDef `json:"PhoneNumberBrowseInput,omitempty"`
XgenSort *XgenSortXgenDef `json:"XgenSort,omitempty"`
UserInput *UserInputXgenDef `json:"UserInput,omitempty"`
User *UserXgenDef `json:"User,omitempty"`
CarBrowseInput *CarBrowseInputXgenDef `json:"CarBrowseInput,omitempty"`
XgenSortDirection *XgenSortDirectionXgenDef `json:"XgenSortDirection,omitempty"`
XgenSortResourceConfigInput *XgenSortResourceConfigInputXgenDef `json:"XgenSortResourceConfigInput,omitempty"`
PhoneNumberInput *PhoneNumberInputXgenDef `json:"PhoneNumberInput,omitempty"`
}
type XgenPaginationInput ¶
type XgenPaginationInputXgenDef ¶
type XgenPaginationInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenResourceAction ¶
type XgenResourceAction struct {
Resource string `json:"Resource"`
Action XgenResourceActionType `json:"Action"`
Route *string `json:"Route,omitempty"`
SchemaFieldName *string `json:"SchemaFieldName,omitempty"`
}
type XgenResourceActionType ¶
type XgenResourceActionType string
const ( XgenResourceActionTypeCreateMutation XgenResourceActionType = "CREATE_MUTATION" XgenResourceActionTypeReadQuery XgenResourceActionType = "READ_QUERY" XgenResourceActionTypeUpdateMutation XgenResourceActionType = "UPDATE_MUTATION" XgenResourceActionTypeDeleteMutation XgenResourceActionType = "DELETE_MUTATION" )
func (XgenResourceActionType) IsValid ¶
func (e XgenResourceActionType) IsValid() bool
func (XgenResourceActionType) MarshalGQL ¶
func (e XgenResourceActionType) MarshalGQL(w io.Writer)
func (XgenResourceActionType) String ¶
func (e XgenResourceActionType) String() string
func (*XgenResourceActionType) UnmarshalGQL ¶
func (e *XgenResourceActionType) UnmarshalGQL(v interface{}) error
type XgenResourceActionTypeXgenDef ¶
type XgenResourceActionTypeXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenResourceDbConfigInput ¶
type XgenResourceDbConfigInput struct {
Table *string `json:"Table,omitempty"`
}
type XgenResourceDbConfigInputXgenDef ¶
type XgenResourceDbConfigInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenResourceDefinition ¶
type XgenResourceDefinition struct {
ObjectName *string `json:"objectName,omitempty"`
Properties *XgenResourceProperty `json:"properties,omitempty"`
Actions []*XgenResourceAction `json:"actions"`
}
type XgenResourceFieldDbConfigInput ¶
type XgenResourceFieldDbConfigInput struct {
Column *string `json:"Column,omitempty"`
PrimaryKey *bool `json:"PrimaryKey,omitempty"`
AutoIncrement *bool `json:"AutoIncrement,omitempty"`
Unique *bool `json:"Unique,omitempty"`
NotNull *bool `json:"NotNull,omitempty"`
Index *bool `json:"Index,omitempty"`
UniqueIndex *bool `json:"UniqueIndex,omitempty"`
Size *int `json:"Size,omitempty"`
Precision *int `json:"Precision,omitempty"`
Type *string `json:"Type,omitempty"`
Scale *int `json:"Scale,omitempty"`
AutoIncrementIncrement *int `json:"AutoIncrementIncrement,omitempty"`
}
type XgenResourceFieldDbConfigInputXgenDef ¶
type XgenResourceFieldDbConfigInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenResourceListActionType ¶
type XgenResourceListActionType string
const ( XgenResourceListActionTypeBrowseQuery XgenResourceListActionType = "BROWSE_QUERY" XgenResourceListActionTypeBatchDeleteMutation XgenResourceListActionType = "BATCH_DELETE_MUTATION" )
func (XgenResourceListActionType) IsValid ¶
func (e XgenResourceListActionType) IsValid() bool
func (XgenResourceListActionType) MarshalGQL ¶
func (e XgenResourceListActionType) MarshalGQL(w io.Writer)
func (XgenResourceListActionType) String ¶
func (e XgenResourceListActionType) String() string
func (*XgenResourceListActionType) UnmarshalGQL ¶
func (e *XgenResourceListActionType) UnmarshalGQL(v interface{}) error
type XgenResourceListActionTypeXgenDef ¶
type XgenResourceListActionTypeXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenResourceMap ¶
type XgenResourceMap struct {
User *XgenResourceDefinition `json:"user,omitempty"`
PhoneNumber *XgenResourceDefinition `json:"phone_number,omitempty"`
Car *XgenResourceDefinition `json:"car,omitempty"`
}
type XgenResourceProperty ¶
type XgenSort ¶
type XgenSort struct {
By string `json:"by"`
Direction *XgenSortDirection `json:"direction,omitempty"`
}
type XgenSortDirection ¶
type XgenSortDirection string
const ( XgenSortDirectionAsc XgenSortDirection = "ASC" XgenSortDirectionDesc XgenSortDirection = "DESC" )
func (XgenSortDirection) IsValid ¶
func (e XgenSortDirection) IsValid() bool
func (XgenSortDirection) MarshalGQL ¶
func (e XgenSortDirection) MarshalGQL(w io.Writer)
func (XgenSortDirection) String ¶
func (e XgenSortDirection) String() string
func (*XgenSortDirection) UnmarshalGQL ¶
func (e *XgenSortDirection) UnmarshalGQL(v interface{}) error
type XgenSortDirectionXgenDef ¶
type XgenSortDirectionXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenSortInput ¶
type XgenSortInput struct {
By string `json:"by"`
Direction *XgenSortDirection `json:"direction,omitempty"`
}
type XgenSortInputXgenDef ¶
type XgenSortInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenSortResourceConfig ¶
type XgenSortResourceConfigInput ¶
type XgenSortResourceConfigInput struct {
// If set to true, the sort will be disabled.
Disabled *bool `json:"Disabled,omitempty"`
Default []*XgenSortInput `json:"Default,omitempty"`
}
type XgenSortResourceConfigInputXgenDef ¶
type XgenSortResourceConfigInputXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenSortResourceConfigXgenDef ¶
type XgenSortResourceConfigXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
type XgenSortXgenDef ¶
type XgenSortXgenDef struct {
Object *XgenObjectDefinition `json:"object,omitempty"`
Field []*XgenObjectField `json:"field"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.