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) (err error)
- func DeleteAllExportsHandler(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 GetHTTPRequestFromContext(ctx context.Context) *http.Request
- 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
- func (r *EntityResultType) GetAggregations(ctx context.Context, db *gorm.DB, opts GetAggregationsOptions, ...) error
- func (r *EntityResultType) GetCount(ctx context.Context, db *gorm.DB, opts GetItemsOptions, out interface{}) (count int, err error)
- func (r *EntityResultType) GetItems(ctx context.Context, db *gorm.DB, opts GetItemsOptions, out interface{}) error
- func (r *EntityResultType) GetSortStrings() []string
- type EntitySort
- type EventController
- type Export
- func CreateExportHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Export, err error)
- func DeleteExportHandler(ctx context.Context, r *GeneratedResolver, id string) (item *Export, err error)
- func QueryExportHandler(ctx context.Context, r *GeneratedResolver, opts QueryExportHandlerOptions) (*Export, error)
- func UpdateExportHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *Export, err error)
- type ExportChanges
- type ExportFilterType
- func (f *ExportFilterType) AndWith(f2 ...*ExportFilterType) *ExportFilterType
- func (f *ExportFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error
- func (f *ExportFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error
- func (f *ExportFilterType) HavingContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- func (f *ExportFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool
- func (f *ExportFilterType) OrWith(f2 ...*ExportFilterType) *ExportFilterType
- func (f *ExportFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- type ExportQueryFilter
- type ExportResolver
- type ExportResultAggregations
- type ExportResultType
- type ExportResultTypeResolver
- type ExportSortType
- type ExportState
- type File
- type GeneratedExportResolver
- type GeneratedExportResultTypeResolver
- func (r *GeneratedExportResultTypeResolver) Aggregations(ctx context.Context, obj *ExportResultType) (res *ExportResultAggregations, err error)
- func (r *GeneratedExportResultTypeResolver) Count(ctx context.Context, obj *ExportResultType) (count int, err error)
- func (r *GeneratedExportResultTypeResolver) Items(ctx context.Context, obj *ExportResultType) (items []*Export, err error)
- type GeneratedFileResolver
- type GeneratedMutationResolver
- func (r *GeneratedMutationResolver) CreateExport(ctx context.Context, input map[string]interface{}) (item *Export, err error)
- func (r *GeneratedMutationResolver) DeleteAllExports(ctx context.Context) (bool, error)
- func (r *GeneratedMutationResolver) DeleteExport(ctx context.Context, id string) (item *Export, err error)
- func (r *GeneratedMutationResolver) UpdateExport(ctx context.Context, id string, input map[string]interface{}) (item *Export, err error)
- type GeneratedQueryResolver
- type GeneratedResolver
- func (r *GeneratedResolver) ExportsCount(ctx context.Context, opts QueryExportsHandlerOptions) (count int, err error)
- func (r *GeneratedResolver) ExportsItems(ctx context.Context, opts QueryExportsHandlerOptions) (res []*Export, err error)
- func (r *GeneratedResolver) GetDB(ctx context.Context) *gorm.DB
- type GetAggregationsAggregationField
- type GetAggregationsOptions
- type GetItemsOptions
- type JWTClaims
- type MutationEvents
- type MutationResolver
- type ObjectSortType
- type QueryExportHandlerOptions
- type QueryExportsHandlerOptions
- type QueryResolver
- type ResolutionHandlers
- type ResolverRoot
- type SortInfo
Constants ¶
const ( KeyPrincipalID key = iota KeyLoaders key = iota KeyExecutableSchema key = iota KeyJWTClaims key = iota KeyHTTPRequest key = iota KeyMutationTransaction key = iota KeyMutationEvents key = iota SchemaSDL string = `` /* 10549-byte string literal not displayed */ )
const (
// ORMChangeEvent ...
ORMChangeEvent = "com.graphql.orm.change"
)
Variables ¶
var AllExportState = []ExportState{ ExportStateProcessing, ExportStateCompleted, ExportStateError, }
var AllObjectSortType = []ObjectSortType{ ObjectSortTypeAsc, ObjectSortTypeDesc, }
Functions ¶
func AddMutationEvent ¶
AddMutationEvent ...
func ApplyChanges ¶
ApplyChanges used to convert map[string]interface{} to EntityChanges struct
func DeleteAllExportsHandler ¶
func DeleteAllExportsHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
DeleteAllExportsHandler ...
func EnrichContextWithMutations ¶
func EnrichContextWithMutations(ctx context.Context, r *GeneratedResolver) context.Context
EnrichContextWithMutations ...
func FinishMutationContext ¶
func FinishMutationContext(ctx context.Context, r *GeneratedResolver) (err error)
FinishMutationContext ...
func GetHTTPRequestFromContext ¶ added in v0.1.5
GetHTTPRequestFromContext ...
func GetHTTPServeMux ¶
func GetHTTPServeMux(r ResolverRoot, db *DB, migrations []*gormigrate.Migration) *http.ServeMux
GetHTTPServeMux ...
func GetItemForRelation ¶
func GetItemForRelation(ctx context.Context, db *gorm.DB, obj interface{}, relation string, out interface{}) error
GetItemForRelation ...
func GetPrincipalIDFromContext ¶
GetPrincipalIDFromContext ...
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func RollbackMutationContext ¶ added in v0.1.5
func RollbackMutationContext(ctx context.Context, r *GeneratedResolver) error
RollbackMutationContext ...
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Export struct { CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int ErrorDescription func(childComplexity int) int File func(childComplexity int) int FileID func(childComplexity int) int ID func(childComplexity int) int Metadata func(childComplexity int) int Progress func(childComplexity int) int State func(childComplexity int) int Type func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } ExportResultAggregations struct { ErrorDescriptionMax func(childComplexity int) int ErrorDescriptionMin func(childComplexity int) int FileIDMax func(childComplexity int) int FileIDMin func(childComplexity int) int MetadataMax func(childComplexity int) int MetadataMin func(childComplexity int) int ProgressAvg func(childComplexity int) int ProgressMax func(childComplexity int) int ProgressMin func(childComplexity int) int ProgressSum func(childComplexity int) int TypeMax func(childComplexity int) int TypeMin func(childComplexity int) int } ExportResultType struct { Aggregations func(childComplexity int) int Count func(childComplexity int) int Items func(childComplexity int) int } File struct { ID func(childComplexity int) int } Mutation struct { CreateExport func(childComplexity int, input map[string]interface{}) int DeleteAllExports func(childComplexity int) int DeleteExport func(childComplexity int, id string) int UpdateExport func(childComplexity int, id string, input map[string]interface{}) int } Query struct { Export func(childComplexity int, id *string, q *string, filter *ExportFilterType) int Exports func(childComplexity int, offset *int, limit *int, q *string, sort []*ExportSortType, filter *ExportFilterType) 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 EntityFilter interface {
Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, whereValues *[]interface{}, havings *[]string, havingValues *[]interface{}, joins *[]string) error
}
EntityFilter ...
type EntityFilterQuery ¶
type EntityFilterQuery interface {
Apply(ctx context.Context, dialect gorm.Dialect, selectionSet *ast.SelectionSet, wheres *[]string, values *[]interface{}, joins *[]string) error
}
EntityFilterQuery ...
type EntityResultType ¶
type EntityResultType struct { Offset *int Limit *int Query EntityFilterQuery Sort []EntitySort Filter EntityFilter Fields []*ast.Field SelectionSet *ast.SelectionSet }
EntityResultType ...
func (*EntityResultType) GetAggregations ¶ added in v0.1.5
func (r *EntityResultType) GetAggregations(ctx context.Context, db *gorm.DB, opts GetAggregationsOptions, model interface{}, out interface{}) error
GetAggregations ...
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
GetItems ...
func (*EntityResultType) GetSortStrings ¶
func (r *EntityResultType) GetSortStrings() []string
GetSortStrings ...
type EntitySort ¶
type EntitySort interface {
Apply(ctx context.Context, dialect gorm.Dialect, sorts *[]SortInfo, joins *[]string) error
}
EntitySort ...
type EventController ¶ added in v0.1.5
type EventController struct {
// contains filtered or unexported fields
}
EventController ...
func NewEventController ¶ added in v0.1.5
func NewEventController() (ec EventController, err error)
NewEventController ...
type Export ¶
type Export struct { ID string `json:"id" gorm:"column:id;primary_key"` Type *string `json:"type" gorm:"column:type"` Metadata *string `json:"metadata" gorm:"column:metadata;type:text"` State *ExportState `json:"state" gorm:"column:state"` Progress *float64 `json:"progress" gorm:"column:progress"` ErrorDescription *string `json:"errorDescription" gorm:"column:errorDescription"` FileID *string `json:"fileId" gorm:"column:fileId"` 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"` }
Export ...
func CreateExportHandler ¶
func CreateExportHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Export, err error)
CreateExportHandler ...
func DeleteExportHandler ¶
func DeleteExportHandler(ctx context.Context, r *GeneratedResolver, id string) (item *Export, err error)
DeleteExportHandler ...
func QueryExportHandler ¶
func QueryExportHandler(ctx context.Context, r *GeneratedResolver, opts QueryExportHandlerOptions) (*Export, error)
QueryExportHandler ...
func UpdateExportHandler ¶
func UpdateExportHandler(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *Export, err error)
UpdateExportHandler ...
type ExportChanges ¶
type ExportChanges struct { ID string Type *string Metadata *string State *ExportState Progress *float64 ErrorDescription *string FileID *string UpdatedAt *time.Time CreatedAt time.Time UpdatedBy *string CreatedBy *string }
ExportChanges ...
type ExportFilterType ¶
type ExportFilterType struct { And []*ExportFilterType `json:"AND"` Or []*ExportFilterType `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"` IDNotIn []string `json:"id_not_in"` IDMinNotIn []string `json:"idMin_not_in"` IDMaxNotIn []string `json:"idMax_not_in"` IDNull *bool `json:"id_null"` Type *string `json:"type"` TypeMin *string `json:"typeMin"` TypeMax *string `json:"typeMax"` TypeNe *string `json:"type_ne"` TypeMinNe *string `json:"typeMin_ne"` TypeMaxNe *string `json:"typeMax_ne"` TypeGt *string `json:"type_gt"` TypeMinGt *string `json:"typeMin_gt"` TypeMaxGt *string `json:"typeMax_gt"` TypeLt *string `json:"type_lt"` TypeMinLt *string `json:"typeMin_lt"` TypeMaxLt *string `json:"typeMax_lt"` TypeGte *string `json:"type_gte"` TypeMinGte *string `json:"typeMin_gte"` TypeMaxGte *string `json:"typeMax_gte"` TypeLte *string `json:"type_lte"` TypeMinLte *string `json:"typeMin_lte"` TypeMaxLte *string `json:"typeMax_lte"` TypeIn []string `json:"type_in"` TypeMinIn []string `json:"typeMin_in"` TypeMaxIn []string `json:"typeMax_in"` TypeNotIn []string `json:"type_not_in"` TypeMinNotIn []string `json:"typeMin_not_in"` TypeMaxNotIn []string `json:"typeMax_not_in"` TypeLike *string `json:"type_like"` TypeMinLike *string `json:"typeMin_like"` TypeMaxLike *string `json:"typeMax_like"` TypePrefix *string `json:"type_prefix"` TypeMinPrefix *string `json:"typeMin_prefix"` TypeMaxPrefix *string `json:"typeMax_prefix"` TypeSuffix *string `json:"type_suffix"` TypeMinSuffix *string `json:"typeMin_suffix"` TypeMaxSuffix *string `json:"typeMax_suffix"` TypeNull *bool `json:"type_null"` Metadata *string `json:"metadata"` MetadataMin *string `json:"metadataMin"` MetadataMax *string `json:"metadataMax"` MetadataNe *string `json:"metadata_ne"` MetadataMinNe *string `json:"metadataMin_ne"` MetadataMaxNe *string `json:"metadataMax_ne"` MetadataGt *string `json:"metadata_gt"` MetadataMinGt *string `json:"metadataMin_gt"` MetadataMaxGt *string `json:"metadataMax_gt"` MetadataLt *string `json:"metadata_lt"` MetadataMinLt *string `json:"metadataMin_lt"` MetadataMaxLt *string `json:"metadataMax_lt"` MetadataGte *string `json:"metadata_gte"` MetadataMinGte *string `json:"metadataMin_gte"` MetadataMaxGte *string `json:"metadataMax_gte"` MetadataLte *string `json:"metadata_lte"` MetadataMinLte *string `json:"metadataMin_lte"` MetadataMaxLte *string `json:"metadataMax_lte"` MetadataIn []string `json:"metadata_in"` MetadataMinIn []string `json:"metadataMin_in"` MetadataMaxIn []string `json:"metadataMax_in"` MetadataNotIn []string `json:"metadata_not_in"` MetadataMinNotIn []string `json:"metadataMin_not_in"` MetadataMaxNotIn []string `json:"metadataMax_not_in"` MetadataLike *string `json:"metadata_like"` MetadataMinLike *string `json:"metadataMin_like"` MetadataMaxLike *string `json:"metadataMax_like"` MetadataPrefix *string `json:"metadata_prefix"` MetadataMinPrefix *string `json:"metadataMin_prefix"` MetadataMaxPrefix *string `json:"metadataMax_prefix"` MetadataSuffix *string `json:"metadata_suffix"` MetadataMinSuffix *string `json:"metadataMin_suffix"` MetadataMaxSuffix *string `json:"metadataMax_suffix"` MetadataNull *bool `json:"metadata_null"` State *ExportState `json:"state"` StateMin *ExportState `json:"stateMin"` StateMax *ExportState `json:"stateMax"` StateNe *ExportState `json:"state_ne"` StateMinNe *ExportState `json:"stateMin_ne"` StateMaxNe *ExportState `json:"stateMax_ne"` StateGt *ExportState `json:"state_gt"` StateMinGt *ExportState `json:"stateMin_gt"` StateMaxGt *ExportState `json:"stateMax_gt"` StateLt *ExportState `json:"state_lt"` StateMinLt *ExportState `json:"stateMin_lt"` StateMaxLt *ExportState `json:"stateMax_lt"` StateGte *ExportState `json:"state_gte"` StateMinGte *ExportState `json:"stateMin_gte"` StateMaxGte *ExportState `json:"stateMax_gte"` StateLte *ExportState `json:"state_lte"` StateMinLte *ExportState `json:"stateMin_lte"` StateMaxLte *ExportState `json:"stateMax_lte"` StateIn []ExportState `json:"state_in"` StateMinIn []ExportState `json:"stateMin_in"` StateMaxIn []ExportState `json:"stateMax_in"` StateNotIn []ExportState `json:"state_not_in"` StateMinNotIn []ExportState `json:"stateMin_not_in"` StateMaxNotIn []ExportState `json:"stateMax_not_in"` StateNull *bool `json:"state_null"` Progress *float64 `json:"progress"` ProgressMin *float64 `json:"progressMin"` ProgressMax *float64 `json:"progressMax"` ProgressAvg *float64 `json:"progressAvg"` ProgressSum *float64 `json:"progressSum"` ProgressNe *float64 `json:"progress_ne"` ProgressMinNe *float64 `json:"progressMin_ne"` ProgressMaxNe *float64 `json:"progressMax_ne"` ProgressAvgNe *float64 `json:"progressAvg_ne"` ProgressSumNe *float64 `json:"progressSum_ne"` ProgressGt *float64 `json:"progress_gt"` ProgressMinGt *float64 `json:"progressMin_gt"` ProgressMaxGt *float64 `json:"progressMax_gt"` ProgressAvgGt *float64 `json:"progressAvg_gt"` ProgressSumGt *float64 `json:"progressSum_gt"` ProgressLt *float64 `json:"progress_lt"` ProgressMinLt *float64 `json:"progressMin_lt"` ProgressMaxLt *float64 `json:"progressMax_lt"` ProgressAvgLt *float64 `json:"progressAvg_lt"` ProgressSumLt *float64 `json:"progressSum_lt"` ProgressGte *float64 `json:"progress_gte"` ProgressMinGte *float64 `json:"progressMin_gte"` ProgressMaxGte *float64 `json:"progressMax_gte"` ProgressAvgGte *float64 `json:"progressAvg_gte"` ProgressSumGte *float64 `json:"progressSum_gte"` ProgressLte *float64 `json:"progress_lte"` ProgressMinLte *float64 `json:"progressMin_lte"` ProgressMaxLte *float64 `json:"progressMax_lte"` ProgressAvgLte *float64 `json:"progressAvg_lte"` ProgressSumLte *float64 `json:"progressSum_lte"` ProgressIn []float64 `json:"progress_in"` ProgressMinIn []float64 `json:"progressMin_in"` ProgressMaxIn []float64 `json:"progressMax_in"` ProgressAvgIn []float64 `json:"progressAvg_in"` ProgressSumIn []float64 `json:"progressSum_in"` ProgressNotIn []float64 `json:"progress_not_in"` ProgressMinNotIn []float64 `json:"progressMin_not_in"` ProgressMaxNotIn []float64 `json:"progressMax_not_in"` ProgressAvgNotIn []float64 `json:"progressAvg_not_in"` ProgressSumNotIn []float64 `json:"progressSum_not_in"` ProgressNull *bool `json:"progress_null"` ErrorDescription *string `json:"errorDescription"` ErrorDescriptionMin *string `json:"errorDescriptionMin"` ErrorDescriptionMax *string `json:"errorDescriptionMax"` ErrorDescriptionNe *string `json:"errorDescription_ne"` ErrorDescriptionMinNe *string `json:"errorDescriptionMin_ne"` ErrorDescriptionMaxNe *string `json:"errorDescriptionMax_ne"` ErrorDescriptionGt *string `json:"errorDescription_gt"` ErrorDescriptionMinGt *string `json:"errorDescriptionMin_gt"` ErrorDescriptionMaxGt *string `json:"errorDescriptionMax_gt"` ErrorDescriptionLt *string `json:"errorDescription_lt"` ErrorDescriptionMinLt *string `json:"errorDescriptionMin_lt"` ErrorDescriptionMaxLt *string `json:"errorDescriptionMax_lt"` ErrorDescriptionGte *string `json:"errorDescription_gte"` ErrorDescriptionMinGte *string `json:"errorDescriptionMin_gte"` ErrorDescriptionMaxGte *string `json:"errorDescriptionMax_gte"` ErrorDescriptionLte *string `json:"errorDescription_lte"` ErrorDescriptionMinLte *string `json:"errorDescriptionMin_lte"` ErrorDescriptionMaxLte *string `json:"errorDescriptionMax_lte"` ErrorDescriptionIn []string `json:"errorDescription_in"` ErrorDescriptionMinIn []string `json:"errorDescriptionMin_in"` ErrorDescriptionMaxIn []string `json:"errorDescriptionMax_in"` ErrorDescriptionNotIn []string `json:"errorDescription_not_in"` ErrorDescriptionMinNotIn []string `json:"errorDescriptionMin_not_in"` ErrorDescriptionMaxNotIn []string `json:"errorDescriptionMax_not_in"` ErrorDescriptionLike *string `json:"errorDescription_like"` ErrorDescriptionMinLike *string `json:"errorDescriptionMin_like"` ErrorDescriptionMaxLike *string `json:"errorDescriptionMax_like"` ErrorDescriptionPrefix *string `json:"errorDescription_prefix"` ErrorDescriptionMinPrefix *string `json:"errorDescriptionMin_prefix"` ErrorDescriptionMaxPrefix *string `json:"errorDescriptionMax_prefix"` ErrorDescriptionSuffix *string `json:"errorDescription_suffix"` ErrorDescriptionMinSuffix *string `json:"errorDescriptionMin_suffix"` ErrorDescriptionMaxSuffix *string `json:"errorDescriptionMax_suffix"` ErrorDescriptionNull *bool `json:"errorDescription_null"` FileID *string `json:"fileId"` FileIDMin *string `json:"fileIdMin"` FileIDMax *string `json:"fileIdMax"` FileIDNe *string `json:"fileId_ne"` FileIDMinNe *string `json:"fileIdMin_ne"` FileIDMaxNe *string `json:"fileIdMax_ne"` FileIDGt *string `json:"fileId_gt"` FileIDMinGt *string `json:"fileIdMin_gt"` FileIDMaxGt *string `json:"fileIdMax_gt"` FileIDLt *string `json:"fileId_lt"` FileIDMinLt *string `json:"fileIdMin_lt"` FileIDMaxLt *string `json:"fileIdMax_lt"` FileIDGte *string `json:"fileId_gte"` FileIDMinGte *string `json:"fileIdMin_gte"` FileIDMaxGte *string `json:"fileIdMax_gte"` FileIDLte *string `json:"fileId_lte"` FileIDMinLte *string `json:"fileIdMin_lte"` FileIDMaxLte *string `json:"fileIdMax_lte"` FileIDIn []string `json:"fileId_in"` FileIDMinIn []string `json:"fileIdMin_in"` FileIDMaxIn []string `json:"fileIdMax_in"` FileIDNotIn []string `json:"fileId_not_in"` FileIDMinNotIn []string `json:"fileIdMin_not_in"` FileIDMaxNotIn []string `json:"fileIdMax_not_in"` FileIDLike *string `json:"fileId_like"` FileIDMinLike *string `json:"fileIdMin_like"` FileIDMaxLike *string `json:"fileIdMax_like"` FileIDPrefix *string `json:"fileId_prefix"` FileIDMinPrefix *string `json:"fileIdMin_prefix"` FileIDMaxPrefix *string `json:"fileIdMax_prefix"` FileIDSuffix *string `json:"fileId_suffix"` FileIDMinSuffix *string `json:"fileIdMin_suffix"` FileIDMaxSuffix *string `json:"fileIdMax_suffix"` FileIDNull *bool `json:"fileId_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"` UpdatedAtNotIn []*time.Time `json:"updatedAt_not_in"` UpdatedAtMinNotIn []*time.Time `json:"updatedAtMin_not_in"` UpdatedAtMaxNotIn []*time.Time `json:"updatedAtMax_not_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"` CreatedAtNotIn []*time.Time `json:"createdAt_not_in"` CreatedAtMinNotIn []*time.Time `json:"createdAtMin_not_in"` CreatedAtMaxNotIn []*time.Time `json:"createdAtMax_not_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"` UpdatedByNotIn []string `json:"updatedBy_not_in"` UpdatedByMinNotIn []string `json:"updatedByMin_not_in"` UpdatedByMaxNotIn []string `json:"updatedByMax_not_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"` CreatedByNotIn []string `json:"createdBy_not_in"` CreatedByMinNotIn []string `json:"createdByMin_not_in"` CreatedByMaxNotIn []string `json:"createdByMax_not_in"` CreatedByNull *bool `json:"createdBy_null"` }
func (*ExportFilterType) AndWith ¶
func (f *ExportFilterType) AndWith(f2 ...*ExportFilterType) *ExportFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*ExportFilterType) Apply ¶
func (f *ExportFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, whereValues *[]interface{}, havings *[]string, havingValues *[]interface{}, joins *[]string) error
Apply ...
func (*ExportFilterType) ApplyWithAlias ¶
func (f *ExportFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, whereValues *[]interface{}, havings *[]string, havingValues *[]interface{}, joins *[]string) error
ApplyWithAlias ...
func (*ExportFilterType) HavingContent ¶ added in v0.1.5
func (f *ExportFilterType) HavingContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
HavingContent ...
func (*ExportFilterType) OrWith ¶
func (f *ExportFilterType) OrWith(f2 ...*ExportFilterType) *ExportFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*ExportFilterType) WhereContent ¶
func (f *ExportFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
WhereContent ...
type ExportResolver ¶
type ExportResultAggregations ¶ added in v0.1.5
type ExportResultAggregations struct { TypeMin *string `json:"typeMin"` TypeMax *string `json:"typeMax"` MetadataMin *string `json:"metadataMin"` MetadataMax *string `json:"metadataMax"` ProgressMin *float64 `json:"progressMin"` ProgressMax *float64 `json:"progressMax"` ProgressAvg *float64 `json:"progressAvg"` ProgressSum *float64 `json:"progressSum"` ErrorDescriptionMin *string `json:"errorDescriptionMin"` ErrorDescriptionMax *string `json:"errorDescriptionMax"` FileIDMin *string `json:"fileIdMin"` FileIDMax *string `json:"fileIdMax"` }
type ExportResultType ¶
type ExportResultType struct {
EntityResultType
}
ExportResultType ...
func QueryExportsHandler ¶
func QueryExportsHandler(ctx context.Context, r *GeneratedResolver, opts QueryExportsHandlerOptions) (*ExportResultType, error)
QueryExportsHandler ...
type ExportResultTypeResolver ¶
type ExportResultTypeResolver interface { Items(ctx context.Context, obj *ExportResultType) ([]*Export, error) Count(ctx context.Context, obj *ExportResultType) (int, error) Aggregations(ctx context.Context, obj *ExportResultType) (*ExportResultAggregations, error) }
type ExportSortType ¶
type ExportSortType struct { ID *ObjectSortType `json:"id"` IDMin *ObjectSortType `json:"idMin"` IDMax *ObjectSortType `json:"idMax"` Type *ObjectSortType `json:"type"` TypeMin *ObjectSortType `json:"typeMin"` TypeMax *ObjectSortType `json:"typeMax"` Metadata *ObjectSortType `json:"metadata"` MetadataMin *ObjectSortType `json:"metadataMin"` MetadataMax *ObjectSortType `json:"metadataMax"` State *ObjectSortType `json:"state"` StateMin *ObjectSortType `json:"stateMin"` StateMax *ObjectSortType `json:"stateMax"` Progress *ObjectSortType `json:"progress"` ProgressMin *ObjectSortType `json:"progressMin"` ProgressMax *ObjectSortType `json:"progressMax"` ProgressAvg *ObjectSortType `json:"progressAvg"` ProgressSum *ObjectSortType `json:"progressSum"` ErrorDescription *ObjectSortType `json:"errorDescription"` ErrorDescriptionMin *ObjectSortType `json:"errorDescriptionMin"` ErrorDescriptionMax *ObjectSortType `json:"errorDescriptionMax"` FileID *ObjectSortType `json:"fileId"` FileIDMin *ObjectSortType `json:"fileIdMin"` FileIDMax *ObjectSortType `json:"fileIdMax"` 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 ExportState ¶ added in v0.1.3
type ExportState string
const ( ExportStateProcessing ExportState = "PROCESSING" ExportStateCompleted ExportState = "COMPLETED" ExportStateError ExportState = "ERROR" )
func (ExportState) IsValid ¶ added in v0.1.3
func (e ExportState) IsValid() bool
func (ExportState) MarshalGQL ¶ added in v0.1.3
func (e ExportState) MarshalGQL(w io.Writer)
func (ExportState) String ¶ added in v0.1.3
func (e ExportState) String() string
func (*ExportState) UnmarshalGQL ¶ added in v0.1.3
func (e *ExportState) UnmarshalGQL(v interface{}) error
type File ¶
type File struct {
ID string `json:"id"`
}
func ExportFileHandler ¶
func ExportFileHandler(ctx context.Context, r *GeneratedResolver, obj *Export) (res *File, err error)
FileHandler ...
type GeneratedExportResolver ¶
type GeneratedExportResolver struct{ *GeneratedResolver }
type GeneratedExportResultTypeResolver ¶
type GeneratedExportResultTypeResolver struct{ *GeneratedResolver }
GeneratedExportResultTypeResolver ...
func (*GeneratedExportResultTypeResolver) Aggregations ¶ added in v0.1.5
func (r *GeneratedExportResultTypeResolver) Aggregations(ctx context.Context, obj *ExportResultType) (res *ExportResultAggregations, err error)
Aggregations ...
func (*GeneratedExportResultTypeResolver) Count ¶
func (r *GeneratedExportResultTypeResolver) Count(ctx context.Context, obj *ExportResultType) (count int, err error)
Count ...
func (*GeneratedExportResultTypeResolver) Items ¶
func (r *GeneratedExportResultTypeResolver) Items(ctx context.Context, obj *ExportResultType) (items []*Export, err error)
Items ...
type GeneratedFileResolver ¶
type GeneratedFileResolver struct{ *GeneratedResolver }
GeneratedFileResolver ...
type GeneratedMutationResolver ¶
type GeneratedMutationResolver struct{ *GeneratedResolver }
GeneratedMutationResolver ...
func (*GeneratedMutationResolver) CreateExport ¶
func (r *GeneratedMutationResolver) CreateExport(ctx context.Context, input map[string]interface{}) (item *Export, err error)
CreateExport ...
func (*GeneratedMutationResolver) DeleteAllExports ¶
func (r *GeneratedMutationResolver) DeleteAllExports(ctx context.Context) (bool, error)
DeleteAllExports ...
func (*GeneratedMutationResolver) DeleteExport ¶
func (r *GeneratedMutationResolver) DeleteExport(ctx context.Context, id string) (item *Export, err error)
DeleteExport ...
func (*GeneratedMutationResolver) UpdateExport ¶
func (r *GeneratedMutationResolver) UpdateExport(ctx context.Context, id string, input map[string]interface{}) (item *Export, err error)
UpdateExport ...
type GeneratedQueryResolver ¶
type GeneratedQueryResolver struct{ *GeneratedResolver }
GeneratedQueryResolver ...
func (*GeneratedQueryResolver) Export ¶
func (r *GeneratedQueryResolver) Export(ctx context.Context, id *string, q *string, filter *ExportFilterType) (*Export, error)
Export ...
func (*GeneratedQueryResolver) Exports ¶
func (r *GeneratedQueryResolver) Exports(ctx context.Context, offset *int, limit *int, q *string, sort []*ExportSortType, filter *ExportFilterType) (*ExportResultType, error)
Exports ...
type GeneratedResolver ¶
type GeneratedResolver struct { Handlers ResolutionHandlers EventController *EventController // contains filtered or unexported fields }
GeneratedResolver ...
func NewGeneratedResolver ¶ added in v0.1.5
func NewGeneratedResolver(handlers ResolutionHandlers, db *DB, ec *EventController) *GeneratedResolver
NewGeneratedResolver ...
func (*GeneratedResolver) ExportsCount ¶ added in v0.1.5
func (r *GeneratedResolver) ExportsCount(ctx context.Context, opts QueryExportsHandlerOptions) (count int, err error)
ExportsCount ...
func (*GeneratedResolver) ExportsItems ¶ added in v0.1.5
func (r *GeneratedResolver) ExportsItems(ctx context.Context, opts QueryExportsHandlerOptions) (res []*Export, err error)
ExportsItems ...
type GetAggregationsAggregationField ¶ added in v0.1.5
GetAggregationsAggregationField ...
type GetAggregationsOptions ¶ added in v0.1.5
type GetAggregationsOptions struct { Alias string Fields []string AggregationFields []GetAggregationsAggregationField }
GetAggregationsOptions ...
type GetItemsOptions ¶
GetItemsOptions ...
type JWTClaims ¶
type JWTClaims struct { jwtgo.StandardClaims Scope *string }
JWTClaims ...
func GetJWTClaimsFromContext ¶
GetJWTClaimsFromContext ...
type MutationEvents ¶
MutationEvents ...
func GetMutationEventStore ¶
func GetMutationEventStore(ctx context.Context) *MutationEvents
GetMutationEventStore ...
type MutationResolver ¶
type MutationResolver interface { CreateExport(ctx context.Context, input map[string]interface{}) (*Export, error) UpdateExport(ctx context.Context, id string, input map[string]interface{}) (*Export, error) DeleteExport(ctx context.Context, id string) (*Export, error) DeleteAllExports(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 QueryExportHandlerOptions ¶
type QueryExportHandlerOptions struct { ID *string Q *string Filter *ExportFilterType }
QueryExportHandlerOptions ...
type QueryExportsHandlerOptions ¶
type QueryExportsHandlerOptions struct { Offset *int Limit *int Q *string Sort []*ExportSortType Filter *ExportFilterType }
QueryExportsHandlerOptions ...
type QueryResolver ¶
type QueryResolver interface { Export(ctx context.Context, id *string, q *string, filter *ExportFilterType) (*Export, error) Exports(ctx context.Context, offset *int, limit *int, q *string, sort []*ExportSortType, filter *ExportFilterType) (*ExportResultType, error) // contains filtered or unexported methods }
type ResolutionHandlers ¶
type ResolutionHandlers struct { OnEvent func(ctx context.Context, r *GeneratedResolver, e *events.Event) error CreateExport func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Export, err error) UpdateExport func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *Export, err error) DeleteExport func(ctx context.Context, r *GeneratedResolver, id string) (item *Export, err error) DeleteAllExports func(ctx context.Context, r *GeneratedResolver) (bool, error) QueryExport func(ctx context.Context, r *GeneratedResolver, opts QueryExportHandlerOptions) (*Export, error) QueryExports func(ctx context.Context, r *GeneratedResolver, opts QueryExportsHandlerOptions) (*ExportResultType, error) ExportFile func(ctx context.Context, r *GeneratedResolver, obj *Export) (res *File, err error) }
ResolutionHandlers ...
func DefaultResolutionHandlers ¶
func DefaultResolutionHandlers() ResolutionHandlers
DefaultResolutionHandlers ...
type ResolverRoot ¶
type ResolverRoot interface { Export() ExportResolver ExportResultType() ExportResultTypeResolver Mutation() MutationResolver Query() QueryResolver }