Versions in this module Expand all Collapse all v0 v0.1.3 Oct 25, 2019 Changes in this version + const KeyExecutableSchema + const KeyJWTClaims + const KeyLoaders + const KeyPrincipalID + const SchemaSDL + var AllChangelogType = []ChangelogType + var AllObjectSortType = []ObjectSortType + func ApplyChanges(changes map[string]interface{}, to interface{}) error + func DeleteAllChangelogChangesHandler(ctx context.Context, r *GeneratedResolver) (bool, error) + func DeleteAllChangelogsHandler(ctx context.Context, r *GeneratedResolver) (bool, error) + func GetHTTPServeMux(r ResolverRoot, db *DB) *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 NewExecutableSchema(cfg Config) graphql.ExecutableSchema + func TableName(name string) string + func Unmarshal_Any(v interface{}) (interface{}, error) + type Changelog struct + Changes []*ChangelogChange + ChangesPreloaded bool + CreatedAt time.Time + CreatedBy *string + Date time.Time + Entity string + EntityID string + ID string + PrincipalID *string + Type ChangelogType + UpdatedAt *time.Time + UpdatedBy *string + func ChangelogChangeLogHandler(ctx context.Context, r *GeneratedChangelogChangeResolver, obj *ChangelogChange) (res *Changelog, err error) + func CreateChangelogHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Changelog, err error) + func DeleteChangelogHandler(ctx context.Context, r *GeneratedResolver, id string) (item *Changelog, err error) + func QueryChangelogHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogHandlerOptions) (*Changelog, error) + func UpdateChangelogHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *Changelog, err error) + func (m *Changelog) Is_Entity() + type ChangelogChange struct + Column string + CreatedAt time.Time + CreatedBy *string + ID string + Log *Changelog + LogID *string + NewValue *string + OldValue *string + UpdatedAt *time.Time + UpdatedBy *string + func ChangelogChangesHandler(ctx context.Context, r *GeneratedChangelogResolver, obj *Changelog) (res []*ChangelogChange, err error) + func CreateChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *ChangelogChange, err error) + func DeleteChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, id string) (item *ChangelogChange, err error) + func QueryChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, ...) (*ChangelogChange, error) + func UpdateChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *ChangelogChange, err error) + func (m *ChangelogChange) Is_Entity() + type ChangelogChangeChanges struct + Column string + CreatedAt time.Time + CreatedBy *string + ID string + LogID *string + NewValue *string + OldValue *string + UpdatedAt *time.Time + UpdatedBy *string + type ChangelogChangeFilterType struct + And []*ChangelogChangeFilterType + Column *string + ColumnGt *string + ColumnGte *string + ColumnIn []string + ColumnLike *string + ColumnLt *string + ColumnLte *string + ColumnNe *string + ColumnNull *bool + ColumnPrefix *string + ColumnSuffix *string + CreatedAt *time.Time + CreatedAtGt *time.Time + CreatedAtGte *time.Time + CreatedAtIn []*time.Time + CreatedAtLt *time.Time + CreatedAtLte *time.Time + CreatedAtNe *time.Time + CreatedAtNull *bool + CreatedBy *string + CreatedByGt *string + CreatedByGte *string + CreatedByIn []string + CreatedByLt *string + CreatedByLte *string + CreatedByNe *string + CreatedByNull *bool + ID *string + IDGt *string + IDGte *string + IDIn []string + IDLt *string + IDLte *string + IDNe *string + IDNull *bool + Log *ChangelogFilterType + LogID *string + LogIDGt *string + LogIDGte *string + LogIDIn []string + LogIDLt *string + LogIDLte *string + LogIDNe *string + LogIDNull *bool + NewValue *string + NewValueGt *string + NewValueGte *string + NewValueIn []string + NewValueLike *string + NewValueLt *string + NewValueLte *string + NewValueNe *string + NewValueNull *bool + NewValuePrefix *string + NewValueSuffix *string + OldValue *string + OldValueGt *string + OldValueGte *string + OldValueIn []string + OldValueLike *string + OldValueLt *string + OldValueLte *string + OldValueNe *string + OldValueNull *bool + OldValuePrefix *string + OldValueSuffix *string + Or []*ChangelogChangeFilterType + UpdatedAt *time.Time + UpdatedAtGt *time.Time + UpdatedAtGte *time.Time + UpdatedAtIn []*time.Time + UpdatedAtLt *time.Time + UpdatedAtLte *time.Time + UpdatedAtNe *time.Time + UpdatedAtNull *bool + UpdatedBy *string + UpdatedByGt *string + UpdatedByGte *string + UpdatedByIn []string + UpdatedByLt *string + UpdatedByLte *string + UpdatedByNe *string + UpdatedByNull *bool + func (f *ChangelogChangeFilterType) AndWith(f2 ...*ChangelogChangeFilterType) *ChangelogChangeFilterType + func (f *ChangelogChangeFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error + func (f *ChangelogChangeFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error + func (f *ChangelogChangeFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool + func (f *ChangelogChangeFilterType) OrWith(f2 ...*ChangelogChangeFilterType) *ChangelogChangeFilterType + func (f *ChangelogChangeFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{}) + type ChangelogChangeQueryFilter struct + Query *string + func (qf *ChangelogChangeQueryFilter) Apply(ctx context.Context, dialect gorm.Dialect, selectionSet *ast.SelectionSet, ...) error + type ChangelogChangeResolver interface + Log func(ctx context.Context, obj *ChangelogChange) (*Changelog, error) + type ChangelogChangeResultType struct + func QueryChangelogChangesHandler(ctx context.Context, r *GeneratedResolver, ...) (*ChangelogChangeResultType, error) + type ChangelogChangeResultTypeResolver interface + Count func(ctx context.Context, obj *ChangelogChangeResultType) (int, error) + Items func(ctx context.Context, obj *ChangelogChangeResultType) ([]*ChangelogChange, error) + type ChangelogChangeSortType struct + Column *ObjectSortType + CreatedAt *ObjectSortType + CreatedBy *ObjectSortType + ID *ObjectSortType + Log *ChangelogSortType + LogID *ObjectSortType + NewValue *ObjectSortType + OldValue *ObjectSortType + UpdatedAt *ObjectSortType + UpdatedBy *ObjectSortType + func (s ChangelogChangeSortType) Apply(ctx context.Context, dialect gorm.Dialect, sorts *[]string, joins *[]string) error + func (s ChangelogChangeSortType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, sorts *[]string, ...) error + type ChangelogChanges struct + ChangesIDs []*string + CreatedAt time.Time + CreatedBy *string + Date time.Time + Entity string + EntityID string + ID string + PrincipalID *string + Type ChangelogType + UpdatedAt *time.Time + UpdatedBy *string + type ChangelogFilterType struct + And []*ChangelogFilterType + Changes *ChangelogChangeFilterType + CreatedAt *time.Time + CreatedAtGt *time.Time + CreatedAtGte *time.Time + CreatedAtIn []*time.Time + CreatedAtLt *time.Time + CreatedAtLte *time.Time + CreatedAtNe *time.Time + CreatedAtNull *bool + CreatedBy *string + CreatedByGt *string + CreatedByGte *string + CreatedByIn []string + CreatedByLt *string + CreatedByLte *string + CreatedByNe *string + CreatedByNull *bool + Date *time.Time + DateGt *time.Time + DateGte *time.Time + DateIn []*time.Time + DateLt *time.Time + DateLte *time.Time + DateNe *time.Time + DateNull *bool + Entity *string + EntityGt *string + EntityGte *string + EntityID *string + EntityIDGt *string + EntityIDGte *string + EntityIDIn []string + EntityIDLike *string + EntityIDLt *string + EntityIDLte *string + EntityIDNe *string + EntityIDNull *bool + EntityIDPrefix *string + EntityIDSuffix *string + EntityIn []string + EntityLike *string + EntityLt *string + EntityLte *string + EntityNe *string + EntityNull *bool + EntityPrefix *string + EntitySuffix *string + ID *string + IDGt *string + IDGte *string + IDIn []string + IDLt *string + IDLte *string + IDNe *string + IDNull *bool + Or []*ChangelogFilterType + PrincipalID *string + PrincipalIDGt *string + PrincipalIDGte *string + PrincipalIDIn []string + PrincipalIDLike *string + PrincipalIDLt *string + PrincipalIDLte *string + PrincipalIDNe *string + PrincipalIDNull *bool + PrincipalIDPrefix *string + PrincipalIDSuffix *string + Type *ChangelogType + TypeGt *ChangelogType + TypeGte *ChangelogType + TypeIn []ChangelogType + TypeLt *ChangelogType + TypeLte *ChangelogType + TypeNe *ChangelogType + TypeNull *bool + UpdatedAt *time.Time + UpdatedAtGt *time.Time + UpdatedAtGte *time.Time + UpdatedAtIn []*time.Time + UpdatedAtLt *time.Time + UpdatedAtLte *time.Time + UpdatedAtNe *time.Time + UpdatedAtNull *bool + UpdatedBy *string + UpdatedByGt *string + UpdatedByGte *string + UpdatedByIn []string + UpdatedByLt *string + UpdatedByLte *string + UpdatedByNe *string + UpdatedByNull *bool + func (f *ChangelogFilterType) AndWith(f2 ...*ChangelogFilterType) *ChangelogFilterType + func (f *ChangelogFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error + func (f *ChangelogFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error + func (f *ChangelogFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool + func (f *ChangelogFilterType) OrWith(f2 ...*ChangelogFilterType) *ChangelogFilterType + func (f *ChangelogFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{}) + type ChangelogQueryFilter struct + Query *string + func (qf *ChangelogQueryFilter) Apply(ctx context.Context, dialect gorm.Dialect, selectionSet *ast.SelectionSet, ...) error + type ChangelogResolver interface + Changes func(ctx context.Context, obj *Changelog) ([]*ChangelogChange, error) + ChangesIds func(ctx context.Context, obj *Changelog) ([]string, error) + type ChangelogResultType struct + func QueryChangelogsHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogsHandlerOptions) (*ChangelogResultType, error) + type ChangelogResultTypeResolver interface + Count func(ctx context.Context, obj *ChangelogResultType) (int, error) + Items func(ctx context.Context, obj *ChangelogResultType) ([]*Changelog, error) + type ChangelogSortType struct + Changes *ChangelogChangeSortType + ChangesIds *ObjectSortType + CreatedAt *ObjectSortType + CreatedBy *ObjectSortType + Date *ObjectSortType + Entity *ObjectSortType + EntityID *ObjectSortType + ID *ObjectSortType + PrincipalID *ObjectSortType + Type *ObjectSortType + UpdatedAt *ObjectSortType + UpdatedBy *ObjectSortType + func (s ChangelogSortType) Apply(ctx context.Context, dialect gorm.Dialect, sorts *[]string, joins *[]string) error + func (s ChangelogSortType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, sorts *[]string, ...) error + type ChangelogType string + const ChangelogTypeCreated + const ChangelogTypeDeleted + const ChangelogTypeUpdated + func (e *ChangelogType) UnmarshalGQL(v interface{}) error + func (e ChangelogType) IsValid() bool + func (e ChangelogType) MarshalGQL(w io.Writer) + func (e ChangelogType) String() string + type ComplexityRoot struct + Changelog struct{ ... } + ChangelogChange struct{ ... } + ChangelogChangeResultType struct{ ... } + ChangelogResultType struct{ ... } + Mutation struct{ ... } + Query struct{ ... } + type Config struct + Complexity ComplexityRoot + Directives DirectiveRoot + Resolvers ResolverRoot + type DB struct + func NewDB(db *gorm.DB) *DB + func NewDBFromEnvVars() *DB + func NewDBWithString(urlString string) *DB + func (db *DB) AutoMigrate() *gorm.DB + func (db *DB) Close() error + func (db *DB) Ping() error + func (db *DB) Query() *gorm.DB + type DirectiveRoot struct + type EntityFilter interface + Apply func(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error + type EntityFilterQuery interface + Apply func(ctx context.Context, dialect gorm.Dialect, selectionSet *ast.SelectionSet, ...) error + type EntityResultType struct + Fields []*ast.Field + Filter EntityFilter + Limit *int + Offset *int + Query EntityFilterQuery + SelectionSet *ast.SelectionSet + Sort []EntitySort + func (r *EntityResultType) GetCount(ctx context.Context, db *gorm.DB, 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 interface + Apply func(ctx context.Context, dialect gorm.Dialect, sorts *[]string, joins *[]string) error + type GeneratedChangelogChangeResolver struct + func (r *GeneratedChangelogChangeResolver) Log(ctx context.Context, obj *ChangelogChange) (res *Changelog, err error) + type GeneratedChangelogChangeResultTypeResolver struct + func (r *GeneratedChangelogChangeResultTypeResolver) Count(ctx context.Context, obj *ChangelogChangeResultType) (count int, err error) + func (r *GeneratedChangelogChangeResultTypeResolver) Items(ctx context.Context, obj *ChangelogChangeResultType) (items []*ChangelogChange, err error) + type GeneratedChangelogResolver struct + func (r *GeneratedChangelogResolver) Changes(ctx context.Context, obj *Changelog) (res []*ChangelogChange, err error) + func (r *GeneratedChangelogResolver) ChangesIds(ctx context.Context, obj *Changelog) (ids []string, err error) + type GeneratedChangelogResultTypeResolver struct + func (r *GeneratedChangelogResultTypeResolver) Count(ctx context.Context, obj *ChangelogResultType) (count int, err error) + func (r *GeneratedChangelogResultTypeResolver) Items(ctx context.Context, obj *ChangelogResultType) (items []*Changelog, err error) + type GeneratedMutationResolver struct + func (r *GeneratedMutationResolver) CreateChangelog(ctx context.Context, input map[string]interface{}) (item *Changelog, err error) + func (r *GeneratedMutationResolver) CreateChangelogChange(ctx context.Context, input map[string]interface{}) (item *ChangelogChange, err error) + func (r *GeneratedMutationResolver) DeleteAllChangelogChanges(ctx context.Context) (bool, error) + func (r *GeneratedMutationResolver) DeleteAllChangelogs(ctx context.Context) (bool, error) + func (r *GeneratedMutationResolver) DeleteChangelog(ctx context.Context, id string) (item *Changelog, err error) + func (r *GeneratedMutationResolver) DeleteChangelogChange(ctx context.Context, id string) (item *ChangelogChange, err error) + func (r *GeneratedMutationResolver) UpdateChangelog(ctx context.Context, id string, input map[string]interface{}) (item *Changelog, err error) + func (r *GeneratedMutationResolver) UpdateChangelogChange(ctx context.Context, id string, input map[string]interface{}) (item *ChangelogChange, err error) + type GeneratedQueryResolver struct + func (r *GeneratedQueryResolver) Changelog(ctx context.Context, id *string, q *string, filter *ChangelogFilterType) (*Changelog, error) + func (r *GeneratedQueryResolver) ChangelogChange(ctx context.Context, id *string, q *string, filter *ChangelogChangeFilterType) (*ChangelogChange, error) + func (r *GeneratedQueryResolver) ChangelogChanges(ctx context.Context, offset *int, limit *int, q *string, ...) (*ChangelogChangeResultType, error) + func (r *GeneratedQueryResolver) Changelogs(ctx context.Context, offset *int, limit *int, q *string, ...) (*ChangelogResultType, error) + type GeneratedResolver struct + DB *DB + EventController *events.EventController + Handlers ResolutionHandlers + type GetItemsOptions struct + Alias string + Preloaders []string + type JWTClaims struct + Scope *string + func GetJWTClaimsFromContext(ctx context.Context) *JWTClaims + func (c *JWTClaims) HasScope(scope string) bool + func (c *JWTClaims) Scopes() []string + type MutationResolver interface + CreateChangelog func(ctx context.Context, input map[string]interface{}) (*Changelog, error) + CreateChangelogChange func(ctx context.Context, input map[string]interface{}) (*ChangelogChange, error) + DeleteAllChangelogChanges func(ctx context.Context) (bool, error) + DeleteAllChangelogs func(ctx context.Context) (bool, error) + DeleteChangelog func(ctx context.Context, id string) (*Changelog, error) + DeleteChangelogChange func(ctx context.Context, id string) (*ChangelogChange, error) + UpdateChangelog func(ctx context.Context, id string, input map[string]interface{}) (*Changelog, error) + UpdateChangelogChange func(ctx context.Context, id string, input map[string]interface{}) (*ChangelogChange, error) + type NotFoundError struct + Entity string + func (e *NotFoundError) Error() string + type ObjectSortType string + const ObjectSortTypeAsc + const ObjectSortTypeDesc + func (e *ObjectSortType) UnmarshalGQL(v interface{}) error + func (e ObjectSortType) IsValid() bool + func (e ObjectSortType) MarshalGQL(w io.Writer) + func (e ObjectSortType) String() string + type QueryChangelogChangeHandlerOptions struct + Filter *ChangelogChangeFilterType + ID *string + Q *string + type QueryChangelogChangesHandlerOptions struct + Filter *ChangelogChangeFilterType + Limit *int + Offset *int + Q *string + Sort []*ChangelogChangeSortType + type QueryChangelogHandlerOptions struct + Filter *ChangelogFilterType + ID *string + Q *string + type QueryChangelogsHandlerOptions struct + Filter *ChangelogFilterType + Limit *int + Offset *int + Q *string + Sort []*ChangelogSortType + type QueryResolver interface + Changelog func(ctx context.Context, id *string, q *string, filter *ChangelogFilterType) (*Changelog, error) + ChangelogChange func(ctx context.Context, id *string, q *string, filter *ChangelogChangeFilterType) (*ChangelogChange, error) + ChangelogChanges func(ctx context.Context, offset *int, limit *int, q *string, ...) (*ChangelogChangeResultType, error) + Changelogs func(ctx context.Context, offset *int, limit *int, q *string, ...) (*ChangelogResultType, error) + type ResolutionHandlers struct + ChangelogChangeLog func(ctx context.Context, r *GeneratedChangelogChangeResolver, obj *ChangelogChange) (res *Changelog, err error) + ChangelogChanges func(ctx context.Context, r *GeneratedChangelogResolver, obj *Changelog) (res []*ChangelogChange, err error) + CreateChangelog func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Changelog, err error) + CreateChangelogChange func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *ChangelogChange, err error) + DeleteAllChangelogChanges func(ctx context.Context, r *GeneratedResolver) (bool, error) + DeleteAllChangelogs func(ctx context.Context, r *GeneratedResolver) (bool, error) + DeleteChangelog func(ctx context.Context, r *GeneratedResolver, id string) (item *Changelog, err error) + DeleteChangelogChange func(ctx context.Context, r *GeneratedResolver, id string) (item *ChangelogChange, err error) + QueryChangelog func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogHandlerOptions) (*Changelog, error) + QueryChangelogChange func(ctx context.Context, r *GeneratedResolver, ...) (*ChangelogChange, error) + QueryChangelogChanges func(ctx context.Context, r *GeneratedResolver, ...) (*ChangelogChangeResultType, error) + QueryChangelogs func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogsHandlerOptions) (*ChangelogResultType, error) + UpdateChangelog func(ctx context.Context, r *GeneratedResolver, id string, ...) (item *Changelog, err error) + UpdateChangelogChange func(ctx context.Context, r *GeneratedResolver, id string, ...) (item *ChangelogChange, err error) + func DefaultResolutionHandlers() ResolutionHandlers + type ResolverRoot interface + Changelog func() ChangelogResolver + ChangelogChange func() ChangelogChangeResolver + ChangelogChangeResultType func() ChangelogChangeResultTypeResolver + ChangelogResultType func() ChangelogResultTypeResolver + Mutation func() MutationResolver + Query func() QueryResolver v0.1.2 Oct 18, 2019 v0.1.1 Oct 18, 2019 v0.1.0 Oct 16, 2019 v0.0.1 Oct 5, 2019