Documentation ¶
Index ¶
- Constants
- Variables
- func NewCalBackend(codec runtime.Codec, copier runtime.ObjectCopier, ...) backend.Interface
- type Argument
- type Field
- type FragName
- type Fragment
- type GqlDirective
- type GqlParameter
- type GraphQLBody
- type GraphQLDirective
- type ObjectBody
- type Transformer
- func (t *Transformer) BackendTransformerInitializer(c backend.Config) error
- func (t *Transformer) NewGraphQLBody(verb Verb) (*GraphQLBody, error)
- func (a *Transformer) TransformFromBackend(ctx context.Context, data string) (string, error)
- func (t *Transformer) TransformToBackend(ctx context.Context, data string) (string, error)
- type Variable
- type Verb
Constants ¶
View Source
const ( GQLKIND graphQLType = "Kind" GQLAPIVERSION graphQLType = "ApiVersion" GQLMETADATA graphQLType = "Metadata" GQLSPEC graphQLType = "Spec" GQLSTATUS graphQLType = "Status" GQLACCOUNT graphQLType = "Account" )
View Source
const ( NAME graphqlEnum = iota NAMESPACE UID RESOURCEVERSION CREATETIMESTAMP DELETETIMESTAMP LABELS ANNOTATIONS CLUSTERNAME )
Sub-fields of GraphQL type METADATA; aligns closely to ObjectMeta in apimachinery/pkg/apigroups/meta/v1/types.go
View Source
const ( NULLABLE nullable = "" NON_NULLABLE nullable = "!" )
Variables ¶
View Source
var DefaultTransformer backend.BackendTransformer = defaultTransformer{}
View Source
var MetadataMap = gqlStringMap{ NAME: "Name", NAMESPACE: "Namespace", UID: "Uid", RESOURCEVERSION: "ResourceVersion", CREATETIMESTAMP: "CreateTimestamp", DELETETIMESTAMP: "DeleteTimestamp", LABELS: "Labels", ANNOTATIONS: "Annotations", CLUSTERNAME: "ClusterName", }
Functions ¶
func NewCalBackend ¶
func NewCalBackend(codec runtime.Codec, copier runtime.ObjectCopier, transformer backend.BackendTransformer) backend.Interface
Types ¶
type Field ¶
type Field struct { FieldName Argument FieldArguments map[string]interface{} GraphQLDirective map[GqlDirective]Variable SubFields []*Field InlineFrags map[graphQLType][]graphqlEnum }
type GqlDirective ¶
type GqlDirective string
const ( INCLUDE GqlDirective = "@include" SKIP GqlDirective = "@skip" )
type GqlParameter ¶
type GqlParameter struct { GqlType graphQLType GqlTypeNullable nullable }
type GraphQLBody ¶
type GraphQLBody struct { OpKeyword opKeyword FuncName string Parameters map[Variable]GqlParameter OpBody ObjectBody }
type GraphQLDirective ¶
type GraphQLDirective struct { Directive GqlDirective DirectiveBool Variable // referenced value must resolve to boolean type }
type ObjectBody ¶
type Transformer ¶
type Transformer struct { Resource string // registered API resource SingularResource string GraphQLBodies map[Verb]*GraphQLBody }
func NewCalResourceTransformer ¶
func NewCalResourceTransformer(resource string) *Transformer
func (*Transformer) BackendTransformerInitializer ¶
func (t *Transformer) BackendTransformerInitializer(c backend.Config) error
func (*Transformer) NewGraphQLBody ¶
func (t *Transformer) NewGraphQLBody(verb Verb) (*GraphQLBody, error)
func (*Transformer) TransformFromBackend ¶
func (*Transformer) TransformToBackend ¶
Click to show internal directories.
Click to hide internal directories.