Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type CurrencyResolver
- type DirectiveRoot
- type EntityResolver
- type GlobalResolver
- type LocaleResolver
- type MutationResolver
- type PlaceResolver
- type QueryResolver
- type RelationshipResolver
- type Resolver
- func (r *Resolver) Currency() CurrencyResolver
- func (r *Resolver) Entity() EntityResolver
- func (r *Resolver) Global() GlobalResolver
- func (r *Resolver) Locale() LocaleResolver
- func (r *Resolver) Mutation() MutationResolver
- func (r *Resolver) Place() PlaceResolver
- func (r *Resolver) Query() QueryResolver
- func (r *Resolver) Relationship() RelationshipResolver
- func (r *Resolver) Term() TermResolver
- func (r *Resolver) Timezone() TimezoneResolver
- func (r *Resolver) User() UserResolver
- func (r *Resolver) Webhook() WebhookResolver
- type ResolverRoot
- type TermResolver
- type TimezoneResolver
- type UserResolver
- type WebhookResolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownType = errors.New("unknown type") ErrTypeNotFound = errors.New("type not found") )
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Currencies struct { Count func(childComplexity int) int Data func(childComplexity int) int } Currency struct { Code func(childComplexity int) int Created func(childComplexity int) int Decimal func(childComplexity int) int ID func(childComplexity int) int Locale func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Order func(childComplexity int) int Precision func(childComplexity int) int Rate func(childComplexity int) int Symbol func(childComplexity int) int Thousand func(childComplexity int) int Updated func(childComplexity int) int } Entity struct { FindPlaceByID func(childComplexity int, id string) int FindTermByID func(childComplexity int, id string) int FindUserByID func(childComplexity int, id string) int } Global struct { Created func(childComplexity int) int ID func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Status func(childComplexity int) int Updated func(childComplexity int) int } Globals struct { Count func(childComplexity int) int Data func(childComplexity int) int } Locale struct { Code func(childComplexity int) int Created func(childComplexity int) int ID func(childComplexity int) int Locale func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Order func(childComplexity int) int Updated func(childComplexity int) int } Locales struct { Count func(childComplexity int) int Data func(childComplexity int) int } Location struct { Lat func(childComplexity int) int Lng func(childComplexity int) int } Mutation struct { CreateCurrency func(childComplexity int, input model.NewCurrency) int CreateGlobal func(childComplexity int, input model.NewGlobal) int CreateLocale func(childComplexity int, input model.NewLocale) int CreateLocation func(childComplexity int, input model.NewLocation) int CreateTerm func(childComplexity int, input model.NewTerm) int CreateTimezone func(childComplexity int, input model.NewTimezone) int CreateWebhook func(childComplexity int, input model.NewWebhook) int DeleteCurrencies func(childComplexity int, ids []string) int DeleteCurrency func(childComplexity int, id string) int DeleteGlobal func(childComplexity int, id string) int DeleteGlobals func(childComplexity int, ids []string) int DeleteLocale func(childComplexity int, id string) int DeleteLocales func(childComplexity int, ids []string) int DeleteLocation func(childComplexity int, id string) int DeleteLocations func(childComplexity int, ids []string) int DeleteTerm func(childComplexity int, id string) int DeleteTerms func(childComplexity int, ids []string) int DeleteTimezone func(childComplexity int, id string) int DeleteTimezones func(childComplexity int, ids []string) int DeleteWebhook func(childComplexity int, id string) int DeleteWebhooks func(childComplexity int, ids []string) int ImportTimezones func(childComplexity int, file string) int UpdateCurrency func(childComplexity int, id string, input *model.UpdateCurrency) int UpdateGlobal func(childComplexity int, id string, input model.UpdateGlobal) int UpdateLocale func(childComplexity int, id string, input model.UpdateLocale) int UpdateLocation func(childComplexity int, id string, input model.UpdateLocation) int UpdateTerm func(childComplexity int, id string, input model.UpdateTerm) int UpdateTimezone func(childComplexity int, id string, input model.UpdateTimezone) int UpdateWebhook func(childComplexity int, id string, input model.UpdateWebhook) int } Place struct { Created func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Locale func(childComplexity int) int Location func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Order func(childComplexity int) int Parent func(childComplexity int) int Popular func(childComplexity int) int Reviewable func(childComplexity int) int Slug func(childComplexity int) int Status func(childComplexity int) int Type func(childComplexity int) int Updated func(childComplexity int) int } Places struct { Count func(childComplexity int) int Data func(childComplexity int) int } Query struct { Country func(childComplexity int, code string) int Currencies func(childComplexity int, stages map[string]interface{}) int Currency func(childComplexity int, code string) int Global func(childComplexity int, name string) int Globals func(childComplexity int, stages map[string]interface{}) int Locale func(childComplexity int, code string) int Locales func(childComplexity int, stages map[string]interface{}) int Place func(childComplexity int, id string) int Places func(childComplexity int, stages map[string]interface{}) int Term func(childComplexity int, id string) int Terms func(childComplexity int, stages map[string]interface{}) int Timezone func(childComplexity int, id string) int Timezones func(childComplexity int, stages map[string]interface{}) int Webhook func(childComplexity int, id string) int Webhooks func(childComplexity int, stages map[string]interface{}) int // contains filtered or unexported fields } Relationship struct { Created func(childComplexity int) int ID func(childComplexity int) int Metadata func(childComplexity int) int Object func(childComplexity int) int Order func(childComplexity int) int Status func(childComplexity int) int Target func(childComplexity int) int Updated func(childComplexity int) int } Term struct { Children func(childComplexity int) int Count func(childComplexity int) int Created func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Locale func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Order func(childComplexity int) int Parent func(childComplexity int) int Slug func(childComplexity int) int Type func(childComplexity int) int Updated func(childComplexity int) int } Terms struct { Count func(childComplexity int) int Data func(childComplexity int) int } Timezone struct { Created func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Locale func(childComplexity int) int Metadata func(childComplexity int) int Name func(childComplexity int) int Offset func(childComplexity int) int Updated func(childComplexity int) int } Timezones struct { Count func(childComplexity int) int Data func(childComplexity int) int } User struct { ID func(childComplexity int) int Webhooks func(childComplexity int) int } Webhook struct { CreatedBy func(childComplexity int) int Events func(childComplexity int) int Headers func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int URL func(childComplexity int) int UpdatedBy func(childComplexity int) int } WebhookEvent struct { Actions func(childComplexity int) int ObjectID func(childComplexity int) int ObjectType func(childComplexity int) int } WebhookHeader struct { Key func(childComplexity int) int Value func(childComplexity int) int } Webhooks struct { Count func(childComplexity int) int Data func(childComplexity int) int } // contains filtered or unexported fields }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type CurrencyResolver ¶
type CurrencyResolver interface { ID(ctx context.Context, obj *model.Currency) (string, error) Name(ctx context.Context, obj *model.Currency) (string, error) Metadata(ctx context.Context, obj *model.Currency) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Currency) (string, error) Updated(ctx context.Context, obj *model.Currency) (string, error) }
type DirectiveRoot ¶
type DirectiveRoot struct { Api func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) Auth func(ctx context.Context, obj interface{}, next graphql.Resolver, roles []string) (res interface{}, err error) ComposeDirective func(ctx context.Context, obj interface{}, next graphql.Resolver, name string) (res interface{}, err error) HasScope func(ctx context.Context, obj interface{}, next graphql.Resolver, scope []string) (res interface{}, err error) InterfaceObject func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) }
type EntityResolver ¶
type GlobalResolver ¶
type GlobalResolver interface { ID(ctx context.Context, obj *model.Global) (string, error) Metadata(ctx context.Context, obj *model.Global) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Global) (string, error) Updated(ctx context.Context, obj *model.Global) (string, error) }
type LocaleResolver ¶
type LocaleResolver interface { ID(ctx context.Context, obj *model.Locale) (string, error) Name(ctx context.Context, obj *model.Locale) (string, error) Metadata(ctx context.Context, obj *model.Locale) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Locale) (string, error) Updated(ctx context.Context, obj *model.Locale) (string, error) }
type MutationResolver ¶
type MutationResolver interface { CreateCurrency(ctx context.Context, input model.NewCurrency) (*model.Currency, error) UpdateCurrency(ctx context.Context, id string, input *model.UpdateCurrency) (*model.Currency, error) DeleteCurrency(ctx context.Context, id string) (map[string]interface{}, error) DeleteCurrencies(ctx context.Context, ids []string) (map[string]interface{}, error) CreateGlobal(ctx context.Context, input model.NewGlobal) (*model.Global, error) UpdateGlobal(ctx context.Context, id string, input model.UpdateGlobal) (*model.Global, error) DeleteGlobal(ctx context.Context, id string) (map[string]interface{}, error) DeleteGlobals(ctx context.Context, ids []string) (map[string]interface{}, error) CreateLocale(ctx context.Context, input model.NewLocale) (*model.Locale, error) UpdateLocale(ctx context.Context, id string, input model.UpdateLocale) (*model.Locale, error) DeleteLocale(ctx context.Context, id string) (map[string]interface{}, error) DeleteLocales(ctx context.Context, ids []string) (map[string]interface{}, error) CreateLocation(ctx context.Context, input model.NewLocation) (*model.Place, error) UpdateLocation(ctx context.Context, id string, input model.UpdateLocation) (*model.Place, error) DeleteLocation(ctx context.Context, id string) (*bool, error) DeleteLocations(ctx context.Context, ids []string) (*bool, error) CreateTerm(ctx context.Context, input model.NewTerm) (*model.Term, error) UpdateTerm(ctx context.Context, id string, input model.UpdateTerm) (*model.Term, error) DeleteTerm(ctx context.Context, id string) (map[string]interface{}, error) DeleteTerms(ctx context.Context, ids []string) (map[string]interface{}, error) CreateTimezone(ctx context.Context, input model.NewTimezone) (*model.Timezone, error) UpdateTimezone(ctx context.Context, id string, input model.UpdateTimezone) (*model.Timezone, error) ImportTimezones(ctx context.Context, file string) ([]*model.Timezone, error) DeleteTimezone(ctx context.Context, id string) (map[string]interface{}, error) DeleteTimezones(ctx context.Context, ids []string) (map[string]interface{}, error) CreateWebhook(ctx context.Context, input model.NewWebhook) (*model.Webhook, error) UpdateWebhook(ctx context.Context, id string, input model.UpdateWebhook) (*model.Webhook, error) DeleteWebhook(ctx context.Context, id string) (map[string]interface{}, error) DeleteWebhooks(ctx context.Context, ids []string) (map[string]interface{}, error) }
type PlaceResolver ¶
type PlaceResolver interface { ID(ctx context.Context, obj *model.Place) (string, error) Parent(ctx context.Context, obj *model.Place) (*model.Place, error) Name(ctx context.Context, obj *model.Place) (string, error) Description(ctx context.Context, obj *model.Place) (*string, error) Metadata(ctx context.Context, obj *model.Place) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Place) (string, error) Updated(ctx context.Context, obj *model.Place) (string, error) }
type QueryResolver ¶
type QueryResolver interface { Currency(ctx context.Context, code string) (*model.Currency, error) Currencies(ctx context.Context, stages map[string]interface{}) (*model.Currencies, error) Global(ctx context.Context, name string) (*model.Global, error) Globals(ctx context.Context, stages map[string]interface{}) (*model.Globals, error) Locales(ctx context.Context, stages map[string]interface{}) (*model.Locales, error) Locale(ctx context.Context, code string) (*model.Locale, error) Place(ctx context.Context, id string) (*model.Place, error) Country(ctx context.Context, code string) (*model.Place, error) Places(ctx context.Context, stages map[string]interface{}) (*model.Places, error) Term(ctx context.Context, id string) (*model.Term, error) Terms(ctx context.Context, stages map[string]interface{}) (*model.Terms, error) Timezones(ctx context.Context, stages map[string]interface{}) (*model.Timezones, error) Timezone(ctx context.Context, id string) (*model.Timezone, error) Webhooks(ctx context.Context, stages map[string]interface{}) ([]*model.Webhook, error) Webhook(ctx context.Context, id string) (*model.Webhook, error) }
type RelationshipResolver ¶
type RelationshipResolver interface { ID(ctx context.Context, obj *model.Relationship) (string, error) Object(ctx context.Context, obj *model.Relationship) (map[string]interface{}, error) Target(ctx context.Context, obj *model.Relationship) (map[string]interface{}, error) Metadata(ctx context.Context, obj *model.Relationship) (map[string]interface{}, error) Status(ctx context.Context, obj *model.Relationship) (*string, error) Created(ctx context.Context, obj *model.Relationship) (string, error) Updated(ctx context.Context, obj *model.Relationship) (string, error) }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func (*Resolver) Currency ¶
func (r *Resolver) Currency() CurrencyResolver
Currency returns CurrencyResolver implementation.
func (*Resolver) Entity ¶
func (r *Resolver) Entity() EntityResolver
Entity returns EntityResolver implementation.
func (*Resolver) Global ¶
func (r *Resolver) Global() GlobalResolver
Global returns GlobalResolver implementation.
func (*Resolver) Locale ¶
func (r *Resolver) Locale() LocaleResolver
Locale returns LocaleResolver implementation.
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Place ¶
func (r *Resolver) Place() PlaceResolver
Place returns PlaceResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Relationship ¶
func (r *Resolver) Relationship() RelationshipResolver
Relationship returns RelationshipResolver implementation.
func (*Resolver) Term ¶
func (r *Resolver) Term() TermResolver
Term returns TermResolver implementation.
func (*Resolver) Timezone ¶
func (r *Resolver) Timezone() TimezoneResolver
Timezone returns TimezoneResolver implementation.
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
User returns UserResolver implementation.
func (*Resolver) Webhook ¶
func (r *Resolver) Webhook() WebhookResolver
Webhook returns WebhookResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Currency() CurrencyResolver Entity() EntityResolver Global() GlobalResolver Locale() LocaleResolver Mutation() MutationResolver Place() PlaceResolver Query() QueryResolver Relationship() RelationshipResolver Term() TermResolver Timezone() TimezoneResolver User() UserResolver Webhook() WebhookResolver }
type TermResolver ¶
type TermResolver interface { ID(ctx context.Context, obj *model.Term) (string, error) Parent(ctx context.Context, obj *model.Term) (*model.Term, error) Children(ctx context.Context, obj *model.Term) ([]*model.Term, error) Name(ctx context.Context, obj *model.Term) (string, error) Description(ctx context.Context, obj *model.Term) (*string, error) Metadata(ctx context.Context, obj *model.Term) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Term) (string, error) Updated(ctx context.Context, obj *model.Term) (string, error) }
type TimezoneResolver ¶
type TimezoneResolver interface { ID(ctx context.Context, obj *model.Timezone) (string, error) Name(ctx context.Context, obj *model.Timezone) (string, error) Metadata(ctx context.Context, obj *model.Timezone) (map[string]interface{}, error) Created(ctx context.Context, obj *model.Timezone) (string, error) Updated(ctx context.Context, obj *model.Timezone) (string, error) }
type UserResolver ¶
type WebhookResolver ¶
type WebhookResolver interface { ID(ctx context.Context, obj *model.Webhook) (string, error) Headers(ctx context.Context, obj *model.Webhook) ([]*model.WebhookHeader, error) Events(ctx context.Context, obj *model.Webhook) ([]*model.WebhookEvent, error) CreatedBy(ctx context.Context, obj *model.Webhook) (*string, error) UpdatedBy(ctx context.Context, obj *model.Webhook) (*string, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.