Documentation ¶
Index ¶
- Constants
- Variables
- 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
- 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)
- type ChangelogChange
- 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)
- type ChangelogChangeChanges
- type ChangelogChangeFilterType
- 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
- type ChangelogChangeResolver
- type ChangelogChangeResultType
- type ChangelogChangeResultTypeResolver
- type ChangelogChangeSortType
- type ChangelogChanges
- type ChangelogFilterType
- 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
- type ChangelogResolver
- type ChangelogResultType
- type ChangelogResultTypeResolver
- type ChangelogSortType
- type ChangelogType
- type ComplexityRoot
- type Config
- type DB
- type DirectiveRoot
- type EntityFilter
- type EntityFilterQuery
- type EntityResultType
- type EntitySort
- type GeneratedChangelogChangeResolver
- type GeneratedChangelogChangeResultTypeResolver
- type GeneratedChangelogResolver
- type GeneratedChangelogResultTypeResolver
- type GeneratedMutationResolver
- 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
- 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
- type GetItemsOptions
- type JWTClaims
- type MutationResolver
- type NotFoundError
- type ObjectSortType
- type QueryChangelogChangeHandlerOptions
- type QueryChangelogChangesHandlerOptions
- type QueryChangelogHandlerOptions
- type QueryChangelogsHandlerOptions
- type QueryResolver
- type ResolutionHandlers
- type ResolverRoot
Constants ¶
Variables ¶
View Source
var AllChangelogType = []ChangelogType{ ChangelogTypeCreated, ChangelogTypeUpdated, ChangelogTypeDeleted, }
View Source
var AllObjectSortType = []ObjectSortType{ ObjectSortTypeAsc, ObjectSortTypeDesc, }
Functions ¶
func ApplyChanges ¶
used to convert map[string]interface{} to EntityChanges struct
func DeleteAllChangelogChangesHandler ¶
func DeleteAllChangelogChangesHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
func DeleteAllChangelogsHandler ¶
func DeleteAllChangelogsHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
func GetHTTPServeMux ¶
func GetHTTPServeMux(r ResolverRoot, db *DB) *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 Unmarshal_Any ¶
func Unmarshal_Any(v interface{}) (interface{}, error)
Types ¶
type Changelog ¶
type Changelog struct { ID string `json:"id" gorm:"column:id;primary_key"` Entity string `json:"entity" gorm:"column:entity;index:entity_search"` EntityID string `json:"entityID" gorm:"column:entityID;index:entity_search"` PrincipalID *string `json:"principalID" gorm:"column:principalID"` Type ChangelogType `json:"type" gorm:"column:type"` Date time.Time `json:"date" gorm:"column:date"` 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"` Changes []*ChangelogChange `json:"changes" gorm:"foreignkey:LogID"` ChangesPreloaded bool `gorm:"-"` }
func ChangelogChangeLogHandler ¶
func ChangelogChangeLogHandler(ctx context.Context, r *GeneratedChangelogChangeResolver, obj *ChangelogChange) (res *Changelog, err error)
func CreateChangelogHandler ¶
func DeleteChangelogHandler ¶
func QueryChangelogHandler ¶
func QueryChangelogHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogHandlerOptions) (*Changelog, error)
func UpdateChangelogHandler ¶
type ChangelogChange ¶
type ChangelogChange struct { ID string `json:"id" gorm:"column:id;primary_key"` Column string `json:"column" gorm:"column:column"` OldValue *string `json:"oldValue" gorm:"column:oldValue;type:text"` NewValue *string `json:"newValue" gorm:"column:newValue;type:text"` LogID *string `json:"logId" gorm:"column:logId"` 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"` Log *Changelog `json:"log"` }
func ChangelogChangesHandler ¶
func ChangelogChangesHandler(ctx context.Context, r *GeneratedChangelogResolver, obj *Changelog) (res []*ChangelogChange, err error)
func CreateChangelogChangeHandler ¶
func CreateChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *ChangelogChange, err error)
func DeleteChangelogChangeHandler ¶
func DeleteChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, id string) (item *ChangelogChange, err error)
func QueryChangelogChangeHandler ¶
func QueryChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogChangeHandlerOptions) (*ChangelogChange, error)
func UpdateChangelogChangeHandler ¶
func UpdateChangelogChangeHandler(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *ChangelogChange, err error)
func (*ChangelogChange) Is_Entity ¶
func (m *ChangelogChange) Is_Entity()
type ChangelogChangeChanges ¶
type ChangelogChangeFilterType ¶
type ChangelogChangeFilterType struct { And []*ChangelogChangeFilterType `json:"AND"` Or []*ChangelogChangeFilterType `json:"OR"` ID *string `json:"id"` IDNe *string `json:"id_ne"` IDGt *string `json:"id_gt"` IDLt *string `json:"id_lt"` IDGte *string `json:"id_gte"` IDLte *string `json:"id_lte"` IDIn []string `json:"id_in"` IDNull *bool `json:"id_null"` Column *string `json:"column"` ColumnNe *string `json:"column_ne"` ColumnGt *string `json:"column_gt"` ColumnLt *string `json:"column_lt"` ColumnGte *string `json:"column_gte"` ColumnLte *string `json:"column_lte"` ColumnIn []string `json:"column_in"` ColumnLike *string `json:"column_like"` ColumnPrefix *string `json:"column_prefix"` ColumnSuffix *string `json:"column_suffix"` ColumnNull *bool `json:"column_null"` OldValue *string `json:"oldValue"` OldValueNe *string `json:"oldValue_ne"` OldValueGt *string `json:"oldValue_gt"` OldValueLt *string `json:"oldValue_lt"` OldValueGte *string `json:"oldValue_gte"` OldValueLte *string `json:"oldValue_lte"` OldValueIn []string `json:"oldValue_in"` OldValueLike *string `json:"oldValue_like"` OldValuePrefix *string `json:"oldValue_prefix"` OldValueSuffix *string `json:"oldValue_suffix"` OldValueNull *bool `json:"oldValue_null"` NewValue *string `json:"newValue"` NewValueNe *string `json:"newValue_ne"` NewValueGt *string `json:"newValue_gt"` NewValueLt *string `json:"newValue_lt"` NewValueGte *string `json:"newValue_gte"` NewValueLte *string `json:"newValue_lte"` NewValueIn []string `json:"newValue_in"` NewValueLike *string `json:"newValue_like"` NewValuePrefix *string `json:"newValue_prefix"` NewValueSuffix *string `json:"newValue_suffix"` NewValueNull *bool `json:"newValue_null"` LogID *string `json:"logId"` LogIDNe *string `json:"logId_ne"` LogIDGt *string `json:"logId_gt"` LogIDLt *string `json:"logId_lt"` LogIDGte *string `json:"logId_gte"` LogIDLte *string `json:"logId_lte"` LogIDIn []string `json:"logId_in"` LogIDNull *bool `json:"logId_null"` UpdatedAt *time.Time `json:"updatedAt"` UpdatedAtNe *time.Time `json:"updatedAt_ne"` UpdatedAtGt *time.Time `json:"updatedAt_gt"` UpdatedAtLt *time.Time `json:"updatedAt_lt"` UpdatedAtGte *time.Time `json:"updatedAt_gte"` UpdatedAtLte *time.Time `json:"updatedAt_lte"` UpdatedAtIn []*time.Time `json:"updatedAt_in"` UpdatedAtNull *bool `json:"updatedAt_null"` CreatedAt *time.Time `json:"createdAt"` CreatedAtNe *time.Time `json:"createdAt_ne"` CreatedAtGt *time.Time `json:"createdAt_gt"` CreatedAtLt *time.Time `json:"createdAt_lt"` CreatedAtGte *time.Time `json:"createdAt_gte"` CreatedAtLte *time.Time `json:"createdAt_lte"` CreatedAtIn []*time.Time `json:"createdAt_in"` CreatedAtNull *bool `json:"createdAt_null"` UpdatedBy *string `json:"updatedBy"` UpdatedByNe *string `json:"updatedBy_ne"` UpdatedByGt *string `json:"updatedBy_gt"` UpdatedByLt *string `json:"updatedBy_lt"` UpdatedByGte *string `json:"updatedBy_gte"` UpdatedByLte *string `json:"updatedBy_lte"` UpdatedByIn []string `json:"updatedBy_in"` UpdatedByNull *bool `json:"updatedBy_null"` CreatedBy *string `json:"createdBy"` CreatedByNe *string `json:"createdBy_ne"` CreatedByGt *string `json:"createdBy_gt"` CreatedByLt *string `json:"createdBy_lt"` CreatedByGte *string `json:"createdBy_gte"` CreatedByLte *string `json:"createdBy_lte"` CreatedByIn []string `json:"createdBy_in"` CreatedByNull *bool `json:"createdBy_null"` Log *ChangelogFilterType `json:"log"` }
func (*ChangelogChangeFilterType) AndWith ¶
func (f *ChangelogChangeFilterType) AndWith(f2 ...*ChangelogChangeFilterType) *ChangelogChangeFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*ChangelogChangeFilterType) ApplyWithAlias ¶
func (*ChangelogChangeFilterType) OrWith ¶
func (f *ChangelogChangeFilterType) OrWith(f2 ...*ChangelogChangeFilterType) *ChangelogChangeFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*ChangelogChangeFilterType) WhereContent ¶
func (f *ChangelogChangeFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
type ChangelogChangeQueryFilter ¶
type ChangelogChangeQueryFilter struct {
Query *string
}
type ChangelogChangeResolver ¶
type ChangelogChangeResolver interface {
Log(ctx context.Context, obj *ChangelogChange) (*Changelog, error)
}
type ChangelogChangeResultType ¶
type ChangelogChangeResultType struct {
EntityResultType
}
func QueryChangelogChangesHandler ¶
func QueryChangelogChangesHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogChangesHandlerOptions) (*ChangelogChangeResultType, error)
type ChangelogChangeResultTypeResolver ¶
type ChangelogChangeResultTypeResolver interface { Items(ctx context.Context, obj *ChangelogChangeResultType) ([]*ChangelogChange, error) Count(ctx context.Context, obj *ChangelogChangeResultType) (int, error) }
type ChangelogChangeSortType ¶
type ChangelogChangeSortType struct { ID *ObjectSortType `json:"id"` Column *ObjectSortType `json:"column"` OldValue *ObjectSortType `json:"oldValue"` NewValue *ObjectSortType `json:"newValue"` LogID *ObjectSortType `json:"logId"` UpdatedAt *ObjectSortType `json:"updatedAt"` CreatedAt *ObjectSortType `json:"createdAt"` UpdatedBy *ObjectSortType `json:"updatedBy"` CreatedBy *ObjectSortType `json:"createdBy"` Log *ChangelogSortType `json:"log"` }
type ChangelogChanges ¶
type ChangelogFilterType ¶
type ChangelogFilterType struct { And []*ChangelogFilterType `json:"AND"` Or []*ChangelogFilterType `json:"OR"` ID *string `json:"id"` IDNe *string `json:"id_ne"` IDGt *string `json:"id_gt"` IDLt *string `json:"id_lt"` IDGte *string `json:"id_gte"` IDLte *string `json:"id_lte"` IDIn []string `json:"id_in"` IDNull *bool `json:"id_null"` Entity *string `json:"entity"` EntityNe *string `json:"entity_ne"` EntityGt *string `json:"entity_gt"` EntityLt *string `json:"entity_lt"` EntityGte *string `json:"entity_gte"` EntityLte *string `json:"entity_lte"` EntityIn []string `json:"entity_in"` EntityLike *string `json:"entity_like"` EntityPrefix *string `json:"entity_prefix"` EntitySuffix *string `json:"entity_suffix"` EntityNull *bool `json:"entity_null"` EntityID *string `json:"entityID"` EntityIDNe *string `json:"entityID_ne"` EntityIDGt *string `json:"entityID_gt"` EntityIDLt *string `json:"entityID_lt"` EntityIDGte *string `json:"entityID_gte"` EntityIDLte *string `json:"entityID_lte"` EntityIDIn []string `json:"entityID_in"` EntityIDLike *string `json:"entityID_like"` EntityIDPrefix *string `json:"entityID_prefix"` EntityIDSuffix *string `json:"entityID_suffix"` EntityIDNull *bool `json:"entityID_null"` PrincipalID *string `json:"principalID"` PrincipalIDNe *string `json:"principalID_ne"` PrincipalIDGt *string `json:"principalID_gt"` PrincipalIDLt *string `json:"principalID_lt"` PrincipalIDGte *string `json:"principalID_gte"` PrincipalIDLte *string `json:"principalID_lte"` PrincipalIDIn []string `json:"principalID_in"` PrincipalIDLike *string `json:"principalID_like"` PrincipalIDPrefix *string `json:"principalID_prefix"` PrincipalIDSuffix *string `json:"principalID_suffix"` PrincipalIDNull *bool `json:"principalID_null"` Type *ChangelogType `json:"type"` TypeNe *ChangelogType `json:"type_ne"` TypeGt *ChangelogType `json:"type_gt"` TypeLt *ChangelogType `json:"type_lt"` TypeGte *ChangelogType `json:"type_gte"` TypeLte *ChangelogType `json:"type_lte"` TypeIn []ChangelogType `json:"type_in"` TypeNull *bool `json:"type_null"` Date *time.Time `json:"date"` DateNe *time.Time `json:"date_ne"` DateGt *time.Time `json:"date_gt"` DateLt *time.Time `json:"date_lt"` DateGte *time.Time `json:"date_gte"` DateLte *time.Time `json:"date_lte"` DateIn []*time.Time `json:"date_in"` DateNull *bool `json:"date_null"` UpdatedAt *time.Time `json:"updatedAt"` UpdatedAtNe *time.Time `json:"updatedAt_ne"` UpdatedAtGt *time.Time `json:"updatedAt_gt"` UpdatedAtLt *time.Time `json:"updatedAt_lt"` UpdatedAtGte *time.Time `json:"updatedAt_gte"` UpdatedAtLte *time.Time `json:"updatedAt_lte"` UpdatedAtIn []*time.Time `json:"updatedAt_in"` UpdatedAtNull *bool `json:"updatedAt_null"` CreatedAt *time.Time `json:"createdAt"` CreatedAtNe *time.Time `json:"createdAt_ne"` CreatedAtGt *time.Time `json:"createdAt_gt"` CreatedAtLt *time.Time `json:"createdAt_lt"` CreatedAtGte *time.Time `json:"createdAt_gte"` CreatedAtLte *time.Time `json:"createdAt_lte"` CreatedAtIn []*time.Time `json:"createdAt_in"` CreatedAtNull *bool `json:"createdAt_null"` UpdatedBy *string `json:"updatedBy"` UpdatedByNe *string `json:"updatedBy_ne"` UpdatedByGt *string `json:"updatedBy_gt"` UpdatedByLt *string `json:"updatedBy_lt"` UpdatedByGte *string `json:"updatedBy_gte"` UpdatedByLte *string `json:"updatedBy_lte"` UpdatedByIn []string `json:"updatedBy_in"` UpdatedByNull *bool `json:"updatedBy_null"` CreatedBy *string `json:"createdBy"` CreatedByNe *string `json:"createdBy_ne"` CreatedByGt *string `json:"createdBy_gt"` CreatedByLt *string `json:"createdBy_lt"` CreatedByGte *string `json:"createdBy_gte"` CreatedByLte *string `json:"createdBy_lte"` CreatedByIn []string `json:"createdBy_in"` CreatedByNull *bool `json:"createdBy_null"` Changes *ChangelogChangeFilterType `json:"changes"` }
func (*ChangelogFilterType) AndWith ¶
func (f *ChangelogFilterType) AndWith(f2 ...*ChangelogFilterType) *ChangelogFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*ChangelogFilterType) ApplyWithAlias ¶
func (*ChangelogFilterType) OrWith ¶
func (f *ChangelogFilterType) OrWith(f2 ...*ChangelogFilterType) *ChangelogFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*ChangelogFilterType) WhereContent ¶
func (f *ChangelogFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
type ChangelogQueryFilter ¶
type ChangelogQueryFilter struct {
Query *string
}
type ChangelogResolver ¶
type ChangelogResultType ¶
type ChangelogResultType struct {
EntityResultType
}
func QueryChangelogsHandler ¶
func QueryChangelogsHandler(ctx context.Context, r *GeneratedResolver, opts QueryChangelogsHandlerOptions) (*ChangelogResultType, error)
type ChangelogResultTypeResolver ¶
type ChangelogResultTypeResolver interface { Items(ctx context.Context, obj *ChangelogResultType) ([]*Changelog, error) Count(ctx context.Context, obj *ChangelogResultType) (int, error) }
type ChangelogSortType ¶
type ChangelogSortType struct { ID *ObjectSortType `json:"id"` Entity *ObjectSortType `json:"entity"` EntityID *ObjectSortType `json:"entityID"` PrincipalID *ObjectSortType `json:"principalID"` Type *ObjectSortType `json:"type"` Date *ObjectSortType `json:"date"` UpdatedAt *ObjectSortType `json:"updatedAt"` CreatedAt *ObjectSortType `json:"createdAt"` UpdatedBy *ObjectSortType `json:"updatedBy"` CreatedBy *ObjectSortType `json:"createdBy"` ChangesIds *ObjectSortType `json:"changesIds"` Changes *ChangelogChangeSortType `json:"changes"` }
type ChangelogType ¶
type ChangelogType string
const ( ChangelogTypeCreated ChangelogType = "CREATED" ChangelogTypeUpdated ChangelogType = "UPDATED" ChangelogTypeDeleted ChangelogType = "DELETED" )
func (ChangelogType) IsValid ¶
func (e ChangelogType) IsValid() bool
func (ChangelogType) MarshalGQL ¶
func (e ChangelogType) MarshalGQL(w io.Writer)
func (ChangelogType) String ¶
func (e ChangelogType) String() string
func (*ChangelogType) UnmarshalGQL ¶
func (e *ChangelogType) UnmarshalGQL(v interface{}) error
type ComplexityRoot ¶
type ComplexityRoot struct { Changelog struct { Changes func(childComplexity int) int ChangesIds func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int Date func(childComplexity int) int Entity func(childComplexity int) int EntityID func(childComplexity int) int ID func(childComplexity int) int PrincipalID func(childComplexity int) int Type func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } ChangelogChange struct { Column func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int ID func(childComplexity int) int Log func(childComplexity int) int LogID func(childComplexity int) int NewValue func(childComplexity int) int OldValue func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } ChangelogChangeResultType struct { Count func(childComplexity int) int Items func(childComplexity int) int } ChangelogResultType struct { Count func(childComplexity int) int Items func(childComplexity int) int } Mutation struct { CreateChangelog func(childComplexity int, input map[string]interface{}) int CreateChangelogChange func(childComplexity int, input map[string]interface{}) int DeleteAllChangelogChanges func(childComplexity int) int DeleteAllChangelogs func(childComplexity int) int DeleteChangelog func(childComplexity int, id string) int DeleteChangelogChange func(childComplexity int, id string) int UpdateChangelog func(childComplexity int, id string, input map[string]interface{}) int UpdateChangelogChange func(childComplexity int, id string, input map[string]interface{}) int } Query struct { Changelog func(childComplexity int, id *string, q *string, filter *ChangelogFilterType) int ChangelogChange func(childComplexity int, id *string, q *string, filter *ChangelogChangeFilterType) int ChangelogChanges func(childComplexity int, offset *int, limit *int, q *string, sort []*ChangelogChangeSortType, filter *ChangelogChangeFilterType) int Changelogs func(childComplexity int, offset *int, limit *int, q *string, sort []*ChangelogSortType, filter *ChangelogFilterType) 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, 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 GeneratedChangelogChangeResolver ¶
type GeneratedChangelogChangeResolver struct{ *GeneratedResolver }
func (*GeneratedChangelogChangeResolver) Log ¶
func (r *GeneratedChangelogChangeResolver) Log(ctx context.Context, obj *ChangelogChange) (res *Changelog, err error)
type GeneratedChangelogChangeResultTypeResolver ¶
type GeneratedChangelogChangeResultTypeResolver struct{ *GeneratedResolver }
func (*GeneratedChangelogChangeResultTypeResolver) Count ¶
func (r *GeneratedChangelogChangeResultTypeResolver) Count(ctx context.Context, obj *ChangelogChangeResultType) (count int, err error)
func (*GeneratedChangelogChangeResultTypeResolver) Items ¶
func (r *GeneratedChangelogChangeResultTypeResolver) Items(ctx context.Context, obj *ChangelogChangeResultType) (items []*ChangelogChange, err error)
type GeneratedChangelogResolver ¶
type GeneratedChangelogResolver struct{ *GeneratedResolver }
func (*GeneratedChangelogResolver) Changes ¶
func (r *GeneratedChangelogResolver) Changes(ctx context.Context, obj *Changelog) (res []*ChangelogChange, err error)
func (*GeneratedChangelogResolver) ChangesIds ¶
type GeneratedChangelogResultTypeResolver ¶
type GeneratedChangelogResultTypeResolver struct{ *GeneratedResolver }
func (*GeneratedChangelogResultTypeResolver) Count ¶
func (r *GeneratedChangelogResultTypeResolver) Count(ctx context.Context, obj *ChangelogResultType) (count int, err error)
func (*GeneratedChangelogResultTypeResolver) Items ¶
func (r *GeneratedChangelogResultTypeResolver) Items(ctx context.Context, obj *ChangelogResultType) (items []*Changelog, err error)
type GeneratedMutationResolver ¶
type GeneratedMutationResolver struct{ *GeneratedResolver }
func (*GeneratedMutationResolver) CreateChangelog ¶
func (*GeneratedMutationResolver) CreateChangelogChange ¶
func (r *GeneratedMutationResolver) CreateChangelogChange(ctx context.Context, input map[string]interface{}) (item *ChangelogChange, err error)
func (*GeneratedMutationResolver) DeleteAllChangelogChanges ¶
func (r *GeneratedMutationResolver) DeleteAllChangelogChanges(ctx context.Context) (bool, error)
func (*GeneratedMutationResolver) DeleteAllChangelogs ¶
func (r *GeneratedMutationResolver) DeleteAllChangelogs(ctx context.Context) (bool, error)
func (*GeneratedMutationResolver) DeleteChangelog ¶
func (*GeneratedMutationResolver) DeleteChangelogChange ¶
func (r *GeneratedMutationResolver) DeleteChangelogChange(ctx context.Context, id string) (item *ChangelogChange, err error)
func (*GeneratedMutationResolver) UpdateChangelog ¶
func (*GeneratedMutationResolver) UpdateChangelogChange ¶
func (r *GeneratedMutationResolver) UpdateChangelogChange(ctx context.Context, id string, input map[string]interface{}) (item *ChangelogChange, err error)
type GeneratedQueryResolver ¶
type GeneratedQueryResolver struct{ *GeneratedResolver }
func (*GeneratedQueryResolver) Changelog ¶
func (r *GeneratedQueryResolver) Changelog(ctx context.Context, id *string, q *string, filter *ChangelogFilterType) (*Changelog, error)
func (*GeneratedQueryResolver) ChangelogChange ¶
func (r *GeneratedQueryResolver) ChangelogChange(ctx context.Context, id *string, q *string, filter *ChangelogChangeFilterType) (*ChangelogChange, error)
func (*GeneratedQueryResolver) ChangelogChanges ¶
func (r *GeneratedQueryResolver) ChangelogChanges(ctx context.Context, offset *int, limit *int, q *string, sort []*ChangelogChangeSortType, filter *ChangelogChangeFilterType) (*ChangelogChangeResultType, error)
func (*GeneratedQueryResolver) Changelogs ¶
func (r *GeneratedQueryResolver) Changelogs(ctx context.Context, offset *int, limit *int, q *string, sort []*ChangelogSortType, filter *ChangelogFilterType) (*ChangelogResultType, error)
type GeneratedResolver ¶
type GeneratedResolver struct { Handlers ResolutionHandlers DB *DB EventController *events.EventController }
type GetItemsOptions ¶
type JWTClaims ¶
type JWTClaims struct { jwtgo.StandardClaims Scope *string }
func GetJWTClaimsFromContext ¶
type MutationResolver ¶
type MutationResolver interface { CreateChangelogChange(ctx context.Context, input map[string]interface{}) (*ChangelogChange, error) UpdateChangelogChange(ctx context.Context, id string, input map[string]interface{}) (*ChangelogChange, error) DeleteChangelogChange(ctx context.Context, id string) (*ChangelogChange, error) DeleteAllChangelogChanges(ctx context.Context) (bool, error) CreateChangelog(ctx context.Context, input map[string]interface{}) (*Changelog, error) UpdateChangelog(ctx context.Context, id string, input map[string]interface{}) (*Changelog, error) DeleteChangelog(ctx context.Context, id string) (*Changelog, error) DeleteAllChangelogs(ctx context.Context) (bool, error) }
type NotFoundError ¶
type NotFoundError struct {
Entity string
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
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 QueryChangelogChangeHandlerOptions ¶
type QueryChangelogChangeHandlerOptions struct { ID *string Q *string Filter *ChangelogChangeFilterType }
type QueryChangelogChangesHandlerOptions ¶
type QueryChangelogChangesHandlerOptions struct { Offset *int Limit *int Q *string Sort []*ChangelogChangeSortType Filter *ChangelogChangeFilterType }
type QueryChangelogHandlerOptions ¶
type QueryChangelogHandlerOptions struct { ID *string Q *string Filter *ChangelogFilterType }
type QueryChangelogsHandlerOptions ¶
type QueryChangelogsHandlerOptions struct { Offset *int Limit *int Q *string Sort []*ChangelogSortType Filter *ChangelogFilterType }
type QueryResolver ¶
type QueryResolver interface { ChangelogChange(ctx context.Context, id *string, q *string, filter *ChangelogChangeFilterType) (*ChangelogChange, error) ChangelogChanges(ctx context.Context, offset *int, limit *int, q *string, sort []*ChangelogChangeSortType, filter *ChangelogChangeFilterType) (*ChangelogChangeResultType, error) Changelog(ctx context.Context, id *string, q *string, filter *ChangelogFilterType) (*Changelog, error) Changelogs(ctx context.Context, offset *int, limit *int, q *string, sort []*ChangelogSortType, filter *ChangelogFilterType) (*ChangelogResultType, error) // contains filtered or unexported methods }
type ResolutionHandlers ¶
type ResolutionHandlers struct { CreateChangelogChange func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *ChangelogChange, err error) UpdateChangelogChange func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *ChangelogChange, err error) DeleteChangelogChange func(ctx context.Context, r *GeneratedResolver, id string) (item *ChangelogChange, err error) DeleteAllChangelogChanges func(ctx context.Context, r *GeneratedResolver) (bool, error) QueryChangelogChange func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogChangeHandlerOptions) (*ChangelogChange, error) QueryChangelogChanges func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogChangesHandlerOptions) (*ChangelogChangeResultType, error) ChangelogChangeLog func(ctx context.Context, r *GeneratedChangelogChangeResolver, obj *ChangelogChange) (res *Changelog, err error) CreateChangelog func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Changelog, err error) UpdateChangelog func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *Changelog, err error) DeleteChangelog func(ctx context.Context, r *GeneratedResolver, id string) (item *Changelog, err error) DeleteAllChangelogs func(ctx context.Context, r *GeneratedResolver) (bool, error) QueryChangelog func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogHandlerOptions) (*Changelog, error) QueryChangelogs func(ctx context.Context, r *GeneratedResolver, opts QueryChangelogsHandlerOptions) (*ChangelogResultType, error) ChangelogChanges func(ctx context.Context, r *GeneratedChangelogResolver, obj *Changelog) (res []*ChangelogChange, err error) }
func DefaultResolutionHandlers ¶
func DefaultResolutionHandlers() ResolutionHandlers
type ResolverRoot ¶
type ResolverRoot interface { Changelog() ChangelogResolver ChangelogChange() ChangelogChangeResolver ChangelogChangeResultType() ChangelogChangeResultTypeResolver ChangelogResultType() ChangelogResultTypeResolver Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.