Documentation ¶
Index ¶
- Constants
- Variables
- func AddMutationEvent(ctx context.Context, e events.Event)
- func ApplyChanges(changes map[string]interface{}, to interface{}) error
- func AutoMigrate(db *gorm.DB) error
- func DeleteAllFilesHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
- func EnrichContextWithMutations(ctx context.Context, r *GeneratedResolver) context.Context
- func FinishMutationContext(ctx context.Context, r *GeneratedResolver) (err error)
- func GetHTTPServeMux(r ResolverRoot, db *DB, migrations []*gormigrate.Migration) *http.ServeMux
- func GetItem(ctx context.Context, db *gorm.DB, out interface{}, id *string) error
- func GetItemForRelation(ctx context.Context, db *gorm.DB, obj interface{}, relation string, ...) error
- func GetLoaders(db *DB) map[string]*dataloader.Loader
- func GetPrincipalIDFromContext(ctx context.Context) *string
- func Marshal_Any(v interface{}) graphql.Marshaler
- func Migrate(db *gorm.DB, options *gormigrate.Options, migrations []*gormigrate.Migration) error
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func RollbackMutationContext(ctx context.Context, r *GeneratedResolver) error
- func TableName(name string) string
- func Unmarshal_Any(v interface{}) (interface{}, error)
- type ComplexityRoot
- type Config
- type DB
- type DirectiveRoot
- type EntityFilter
- type EntityFilterQuery
- type EntityResultType
- type EntitySort
- type EventController
- type File
- func CreateFileHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *File, err error)
- func DeleteFileHandler(ctx context.Context, r *GeneratedResolver, id string) (item *File, err error)
- func QueryFileHandler(ctx context.Context, r *GeneratedResolver, opts QueryFileHandlerOptions) (*File, error)
- func UpdateFileHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *File, err error)
- type FileChanges
- type FileFilterType
- func (f *FileFilterType) AndWith(f2 ...*FileFilterType) *FileFilterType
- func (f *FileFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error
- func (f *FileFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error
- func (f *FileFilterType) HavingContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- func (f *FileFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool
- func (f *FileFilterType) OrWith(f2 ...*FileFilterType) *FileFilterType
- func (f *FileFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- type FileQueryFilter
- type FileResultType
- type FileResultTypeResolver
- type FileSortType
- type GeneratedFileResultTypeResolver
- type GeneratedMutationResolver
- func (r *GeneratedMutationResolver) CreateFile(ctx context.Context, input map[string]interface{}) (item *File, err error)
- func (r *GeneratedMutationResolver) DeleteAllFiles(ctx context.Context) (bool, error)
- func (r *GeneratedMutationResolver) DeleteFile(ctx context.Context, id string) (item *File, err error)
- func (r *GeneratedMutationResolver) UpdateFile(ctx context.Context, id string, input map[string]interface{}) (item *File, err error)
- type GeneratedQueryResolver
- type GeneratedResolver
- type GetItemsOptions
- type JWTClaims
- type MutationEvents
- type MutationResolver
- type ObjectSortType
- type QueryFileHandlerOptions
- type QueryFilesHandlerOptions
- type QueryResolver
- type ResolutionHandlers
- type ResolverRoot
- type SortInfo
Constants ¶
View Source
const ( KeyPrincipalID key = iota KeyLoaders key = iota KeyExecutableSchema key = iota KeyJWTClaims key = iota KeyMutationTransaction key = iota KeyMutationEvents key = iota SchemaSDL string = `` /* 6888-byte string literal not displayed */ )
View Source
const (
ORMChangeEvent = "com.graphql.orm.change"
)
Variables ¶
View Source
var AllObjectSortType = []ObjectSortType{ ObjectSortTypeAsc, ObjectSortTypeDesc, }
Functions ¶
func ApplyChanges ¶
used to convert map[string]interface{} to EntityChanges struct
func AutoMigrate ¶
func DeleteAllFilesHandler ¶
func DeleteAllFilesHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
func EnrichContextWithMutations ¶
func EnrichContextWithMutations(ctx context.Context, r *GeneratedResolver) context.Context
func FinishMutationContext ¶
func FinishMutationContext(ctx context.Context, r *GeneratedResolver) (err error)
func GetHTTPServeMux ¶
func GetHTTPServeMux(r ResolverRoot, db *DB, migrations []*gormigrate.Migration) *http.ServeMux
func GetItemForRelation ¶
func GetLoaders ¶
func GetLoaders(db *DB) map[string]*dataloader.Loader
func Marshal_Any ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func RollbackMutationContext ¶
func RollbackMutationContext(ctx context.Context, r *GeneratedResolver) error
func Unmarshal_Any ¶
func Unmarshal_Any(v interface{}) (interface{}, error)
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { File struct { ContentType func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Reference func(childComplexity int) int Size func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } FileResultType struct { Count func(childComplexity int) int Items func(childComplexity int) int } Mutation struct { CreateFile func(childComplexity int, input map[string]interface{}) int DeleteAllFiles func(childComplexity int) int DeleteFile func(childComplexity int, id string) int UpdateFile func(childComplexity int, id string, input map[string]interface{}) int } Query struct { File func(childComplexity int, id *string, q *string, filter *FileFilterType) int Files func(childComplexity int, offset *int, limit *int, q *string, sort []*FileSortType, filter *FileFilterType) int // contains filtered or unexported fields } // contains filtered or unexported fields }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB ...
func NewDBFromEnvVars ¶
func NewDBFromEnvVars() *DB
NewDBFromEnvVars Create database client using DATABASE_URL environment variable
func NewDBWithString ¶
NewDBWithString creates database instance with database URL string
type DirectiveRoot ¶
type DirectiveRoot struct { }
type EntityFilter ¶
type EntityFilterQuery ¶
type EntityResultType ¶
type EntityResultType struct { Offset *int Limit *int Query EntityFilterQuery Sort []EntitySort Filter EntityFilter Fields []*ast.Field SelectionSet *ast.SelectionSet }
func (*EntityResultType) GetCount ¶
func (r *EntityResultType) GetCount(ctx context.Context, db *gorm.DB, opts GetItemsOptions, out interface{}) (count int, err error)
GetCount ...
func (*EntityResultType) GetItems ¶
func (r *EntityResultType) GetItems(ctx context.Context, db *gorm.DB, opts GetItemsOptions, out interface{}) error
GetResultTypeItems ...
func (*EntityResultType) GetSortStrings ¶
func (r *EntityResultType) GetSortStrings() []string
type EntitySort ¶
type EventController ¶
type EventController struct {
// contains filtered or unexported fields
}
func NewEventController ¶
func NewEventController() (ec EventController, err error)
type File ¶
type File struct { ID string `json:"id" gorm:"column:id;primary_key"` Name *string `json:"name" gorm:"column:name"` Size *int `json:"size" gorm:"column:size"` ContentType *string `json:"contentType" gorm:"column:contentType"` Reference *string `json:"reference" gorm:"column:reference;index:reference"` UpdatedAt *time.Time `json:"updatedAt" gorm:"column:updatedAt"` CreatedAt time.Time `json:"createdAt" gorm:"column:createdAt"` UpdatedBy *string `json:"updatedBy" gorm:"column:updatedBy"` CreatedBy *string `json:"createdBy" gorm:"column:createdBy"` }
func CreateFileHandler ¶
func DeleteFileHandler ¶
func QueryFileHandler ¶
func QueryFileHandler(ctx context.Context, r *GeneratedResolver, opts QueryFileHandlerOptions) (*File, error)
func UpdateFileHandler ¶
type FileChanges ¶
type FileFilterType ¶
type FileFilterType struct { And []*FileFilterType `json:"AND"` Or []*FileFilterType `json:"OR"` ID *string `json:"id"` IDMin *string `json:"idMin"` IDMax *string `json:"idMax"` IDNe *string `json:"id_ne"` IDMinNe *string `json:"idMin_ne"` IDMaxNe *string `json:"idMax_ne"` IDGt *string `json:"id_gt"` IDMinGt *string `json:"idMin_gt"` IDMaxGt *string `json:"idMax_gt"` IDLt *string `json:"id_lt"` IDMinLt *string `json:"idMin_lt"` IDMaxLt *string `json:"idMax_lt"` IDGte *string `json:"id_gte"` IDMinGte *string `json:"idMin_gte"` IDMaxGte *string `json:"idMax_gte"` IDLte *string `json:"id_lte"` IDMinLte *string `json:"idMin_lte"` IDMaxLte *string `json:"idMax_lte"` IDIn []string `json:"id_in"` IDMinIn []string `json:"idMin_in"` IDMaxIn []string `json:"idMax_in"` IDNull *bool `json:"id_null"` Name *string `json:"name"` NameMin *string `json:"nameMin"` NameMax *string `json:"nameMax"` NameNe *string `json:"name_ne"` NameMinNe *string `json:"nameMin_ne"` NameMaxNe *string `json:"nameMax_ne"` NameGt *string `json:"name_gt"` NameMinGt *string `json:"nameMin_gt"` NameMaxGt *string `json:"nameMax_gt"` NameLt *string `json:"name_lt"` NameMinLt *string `json:"nameMin_lt"` NameMaxLt *string `json:"nameMax_lt"` NameGte *string `json:"name_gte"` NameMinGte *string `json:"nameMin_gte"` NameMaxGte *string `json:"nameMax_gte"` NameLte *string `json:"name_lte"` NameMinLte *string `json:"nameMin_lte"` NameMaxLte *string `json:"nameMax_lte"` NameIn []string `json:"name_in"` NameMinIn []string `json:"nameMin_in"` NameMaxIn []string `json:"nameMax_in"` NameLike *string `json:"name_like"` NameMinLike *string `json:"nameMin_like"` NameMaxLike *string `json:"nameMax_like"` NamePrefix *string `json:"name_prefix"` NameMinPrefix *string `json:"nameMin_prefix"` NameMaxPrefix *string `json:"nameMax_prefix"` NameSuffix *string `json:"name_suffix"` NameMinSuffix *string `json:"nameMin_suffix"` NameMaxSuffix *string `json:"nameMax_suffix"` NameNull *bool `json:"name_null"` Size *int `json:"size"` SizeMin *int `json:"sizeMin"` SizeMax *int `json:"sizeMax"` SizeAvg *int `json:"sizeAvg"` SizeNe *int `json:"size_ne"` SizeMinNe *int `json:"sizeMin_ne"` SizeMaxNe *int `json:"sizeMax_ne"` SizeAvgNe *int `json:"sizeAvg_ne"` SizeGt *int `json:"size_gt"` SizeMinGt *int `json:"sizeMin_gt"` SizeMaxGt *int `json:"sizeMax_gt"` SizeAvgGt *int `json:"sizeAvg_gt"` SizeLt *int `json:"size_lt"` SizeMinLt *int `json:"sizeMin_lt"` SizeMaxLt *int `json:"sizeMax_lt"` SizeAvgLt *int `json:"sizeAvg_lt"` SizeGte *int `json:"size_gte"` SizeMinGte *int `json:"sizeMin_gte"` SizeMaxGte *int `json:"sizeMax_gte"` SizeAvgGte *int `json:"sizeAvg_gte"` SizeLte *int `json:"size_lte"` SizeMinLte *int `json:"sizeMin_lte"` SizeMaxLte *int `json:"sizeMax_lte"` SizeAvgLte *int `json:"sizeAvg_lte"` SizeIn []int `json:"size_in"` SizeMinIn []int `json:"sizeMin_in"` SizeMaxIn []int `json:"sizeMax_in"` SizeAvgIn []int `json:"sizeAvg_in"` SizeNull *bool `json:"size_null"` ContentType *string `json:"contentType"` ContentTypeMin *string `json:"contentTypeMin"` ContentTypeMax *string `json:"contentTypeMax"` ContentTypeNe *string `json:"contentType_ne"` ContentTypeMinNe *string `json:"contentTypeMin_ne"` ContentTypeMaxNe *string `json:"contentTypeMax_ne"` ContentTypeGt *string `json:"contentType_gt"` ContentTypeMinGt *string `json:"contentTypeMin_gt"` ContentTypeMaxGt *string `json:"contentTypeMax_gt"` ContentTypeLt *string `json:"contentType_lt"` ContentTypeMinLt *string `json:"contentTypeMin_lt"` ContentTypeMaxLt *string `json:"contentTypeMax_lt"` ContentTypeGte *string `json:"contentType_gte"` ContentTypeMinGte *string `json:"contentTypeMin_gte"` ContentTypeMaxGte *string `json:"contentTypeMax_gte"` ContentTypeLte *string `json:"contentType_lte"` ContentTypeMinLte *string `json:"contentTypeMin_lte"` ContentTypeMaxLte *string `json:"contentTypeMax_lte"` ContentTypeIn []string `json:"contentType_in"` ContentTypeMinIn []string `json:"contentTypeMin_in"` ContentTypeMaxIn []string `json:"contentTypeMax_in"` ContentTypeLike *string `json:"contentType_like"` ContentTypeMinLike *string `json:"contentTypeMin_like"` ContentTypeMaxLike *string `json:"contentTypeMax_like"` ContentTypePrefix *string `json:"contentType_prefix"` ContentTypeMinPrefix *string `json:"contentTypeMin_prefix"` ContentTypeMaxPrefix *string `json:"contentTypeMax_prefix"` ContentTypeSuffix *string `json:"contentType_suffix"` ContentTypeMinSuffix *string `json:"contentTypeMin_suffix"` ContentTypeMaxSuffix *string `json:"contentTypeMax_suffix"` ContentTypeNull *bool `json:"contentType_null"` Reference *string `json:"reference"` ReferenceMin *string `json:"referenceMin"` ReferenceMax *string `json:"referenceMax"` ReferenceNe *string `json:"reference_ne"` ReferenceMinNe *string `json:"referenceMin_ne"` ReferenceMaxNe *string `json:"referenceMax_ne"` ReferenceGt *string `json:"reference_gt"` ReferenceMinGt *string `json:"referenceMin_gt"` ReferenceMaxGt *string `json:"referenceMax_gt"` ReferenceLt *string `json:"reference_lt"` ReferenceMinLt *string `json:"referenceMin_lt"` ReferenceMaxLt *string `json:"referenceMax_lt"` ReferenceGte *string `json:"reference_gte"` ReferenceMinGte *string `json:"referenceMin_gte"` ReferenceMaxGte *string `json:"referenceMax_gte"` ReferenceLte *string `json:"reference_lte"` ReferenceMinLte *string `json:"referenceMin_lte"` ReferenceMaxLte *string `json:"referenceMax_lte"` ReferenceIn []string `json:"reference_in"` ReferenceMinIn []string `json:"referenceMin_in"` ReferenceMaxIn []string `json:"referenceMax_in"` ReferenceLike *string `json:"reference_like"` ReferenceMinLike *string `json:"referenceMin_like"` ReferenceMaxLike *string `json:"referenceMax_like"` ReferencePrefix *string `json:"reference_prefix"` ReferenceMinPrefix *string `json:"referenceMin_prefix"` ReferenceMaxPrefix *string `json:"referenceMax_prefix"` ReferenceSuffix *string `json:"reference_suffix"` ReferenceMinSuffix *string `json:"referenceMin_suffix"` ReferenceMaxSuffix *string `json:"referenceMax_suffix"` ReferenceNull *bool `json:"reference_null"` UpdatedAt *time.Time `json:"updatedAt"` UpdatedAtMin *time.Time `json:"updatedAtMin"` UpdatedAtMax *time.Time `json:"updatedAtMax"` UpdatedAtNe *time.Time `json:"updatedAt_ne"` UpdatedAtMinNe *time.Time `json:"updatedAtMin_ne"` UpdatedAtMaxNe *time.Time `json:"updatedAtMax_ne"` UpdatedAtGt *time.Time `json:"updatedAt_gt"` UpdatedAtMinGt *time.Time `json:"updatedAtMin_gt"` UpdatedAtMaxGt *time.Time `json:"updatedAtMax_gt"` UpdatedAtLt *time.Time `json:"updatedAt_lt"` UpdatedAtMinLt *time.Time `json:"updatedAtMin_lt"` UpdatedAtMaxLt *time.Time `json:"updatedAtMax_lt"` UpdatedAtGte *time.Time `json:"updatedAt_gte"` UpdatedAtMinGte *time.Time `json:"updatedAtMin_gte"` UpdatedAtMaxGte *time.Time `json:"updatedAtMax_gte"` UpdatedAtLte *time.Time `json:"updatedAt_lte"` UpdatedAtMinLte *time.Time `json:"updatedAtMin_lte"` UpdatedAtMaxLte *time.Time `json:"updatedAtMax_lte"` UpdatedAtIn []*time.Time `json:"updatedAt_in"` UpdatedAtMinIn []*time.Time `json:"updatedAtMin_in"` UpdatedAtMaxIn []*time.Time `json:"updatedAtMax_in"` UpdatedAtNull *bool `json:"updatedAt_null"` CreatedAt *time.Time `json:"createdAt"` CreatedAtMin *time.Time `json:"createdAtMin"` CreatedAtMax *time.Time `json:"createdAtMax"` CreatedAtNe *time.Time `json:"createdAt_ne"` CreatedAtMinNe *time.Time `json:"createdAtMin_ne"` CreatedAtMaxNe *time.Time `json:"createdAtMax_ne"` CreatedAtGt *time.Time `json:"createdAt_gt"` CreatedAtMinGt *time.Time `json:"createdAtMin_gt"` CreatedAtMaxGt *time.Time `json:"createdAtMax_gt"` CreatedAtLt *time.Time `json:"createdAt_lt"` CreatedAtMinLt *time.Time `json:"createdAtMin_lt"` CreatedAtMaxLt *time.Time `json:"createdAtMax_lt"` CreatedAtGte *time.Time `json:"createdAt_gte"` CreatedAtMinGte *time.Time `json:"createdAtMin_gte"` CreatedAtMaxGte *time.Time `json:"createdAtMax_gte"` CreatedAtLte *time.Time `json:"createdAt_lte"` CreatedAtMinLte *time.Time `json:"createdAtMin_lte"` CreatedAtMaxLte *time.Time `json:"createdAtMax_lte"` CreatedAtIn []*time.Time `json:"createdAt_in"` CreatedAtMinIn []*time.Time `json:"createdAtMin_in"` CreatedAtMaxIn []*time.Time `json:"createdAtMax_in"` CreatedAtNull *bool `json:"createdAt_null"` UpdatedBy *string `json:"updatedBy"` UpdatedByMin *string `json:"updatedByMin"` UpdatedByMax *string `json:"updatedByMax"` UpdatedByNe *string `json:"updatedBy_ne"` UpdatedByMinNe *string `json:"updatedByMin_ne"` UpdatedByMaxNe *string `json:"updatedByMax_ne"` UpdatedByGt *string `json:"updatedBy_gt"` UpdatedByMinGt *string `json:"updatedByMin_gt"` UpdatedByMaxGt *string `json:"updatedByMax_gt"` UpdatedByLt *string `json:"updatedBy_lt"` UpdatedByMinLt *string `json:"updatedByMin_lt"` UpdatedByMaxLt *string `json:"updatedByMax_lt"` UpdatedByGte *string `json:"updatedBy_gte"` UpdatedByMinGte *string `json:"updatedByMin_gte"` UpdatedByMaxGte *string `json:"updatedByMax_gte"` UpdatedByLte *string `json:"updatedBy_lte"` UpdatedByMinLte *string `json:"updatedByMin_lte"` UpdatedByMaxLte *string `json:"updatedByMax_lte"` UpdatedByIn []string `json:"updatedBy_in"` UpdatedByMinIn []string `json:"updatedByMin_in"` UpdatedByMaxIn []string `json:"updatedByMax_in"` UpdatedByNull *bool `json:"updatedBy_null"` CreatedBy *string `json:"createdBy"` CreatedByMin *string `json:"createdByMin"` CreatedByMax *string `json:"createdByMax"` CreatedByNe *string `json:"createdBy_ne"` CreatedByMinNe *string `json:"createdByMin_ne"` CreatedByMaxNe *string `json:"createdByMax_ne"` CreatedByGt *string `json:"createdBy_gt"` CreatedByMinGt *string `json:"createdByMin_gt"` CreatedByMaxGt *string `json:"createdByMax_gt"` CreatedByLt *string `json:"createdBy_lt"` CreatedByMinLt *string `json:"createdByMin_lt"` CreatedByMaxLt *string `json:"createdByMax_lt"` CreatedByGte *string `json:"createdBy_gte"` CreatedByMinGte *string `json:"createdByMin_gte"` CreatedByMaxGte *string `json:"createdByMax_gte"` CreatedByLte *string `json:"createdBy_lte"` CreatedByMinLte *string `json:"createdByMin_lte"` CreatedByMaxLte *string `json:"createdByMax_lte"` CreatedByIn []string `json:"createdBy_in"` CreatedByMinIn []string `json:"createdByMin_in"` CreatedByMaxIn []string `json:"createdByMax_in"` CreatedByNull *bool `json:"createdBy_null"` }
func (*FileFilterType) AndWith ¶
func (f *FileFilterType) AndWith(f2 ...*FileFilterType) *FileFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*FileFilterType) ApplyWithAlias ¶
func (*FileFilterType) HavingContent ¶
func (f *FileFilterType) HavingContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
func (*FileFilterType) OrWith ¶
func (f *FileFilterType) OrWith(f2 ...*FileFilterType) *FileFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*FileFilterType) WhereContent ¶
func (f *FileFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
type FileQueryFilter ¶
type FileQueryFilter struct {
Query *string
}
type FileResultType ¶
type FileResultType struct {
EntityResultType
}
func QueryFilesHandler ¶
func QueryFilesHandler(ctx context.Context, r *GeneratedResolver, opts QueryFilesHandlerOptions) (*FileResultType, error)
type FileResultTypeResolver ¶
type FileResultTypeResolver interface { Items(ctx context.Context, obj *FileResultType) ([]*File, error) Count(ctx context.Context, obj *FileResultType) (int, error) }
type FileSortType ¶
type FileSortType struct { ID *ObjectSortType `json:"id"` IDMin *ObjectSortType `json:"idMin"` IDMax *ObjectSortType `json:"idMax"` Name *ObjectSortType `json:"name"` NameMin *ObjectSortType `json:"nameMin"` NameMax *ObjectSortType `json:"nameMax"` Size *ObjectSortType `json:"size"` SizeMin *ObjectSortType `json:"sizeMin"` SizeMax *ObjectSortType `json:"sizeMax"` SizeAvg *ObjectSortType `json:"sizeAvg"` ContentType *ObjectSortType `json:"contentType"` ContentTypeMin *ObjectSortType `json:"contentTypeMin"` ContentTypeMax *ObjectSortType `json:"contentTypeMax"` Reference *ObjectSortType `json:"reference"` ReferenceMin *ObjectSortType `json:"referenceMin"` ReferenceMax *ObjectSortType `json:"referenceMax"` UpdatedAt *ObjectSortType `json:"updatedAt"` UpdatedAtMin *ObjectSortType `json:"updatedAtMin"` UpdatedAtMax *ObjectSortType `json:"updatedAtMax"` CreatedAt *ObjectSortType `json:"createdAt"` CreatedAtMin *ObjectSortType `json:"createdAtMin"` CreatedAtMax *ObjectSortType `json:"createdAtMax"` UpdatedBy *ObjectSortType `json:"updatedBy"` UpdatedByMin *ObjectSortType `json:"updatedByMin"` UpdatedByMax *ObjectSortType `json:"updatedByMax"` CreatedBy *ObjectSortType `json:"createdBy"` CreatedByMin *ObjectSortType `json:"createdByMin"` CreatedByMax *ObjectSortType `json:"createdByMax"` }
type GeneratedFileResultTypeResolver ¶
type GeneratedFileResultTypeResolver struct{ *GeneratedResolver }
func (*GeneratedFileResultTypeResolver) Count ¶
func (r *GeneratedFileResultTypeResolver) Count(ctx context.Context, obj *FileResultType) (count int, err error)
func (*GeneratedFileResultTypeResolver) Items ¶
func (r *GeneratedFileResultTypeResolver) Items(ctx context.Context, obj *FileResultType) (items []*File, err error)
type GeneratedMutationResolver ¶
type GeneratedMutationResolver struct{ *GeneratedResolver }
func (*GeneratedMutationResolver) CreateFile ¶
func (*GeneratedMutationResolver) DeleteAllFiles ¶
func (r *GeneratedMutationResolver) DeleteAllFiles(ctx context.Context) (bool, error)
func (*GeneratedMutationResolver) DeleteFile ¶
func (*GeneratedMutationResolver) UpdateFile ¶
type GeneratedQueryResolver ¶
type GeneratedQueryResolver struct{ *GeneratedResolver }
func (*GeneratedQueryResolver) File ¶
func (r *GeneratedQueryResolver) File(ctx context.Context, id *string, q *string, filter *FileFilterType) (*File, error)
func (*GeneratedQueryResolver) Files ¶
func (r *GeneratedQueryResolver) Files(ctx context.Context, offset *int, limit *int, q *string, sort []*FileSortType, filter *FileFilterType) (*FileResultType, error)
type GeneratedResolver ¶
type GeneratedResolver struct { Handlers ResolutionHandlers DB *DB EventController *EventController }
type GetItemsOptions ¶
type JWTClaims ¶
type JWTClaims struct { jwtgo.StandardClaims Scope *string }
func GetJWTClaimsFromContext ¶
type MutationEvents ¶
func GetMutationEventStore ¶
func GetMutationEventStore(ctx context.Context) *MutationEvents
type MutationResolver ¶
type MutationResolver interface { CreateFile(ctx context.Context, input map[string]interface{}) (*File, error) UpdateFile(ctx context.Context, id string, input map[string]interface{}) (*File, error) DeleteFile(ctx context.Context, id string) (*File, error) DeleteAllFiles(ctx context.Context) (bool, error) }
type ObjectSortType ¶
type ObjectSortType string
const ( ObjectSortTypeAsc ObjectSortType = "ASC" ObjectSortTypeDesc ObjectSortType = "DESC" )
func (ObjectSortType) IsValid ¶
func (e ObjectSortType) IsValid() bool
func (ObjectSortType) MarshalGQL ¶
func (e ObjectSortType) MarshalGQL(w io.Writer)
func (ObjectSortType) String ¶
func (e ObjectSortType) String() string
func (*ObjectSortType) UnmarshalGQL ¶
func (e *ObjectSortType) UnmarshalGQL(v interface{}) error
type QueryFileHandlerOptions ¶
type QueryFileHandlerOptions struct { ID *string Q *string Filter *FileFilterType }
type QueryFilesHandlerOptions ¶
type QueryFilesHandlerOptions struct { Offset *int Limit *int Q *string Sort []*FileSortType Filter *FileFilterType }
type QueryResolver ¶
type QueryResolver interface { File(ctx context.Context, id *string, q *string, filter *FileFilterType) (*File, error) Files(ctx context.Context, offset *int, limit *int, q *string, sort []*FileSortType, filter *FileFilterType) (*FileResultType, error) // contains filtered or unexported methods }
type ResolutionHandlers ¶
type ResolutionHandlers struct { OnEvent func(ctx context.Context, r *GeneratedResolver, e *events.Event) error CreateFile func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *File, err error) UpdateFile func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *File, err error) DeleteFile func(ctx context.Context, r *GeneratedResolver, id string) (item *File, err error) DeleteAllFiles func(ctx context.Context, r *GeneratedResolver) (bool, error) QueryFile func(ctx context.Context, r *GeneratedResolver, opts QueryFileHandlerOptions) (*File, error) QueryFiles func(ctx context.Context, r *GeneratedResolver, opts QueryFilesHandlerOptions) (*FileResultType, error) }
func DefaultResolutionHandlers ¶
func DefaultResolutionHandlers() ResolutionHandlers
type ResolverRoot ¶
type ResolverRoot interface { FileResultType() FileResultTypeResolver Mutation() MutationResolver Query() QueryResolver }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.