Documentation ¶
Index ¶
- Constants
- Variables
- func AddMutationEvent(ctx context.Context, e events.Event)
- func ApplyChanges(changes map[string]interface{}, to interface{}) error
- func DeleteAllSurveyAnswersHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
- func DeleteAllSurveysHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
- func EnrichContextWithMutations(ctx context.Context, r *GeneratedResolver) context.Context
- func FinishMutationContext(ctx context.Context, r *GeneratedResolver) (err error)
- func GetHTTPServeMux(r ResolverRoot, db *DB) *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 GetTransaction(ctx context.Context) *gorm.DB
- 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 ComplexityRoot
- type Config
- type DB
- type DirectiveRoot
- type EntityFilter
- type EntityFilterQuery
- type EntityResultType
- type EntitySort
- type GeneratedMutationResolver
- func (r *GeneratedMutationResolver) CreateSurvey(ctx context.Context, input map[string]interface{}) (item *Survey, err error)
- func (r *GeneratedMutationResolver) CreateSurveyAnswer(ctx context.Context, input map[string]interface{}) (item *SurveyAnswer, err error)
- func (r *GeneratedMutationResolver) DeleteAllSurveyAnswers(ctx context.Context) (bool, error)
- func (r *GeneratedMutationResolver) DeleteAllSurveys(ctx context.Context) (bool, error)
- func (r *GeneratedMutationResolver) DeleteSurvey(ctx context.Context, id string) (item *Survey, err error)
- func (r *GeneratedMutationResolver) DeleteSurveyAnswer(ctx context.Context, id string) (item *SurveyAnswer, err error)
- func (r *GeneratedMutationResolver) UpdateSurvey(ctx context.Context, id string, input map[string]interface{}) (item *Survey, err error)
- func (r *GeneratedMutationResolver) UpdateSurveyAnswer(ctx context.Context, id string, input map[string]interface{}) (item *SurveyAnswer, err error)
- type GeneratedQueryResolver
- func (r *GeneratedQueryResolver) Survey(ctx context.Context, id *string, q *string, filter *SurveyFilterType) (*Survey, error)
- func (r *GeneratedQueryResolver) SurveyAnswer(ctx context.Context, id *string, q *string, filter *SurveyAnswerFilterType) (*SurveyAnswer, error)
- func (r *GeneratedQueryResolver) SurveyAnswers(ctx context.Context, offset *int, limit *int, q *string, ...) (*SurveyAnswerResultType, error)
- func (r *GeneratedQueryResolver) Surveys(ctx context.Context, offset *int, limit *int, q *string, ...) (*SurveyResultType, error)
- type GeneratedResolver
- type GeneratedSurveyAnswerResolver
- type GeneratedSurveyAnswerResultTypeResolver
- type GeneratedSurveyResolver
- type GeneratedSurveyResultTypeResolver
- type GetItemsOptions
- type JWTClaims
- type MutationEvents
- type MutationResolver
- type NotFoundError
- type ObjectSortType
- type QueryResolver
- type QuerySurveyAnswerHandlerOptions
- type QuerySurveyAnswersHandlerOptions
- type QuerySurveyHandlerOptions
- type QuerySurveysHandlerOptions
- type ResolutionHandlers
- type ResolverRoot
- type Survey
- func CreateSurveyHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Survey, err error)
- func DeleteSurveyHandler(ctx context.Context, r *GeneratedResolver, id string) (item *Survey, err error)
- func QuerySurveyHandler(ctx context.Context, r *GeneratedResolver, opts QuerySurveyHandlerOptions) (*Survey, error)
- func SurveyAnswerSurveyHandler(ctx context.Context, r *GeneratedResolver, obj *SurveyAnswer) (res *Survey, err error)
- func UpdateSurveyHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *Survey, err error)
- type SurveyAnswer
- func CreateSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *SurveyAnswer, err error)
- func DeleteSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, id string) (item *SurveyAnswer, err error)
- func QuerySurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, ...) (*SurveyAnswer, error)
- func SurveyAnswersHandler(ctx context.Context, r *GeneratedResolver, obj *Survey) (res []*SurveyAnswer, err error)
- func UpdateSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, id string, ...) (item *SurveyAnswer, err error)
- type SurveyAnswerChanges
- type SurveyAnswerFilterType
- func (f *SurveyAnswerFilterType) AndWith(f2 ...*SurveyAnswerFilterType) *SurveyAnswerFilterType
- func (f *SurveyAnswerFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error
- func (f *SurveyAnswerFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error
- func (f *SurveyAnswerFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool
- func (f *SurveyAnswerFilterType) OrWith(f2 ...*SurveyAnswerFilterType) *SurveyAnswerFilterType
- func (f *SurveyAnswerFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- type SurveyAnswerQueryFilter
- type SurveyAnswerResolver
- type SurveyAnswerResultType
- type SurveyAnswerResultTypeResolver
- type SurveyAnswerSortType
- type SurveyChanges
- type SurveyExport
- type SurveyExportField
- type SurveyExportFilterType
- type SurveyExportItem
- type SurveyExportRow
- type SurveyExportValue
- type SurveyFilterType
- func (f *SurveyFilterType) AndWith(f2 ...*SurveyFilterType) *SurveyFilterType
- func (f *SurveyFilterType) Apply(ctx context.Context, dialect gorm.Dialect, wheres *[]string, ...) error
- func (f *SurveyFilterType) ApplyWithAlias(ctx context.Context, dialect gorm.Dialect, alias string, wheres *[]string, ...) error
- func (f *SurveyFilterType) IsEmpty(ctx context.Context, dialect gorm.Dialect) bool
- func (f *SurveyFilterType) OrWith(f2 ...*SurveyFilterType) *SurveyFilterType
- func (f *SurveyFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
- type SurveyQueryFilter
- type SurveyResolver
- type SurveyResultType
- type SurveyResultTypeResolver
- type SurveySortType
Constants ¶
Variables ¶
View Source
var AllObjectSortType = []ObjectSortType{ ObjectSortTypeAsc, ObjectSortTypeDesc, }
Functions ¶
func ApplyChanges ¶
used to convert map[string]interface{} to EntityChanges struct
func DeleteAllSurveyAnswersHandler ¶
func DeleteAllSurveyAnswersHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
func DeleteAllSurveysHandler ¶
func DeleteAllSurveysHandler(ctx context.Context, r *GeneratedResolver) (bool, error)
func EnrichContextWithMutations ¶
func EnrichContextWithMutations(ctx context.Context, r *GeneratedResolver) context.Context
func FinishMutationContext ¶
func FinishMutationContext(ctx context.Context, r *GeneratedResolver) (err error)
func GetHTTPServeMux ¶
func GetHTTPServeMux(r ResolverRoot, db *DB) *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 ComplexityRoot ¶
type ComplexityRoot struct { Mutation struct { CreateSurvey func(childComplexity int, input map[string]interface{}) int CreateSurveyAnswer func(childComplexity int, input map[string]interface{}) int DeleteAllSurveyAnswers func(childComplexity int) int DeleteAllSurveys func(childComplexity int) int DeleteSurvey func(childComplexity int, id string) int DeleteSurveyAnswer func(childComplexity int, id string) int UpdateSurvey func(childComplexity int, id string, input map[string]interface{}) int UpdateSurveyAnswer func(childComplexity int, id string, input map[string]interface{}) int } Query struct { Survey func(childComplexity int, id *string, q *string, filter *SurveyFilterType) int SurveyAnswer func(childComplexity int, id *string, q *string, filter *SurveyAnswerFilterType) int SurveyAnswers func(childComplexity int, offset *int, limit *int, q *string, sort []*SurveyAnswerSortType, filter *SurveyAnswerFilterType) int SurveyExport func(childComplexity int, filter *SurveyExportFilterType) int Surveys func(childComplexity int, offset *int, limit *int, q *string, sort []*SurveySortType, filter *SurveyFilterType) int // contains filtered or unexported fields } Survey struct { Answers func(childComplexity int) int AnswersIds func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } SurveyAnswer struct { Completed func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int ID func(childComplexity int) int Survey func(childComplexity int) int SurveyID func(childComplexity int) int UpdatedAt func(childComplexity int) int UpdatedBy func(childComplexity int) int } SurveyAnswerResultType struct { Count func(childComplexity int) int Items func(childComplexity int) int } SurveyExport struct { Items func(childComplexity int) int } SurveyExportField struct { Key func(childComplexity int) int Title func(childComplexity int) int } SurveyExportItem struct { Fields func(childComplexity int) int Rows func(childComplexity int) int Survey func(childComplexity int) int } SurveyExportRow struct { Answer func(childComplexity int) int Values func(childComplexity int) int } SurveyExportValue struct { Key func(childComplexity int) int Value func(childComplexity int) int } SurveyResultType struct { Count func(childComplexity int) int Items func(childComplexity int) int } // 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 GeneratedMutationResolver ¶
type GeneratedMutationResolver struct{ *GeneratedResolver }
func (*GeneratedMutationResolver) CreateSurvey ¶
func (*GeneratedMutationResolver) CreateSurveyAnswer ¶
func (r *GeneratedMutationResolver) CreateSurveyAnswer(ctx context.Context, input map[string]interface{}) (item *SurveyAnswer, err error)
func (*GeneratedMutationResolver) DeleteAllSurveyAnswers ¶
func (r *GeneratedMutationResolver) DeleteAllSurveyAnswers(ctx context.Context) (bool, error)
func (*GeneratedMutationResolver) DeleteAllSurveys ¶
func (r *GeneratedMutationResolver) DeleteAllSurveys(ctx context.Context) (bool, error)
func (*GeneratedMutationResolver) DeleteSurvey ¶
func (*GeneratedMutationResolver) DeleteSurveyAnswer ¶
func (r *GeneratedMutationResolver) DeleteSurveyAnswer(ctx context.Context, id string) (item *SurveyAnswer, err error)
func (*GeneratedMutationResolver) UpdateSurvey ¶
func (*GeneratedMutationResolver) UpdateSurveyAnswer ¶
func (r *GeneratedMutationResolver) UpdateSurveyAnswer(ctx context.Context, id string, input map[string]interface{}) (item *SurveyAnswer, err error)
type GeneratedQueryResolver ¶
type GeneratedQueryResolver struct{ *GeneratedResolver }
func (*GeneratedQueryResolver) Survey ¶
func (r *GeneratedQueryResolver) Survey(ctx context.Context, id *string, q *string, filter *SurveyFilterType) (*Survey, error)
func (*GeneratedQueryResolver) SurveyAnswer ¶
func (r *GeneratedQueryResolver) SurveyAnswer(ctx context.Context, id *string, q *string, filter *SurveyAnswerFilterType) (*SurveyAnswer, error)
func (*GeneratedQueryResolver) SurveyAnswers ¶
func (r *GeneratedQueryResolver) SurveyAnswers(ctx context.Context, offset *int, limit *int, q *string, sort []*SurveyAnswerSortType, filter *SurveyAnswerFilterType) (*SurveyAnswerResultType, error)
func (*GeneratedQueryResolver) Surveys ¶
func (r *GeneratedQueryResolver) Surveys(ctx context.Context, offset *int, limit *int, q *string, sort []*SurveySortType, filter *SurveyFilterType) (*SurveyResultType, error)
type GeneratedResolver ¶
type GeneratedResolver struct { Handlers ResolutionHandlers DB *DB EventController *events.EventController }
type GeneratedSurveyAnswerResolver ¶
type GeneratedSurveyAnswerResolver struct{ *GeneratedResolver }
func (*GeneratedSurveyAnswerResolver) Survey ¶
func (r *GeneratedSurveyAnswerResolver) Survey(ctx context.Context, obj *SurveyAnswer) (res *Survey, err error)
type GeneratedSurveyAnswerResultTypeResolver ¶
type GeneratedSurveyAnswerResultTypeResolver struct{ *GeneratedResolver }
func (*GeneratedSurveyAnswerResultTypeResolver) Count ¶
func (r *GeneratedSurveyAnswerResultTypeResolver) Count(ctx context.Context, obj *SurveyAnswerResultType) (count int, err error)
func (*GeneratedSurveyAnswerResultTypeResolver) Items ¶
func (r *GeneratedSurveyAnswerResultTypeResolver) Items(ctx context.Context, obj *SurveyAnswerResultType) (items []*SurveyAnswer, err error)
type GeneratedSurveyResolver ¶
type GeneratedSurveyResolver struct{ *GeneratedResolver }
func (*GeneratedSurveyResolver) Answers ¶
func (r *GeneratedSurveyResolver) Answers(ctx context.Context, obj *Survey) (res []*SurveyAnswer, err error)
func (*GeneratedSurveyResolver) AnswersIds ¶
type GeneratedSurveyResultTypeResolver ¶
type GeneratedSurveyResultTypeResolver struct{ *GeneratedResolver }
func (*GeneratedSurveyResultTypeResolver) Count ¶
func (r *GeneratedSurveyResultTypeResolver) Count(ctx context.Context, obj *SurveyResultType) (count int, err error)
func (*GeneratedSurveyResultTypeResolver) Items ¶
func (r *GeneratedSurveyResultTypeResolver) Items(ctx context.Context, obj *SurveyResultType) (items []*Survey, err error)
type GetItemsOptions ¶
type JWTClaims ¶
type JWTClaims struct { jwtgo.StandardClaims Scope *string }
func GetJWTClaimsFromContext ¶
type MutationEvents ¶
func GetMutationEventStore ¶
func GetMutationEventStore(ctx context.Context) *MutationEvents
type MutationResolver ¶
type MutationResolver interface { CreateSurvey(ctx context.Context, input map[string]interface{}) (*Survey, error) UpdateSurvey(ctx context.Context, id string, input map[string]interface{}) (*Survey, error) DeleteSurvey(ctx context.Context, id string) (*Survey, error) DeleteAllSurveys(ctx context.Context) (bool, error) CreateSurveyAnswer(ctx context.Context, input map[string]interface{}) (*SurveyAnswer, error) UpdateSurveyAnswer(ctx context.Context, id string, input map[string]interface{}) (*SurveyAnswer, error) DeleteSurveyAnswer(ctx context.Context, id string) (*SurveyAnswer, error) DeleteAllSurveyAnswers(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 QueryResolver ¶
type QueryResolver interface { Survey(ctx context.Context, id *string, q *string, filter *SurveyFilterType) (*Survey, error) Surveys(ctx context.Context, offset *int, limit *int, q *string, sort []*SurveySortType, filter *SurveyFilterType) (*SurveyResultType, error) SurveyAnswer(ctx context.Context, id *string, q *string, filter *SurveyAnswerFilterType) (*SurveyAnswer, error) SurveyAnswers(ctx context.Context, offset *int, limit *int, q *string, sort []*SurveyAnswerSortType, filter *SurveyAnswerFilterType) (*SurveyAnswerResultType, error) SurveyExport(ctx context.Context, filter *SurveyExportFilterType) (*SurveyExport, error) // contains filtered or unexported methods }
type QuerySurveyAnswerHandlerOptions ¶
type QuerySurveyAnswerHandlerOptions struct { ID *string Q *string Filter *SurveyAnswerFilterType }
type QuerySurveyAnswersHandlerOptions ¶
type QuerySurveyAnswersHandlerOptions struct { Offset *int Limit *int Q *string Sort []*SurveyAnswerSortType Filter *SurveyAnswerFilterType }
type QuerySurveyHandlerOptions ¶
type QuerySurveyHandlerOptions struct { ID *string Q *string Filter *SurveyFilterType }
type QuerySurveysHandlerOptions ¶
type QuerySurveysHandlerOptions struct { Offset *int Limit *int Q *string Sort []*SurveySortType Filter *SurveyFilterType }
type ResolutionHandlers ¶
type ResolutionHandlers struct { OnEvent func(ctx context.Context, r *GeneratedResolver, e *events.Event) error CreateSurvey func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *Survey, err error) UpdateSurvey func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *Survey, err error) DeleteSurvey func(ctx context.Context, r *GeneratedResolver, id string) (item *Survey, err error) DeleteAllSurveys func(ctx context.Context, r *GeneratedResolver) (bool, error) QuerySurvey func(ctx context.Context, r *GeneratedResolver, opts QuerySurveyHandlerOptions) (*Survey, error) QuerySurveys func(ctx context.Context, r *GeneratedResolver, opts QuerySurveysHandlerOptions) (*SurveyResultType, error) SurveyAnswers func(ctx context.Context, r *GeneratedResolver, obj *Survey) (res []*SurveyAnswer, err error) CreateSurveyAnswer func(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *SurveyAnswer, err error) UpdateSurveyAnswer func(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *SurveyAnswer, err error) DeleteSurveyAnswer func(ctx context.Context, r *GeneratedResolver, id string) (item *SurveyAnswer, err error) DeleteAllSurveyAnswers func(ctx context.Context, r *GeneratedResolver) (bool, error) QuerySurveyAnswer func(ctx context.Context, r *GeneratedResolver, opts QuerySurveyAnswerHandlerOptions) (*SurveyAnswer, error) QuerySurveyAnswers func(ctx context.Context, r *GeneratedResolver, opts QuerySurveyAnswersHandlerOptions) (*SurveyAnswerResultType, error) SurveyAnswerSurvey func(ctx context.Context, r *GeneratedResolver, obj *SurveyAnswer) (res *Survey, err error) }
func DefaultResolutionHandlers ¶
func DefaultResolutionHandlers() ResolutionHandlers
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Survey() SurveyResolver SurveyAnswer() SurveyAnswerResolver SurveyAnswerResultType() SurveyAnswerResultTypeResolver SurveyResultType() SurveyResultTypeResolver }
type Survey ¶
type Survey struct { ID string `json:"id" gorm:"column:id;primary_key"` Name *string `json:"name" gorm:"column:name"` Content *string `json:"content" gorm:"column:content;type:text"` 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"` Answers []*SurveyAnswer `json:"answers" gorm:"foreignkey:SurveyID"` }
func CreateSurveyHandler ¶
func DeleteSurveyHandler ¶
func QuerySurveyHandler ¶
func QuerySurveyHandler(ctx context.Context, r *GeneratedResolver, opts QuerySurveyHandlerOptions) (*Survey, error)
func SurveyAnswerSurveyHandler ¶
func SurveyAnswerSurveyHandler(ctx context.Context, r *GeneratedResolver, obj *SurveyAnswer) (res *Survey, err error)
func UpdateSurveyHandler ¶
type SurveyAnswer ¶
type SurveyAnswer struct { ID string `json:"id" gorm:"column:id;primary_key"` Completed *bool `json:"completed" gorm:"column:completed"` Content *string `json:"content" gorm:"column:content;type:text"` SurveyID *string `json:"surveyId" gorm:"column:surveyId"` 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"` Survey *Survey `json:"survey"` }
func CreateSurveyAnswerHandler ¶
func CreateSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, input map[string]interface{}) (item *SurveyAnswer, err error)
func DeleteSurveyAnswerHandler ¶
func DeleteSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, id string) (item *SurveyAnswer, err error)
func QuerySurveyAnswerHandler ¶
func QuerySurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, opts QuerySurveyAnswerHandlerOptions) (*SurveyAnswer, error)
func SurveyAnswersHandler ¶
func SurveyAnswersHandler(ctx context.Context, r *GeneratedResolver, obj *Survey) (res []*SurveyAnswer, err error)
func UpdateSurveyAnswerHandler ¶
func UpdateSurveyAnswerHandler(ctx context.Context, r *GeneratedResolver, id string, input map[string]interface{}) (item *SurveyAnswer, err error)
func (*SurveyAnswer) Is_Entity ¶
func (m *SurveyAnswer) Is_Entity()
type SurveyAnswerChanges ¶
type SurveyAnswerFilterType ¶
type SurveyAnswerFilterType struct { And []*SurveyAnswerFilterType `json:"AND"` Or []*SurveyAnswerFilterType `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"` Completed *bool `json:"completed"` CompletedNe *bool `json:"completed_ne"` CompletedGt *bool `json:"completed_gt"` CompletedLt *bool `json:"completed_lt"` CompletedGte *bool `json:"completed_gte"` CompletedLte *bool `json:"completed_lte"` CompletedIn []bool `json:"completed_in"` CompletedNull *bool `json:"completed_null"` Content *string `json:"content"` ContentNe *string `json:"content_ne"` ContentGt *string `json:"content_gt"` ContentLt *string `json:"content_lt"` ContentGte *string `json:"content_gte"` ContentLte *string `json:"content_lte"` ContentIn []string `json:"content_in"` ContentLike *string `json:"content_like"` ContentPrefix *string `json:"content_prefix"` ContentSuffix *string `json:"content_suffix"` ContentNull *bool `json:"content_null"` SurveyID *string `json:"surveyId"` SurveyIDNe *string `json:"surveyId_ne"` SurveyIDGt *string `json:"surveyId_gt"` SurveyIDLt *string `json:"surveyId_lt"` SurveyIDGte *string `json:"surveyId_gte"` SurveyIDLte *string `json:"surveyId_lte"` SurveyIDIn []string `json:"surveyId_in"` SurveyIDNull *bool `json:"surveyId_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"` Survey *SurveyFilterType `json:"survey"` }
func (*SurveyAnswerFilterType) AndWith ¶
func (f *SurveyAnswerFilterType) AndWith(f2 ...*SurveyAnswerFilterType) *SurveyAnswerFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*SurveyAnswerFilterType) ApplyWithAlias ¶
func (*SurveyAnswerFilterType) OrWith ¶
func (f *SurveyAnswerFilterType) OrWith(f2 ...*SurveyAnswerFilterType) *SurveyAnswerFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*SurveyAnswerFilterType) WhereContent ¶
func (f *SurveyAnswerFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
type SurveyAnswerQueryFilter ¶
type SurveyAnswerQueryFilter struct {
Query *string
}
type SurveyAnswerResolver ¶
type SurveyAnswerResolver interface {
Survey(ctx context.Context, obj *SurveyAnswer) (*Survey, error)
}
type SurveyAnswerResultType ¶
type SurveyAnswerResultType struct {
EntityResultType
}
func QuerySurveyAnswersHandler ¶
func QuerySurveyAnswersHandler(ctx context.Context, r *GeneratedResolver, opts QuerySurveyAnswersHandlerOptions) (*SurveyAnswerResultType, error)
type SurveyAnswerResultTypeResolver ¶
type SurveyAnswerResultTypeResolver interface { Items(ctx context.Context, obj *SurveyAnswerResultType) ([]*SurveyAnswer, error) Count(ctx context.Context, obj *SurveyAnswerResultType) (int, error) }
type SurveyAnswerSortType ¶
type SurveyAnswerSortType struct { ID *ObjectSortType `json:"id"` Completed *ObjectSortType `json:"completed"` Content *ObjectSortType `json:"content"` SurveyID *ObjectSortType `json:"surveyId"` UpdatedAt *ObjectSortType `json:"updatedAt"` CreatedAt *ObjectSortType `json:"createdAt"` UpdatedBy *ObjectSortType `json:"updatedBy"` CreatedBy *ObjectSortType `json:"createdBy"` Survey *SurveySortType `json:"survey"` }
type SurveyChanges ¶
type SurveyExport ¶
type SurveyExport struct {
Items []*SurveyExportItem `json:"items"`
}
type SurveyExportField ¶
type SurveyExportFilterType ¶
type SurveyExportItem ¶
type SurveyExportItem struct { Survey *Survey `json:"survey"` Fields []*SurveyExportField `json:"fields"` Rows []*SurveyExportRow `json:"rows"` }
type SurveyExportRow ¶
type SurveyExportRow struct { Answer *SurveyAnswer `json:"answer"` Values []*SurveyExportValue `json:"values"` }
type SurveyExportValue ¶
type SurveyFilterType ¶
type SurveyFilterType struct { And []*SurveyFilterType `json:"AND"` Or []*SurveyFilterType `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"` Name *string `json:"name"` NameNe *string `json:"name_ne"` NameGt *string `json:"name_gt"` NameLt *string `json:"name_lt"` NameGte *string `json:"name_gte"` NameLte *string `json:"name_lte"` NameIn []string `json:"name_in"` NameLike *string `json:"name_like"` NamePrefix *string `json:"name_prefix"` NameSuffix *string `json:"name_suffix"` NameNull *bool `json:"name_null"` Content *string `json:"content"` ContentNe *string `json:"content_ne"` ContentGt *string `json:"content_gt"` ContentLt *string `json:"content_lt"` ContentGte *string `json:"content_gte"` ContentLte *string `json:"content_lte"` ContentIn []string `json:"content_in"` ContentLike *string `json:"content_like"` ContentPrefix *string `json:"content_prefix"` ContentSuffix *string `json:"content_suffix"` ContentNull *bool `json:"content_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"` Answers *SurveyAnswerFilterType `json:"answers"` }
func (*SurveyFilterType) AndWith ¶
func (f *SurveyFilterType) AndWith(f2 ...*SurveyFilterType) *SurveyFilterType
AndWith convenience method for combining two or more filters with AND statement
func (*SurveyFilterType) ApplyWithAlias ¶
func (*SurveyFilterType) OrWith ¶
func (f *SurveyFilterType) OrWith(f2 ...*SurveyFilterType) *SurveyFilterType
OrWith convenience method for combining two or more filters with OR statement
func (*SurveyFilterType) WhereContent ¶
func (f *SurveyFilterType) WhereContent(dialect gorm.Dialect, aliasPrefix string) (conditions []string, values []interface{})
type SurveyQueryFilter ¶
type SurveyQueryFilter struct {
Query *string
}
type SurveyResolver ¶
type SurveyResultType ¶
type SurveyResultType struct {
EntityResultType
}
func QuerySurveysHandler ¶
func QuerySurveysHandler(ctx context.Context, r *GeneratedResolver, opts QuerySurveysHandlerOptions) (*SurveyResultType, error)
type SurveyResultTypeResolver ¶
type SurveyResultTypeResolver interface { Items(ctx context.Context, obj *SurveyResultType) ([]*Survey, error) Count(ctx context.Context, obj *SurveyResultType) (int, error) }
type SurveySortType ¶
type SurveySortType struct { ID *ObjectSortType `json:"id"` Name *ObjectSortType `json:"name"` Content *ObjectSortType `json:"content"` UpdatedAt *ObjectSortType `json:"updatedAt"` CreatedAt *ObjectSortType `json:"createdAt"` UpdatedBy *ObjectSortType `json:"updatedBy"` CreatedBy *ObjectSortType `json:"createdBy"` AnswersIds *ObjectSortType `json:"answersIds"` Answers *SurveyAnswerSortType `json:"answers"` }
Click to show internal directories.
Click to hide internal directories.