common

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Int32 = graphql.NewScalar(graphql.ScalarConfig{
	Name: "Int32",
	Description: "The `Int32` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between -(2^31) and 2^31 - 1. ",
	Serialize:  coerceAnyInt,
	ParseValue: coerceAnyInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if int32Value, err := strconv.ParseInt(valueAST.Value, 10, 32); err == nil {
				return int32Value
			}
		}
		return nil
	},
})
View Source
var Int64 = graphql.NewScalar(graphql.ScalarConfig{
	Name: "Int64",
	Description: "The `Int64` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between -(2^63) and 2^63 - 1. ",
	Serialize:  coerceAnyInt,
	ParseValue: coerceAnyInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if int64Value, err := strconv.ParseInt(valueAST.Value, 10, 64); err == nil {
				return int64Value
			}
		}
		return nil
	},
})
View Source
var UInt32 = graphql.NewScalar(graphql.ScalarConfig{
	Name: "UInt32",
	Description: "The `UInt32` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between 0 and 2^63 - 1. ",
	Serialize:  coerceAnyInt,
	ParseValue: coerceAnyInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if uint32Value, err := strconv.ParseUint(valueAST.Value, 10, 32); err == nil {
				return uint32Value
			}
		}
		return nil
	},
})
View Source
var UInt64 = graphql.NewScalar(graphql.ScalarConfig{
	Name: "UInt64",
	Description: "The `UInt64` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between 0 and 2^127 - 1. ",
	Serialize:  coerceAnyInt,
	ParseValue: coerceAnyInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if uint64Value, err := strconv.ParseUint(valueAST.Value, 10, 64); err == nil {
				return uint64Value
			}
		}
		return nil
	},
})

Functions

This section is empty.

Types

type GraphqlOptions

type GraphqlOptions struct {
	GraphqlPretty bool
	GraphqlMode   string
}

func (*GraphqlOptions) IsPlayground

func (o *GraphqlOptions) IsPlayground() bool

func (*GraphqlOptions) PrepareHandlerConfig

func (o *GraphqlOptions) PrepareHandlerConfig(config *handler.Config)

type Input

type Input interface {
	Start(wg *sync.WaitGroup)
}

type Inputs

type Inputs struct {
	// contains filtered or unexported fields
}

func NewInputs

func NewInputs() *Inputs

func (*Inputs) Add

func (is *Inputs) Add(i *Input)

func (*Inputs) Start

func (is *Inputs) Start(wg *sync.WaitGroup)

type Processor

type Processor interface {
	GetUrlPattern() string
	HandleHttpRequest(w http.ResponseWriter, r *http.Request)
}

type Processors

type Processors struct {
	// contains filtered or unexported fields
}

func NewProcessors

func NewProcessors() *Processors

func (*Processors) Add

func (ps *Processors) Add(p *Processor)

func (*Processors) Items

func (ps *Processors) Items() []*Processor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL