Documentation ¶
Index ¶
- Variables
- func CentralizedError() handler.Option
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func NewHTTPServer(eventClient eventProto.EventServiceClient, ...) *web.WebServer
- func RecoverError() handler.Option
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type Event
- type GetEventOptionsInput
- type MutationResolver
- type PublishEventInput
- type PublishedStatus
- type QueryResolver
- type Resolver
- type ResolverRoot
- type Wallet
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPublishedStatus = []PublishedStatus{ PublishedStatusDraft, PublishedStatusPublished, }
View Source
var (
ErrNotFound = domain.New("NOT_FOUND", "resource was not found")
)
Functions ¶
func CentralizedError ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func NewHTTPServer ¶
func NewHTTPServer(eventClient eventProto.EventServiceClient, walletClient walletProto.WalletServiceClient, temporalClient temporalClient.Client) *web.WebServer
func RecoverError ¶
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Event struct { CreatedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int PublishedStatus func(childComplexity int) int Title func(childComplexity int) int UpdatedAt func(childComplexity int) int } Mutation struct { PublishEvent func(childComplexity int, input PublishEventInput) int } Query struct { GetEvent func(childComplexity int, eventID int64) int GetEvents func(childComplexity int, input GetEventOptionsInput) int GetWallet func(childComplexity int) int } Wallet struct { Amount func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type GetEventOptionsInput ¶
type MutationResolver ¶
type MutationResolver interface {
PublishEvent(ctx context.Context, input PublishEventInput) (*bool, error)
}
type PublishEventInput ¶
type PublishEventInput struct {
EventID int64 `json:"eventID"`
}
type PublishedStatus ¶
type PublishedStatus string
const ( PublishedStatusDraft PublishedStatus = "DRAFT" PublishedStatusPublished PublishedStatus = "PUBLISHED" )
func (PublishedStatus) IsValid ¶
func (e PublishedStatus) IsValid() bool
func (PublishedStatus) MarshalGQL ¶
func (e PublishedStatus) MarshalGQL(w io.Writer)
func (PublishedStatus) String ¶
func (e PublishedStatus) String() string
func (*PublishedStatus) UnmarshalGQL ¶
func (e *PublishedStatus) UnmarshalGQL(v interface{}) error
type QueryResolver ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver will be used to handles all business logic
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.