types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package types defines the different interfaces used in the GraphQL implementation

Package types defines the different interfaces used in the GraphQL implementation

Package types defines the different interfaces used in the GraphQL implementation

Package types defines the different interfaces used in the GraphQL implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolverCreatorContract

type ResolverCreatorContract interface {
	// NewRootResolver creates new RootResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// Returns the RootResolverContract or error if something goes wrong
	NewRootResolver(ctx context.Context) (RootResolverContract, error)

	// NewUserResolver creates new UserResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// userID: Mandatory. The user unique identifier
	// Returns the UserResolverContract or error if something goes wrong
	NewUserResolver(
		ctx context.Context,
		userID string) (UserResolverContract, error)

	relay.PageInfoResolverCreatorContract
	tenant.QueryResolverCreatorContract
	tenant.MutationResolverCreatorContract
	edgecluster.QueryResolverCreatorContract
	edgecluster.MutationResolverCreatorContract
}

ResolverCreatorContract declares the service that can create different resolvers

type RootResolverContract

type RootResolverContract interface {
	// User returns user resolver
	// ctx: Mandatory. Reference to the context
	// Returns the user resolver or error if something goes wrong
	User(ctx context.Context) (UserResolverContract, error)

	tenant.RootResolverContract
	edgecluster.RootResolverContract
}

RootResolverContract declares the root resolver

type SortingOptionPair

type SortingOptionPair struct {
	Name      string
	Direction string
}

type UserEdgeClusterInputArgument

type UserEdgeClusterInputArgument struct {
	EdgeClusterID graphql.ID
}

type UserEdgeClustersInputArgument

type UserEdgeClustersInputArgument struct {
	relay.ConnectionArgument
	SortingOptions *[]SortingOptionPair
	EdgeClusterIDs *[]graphql.ID
	TenantIDs      *[]graphql.ID
}

type UserResolverContract

type UserResolverContract interface {
	// ID returns user unique identifier
	// ctx: Mandatory. Reference to the context
	// Returns the user unique identifier
	ID(ctx context.Context) graphql.ID

	// Tenant returns tenant resolver
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. The argument list
	// Returns the tenant resolver or error if something goes wrong
	Tenant(
		ctx context.Context,
		args UserTenantInputArgument) (tenant.TenantResolverContract, error)

	// Tenants returns tenant connection compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. The argument list
	// Returns the tenant resolver or error if something goes wrong
	Tenants(
		ctx context.Context,
		args UserTenantsInputArgument) (tenant.TenantTypeConnectionResolverContract, error)

	// EdgeCluster returns tenant resolver
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. The argument list
	// Returns the tenant resolver or error if something goes wrong
	EdgeCluster(
		ctx context.Context,
		args UserEdgeClusterInputArgument) (edgecluster.EdgeClusterResolverContract, error)

	// EdgeClusters returns tenant connection compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. The argument list
	// Returns the tenant resolver or error if something goes wrong
	EdgeClusters(
		ctx context.Context,
		args UserEdgeClustersInputArgument) (edgecluster.EdgeClusterTypeConnectionResolverContract, error)
}

UserResolverContract declares the resolver that can retrieve user information

type UserTenantInputArgument

type UserTenantInputArgument struct {
	TenantID string
}

type UserTenantsInputArgument

type UserTenantsInputArgument struct {
	relay.ConnectionArgument
	SortingOptions *[]SortingOptionPair
	TenantIDs      *[]graphql.ID
}

Directories

Path Synopsis
packae edgecluster implements used edge cluster related types in the GraphQL transport layer packae edgecluster implements used edge cluster related types in the GraphQL transport layer packae edgecluster implements used edge cluster related types in the GraphQL transport layer
packae edgecluster implements used edge cluster related types in the GraphQL transport layer packae edgecluster implements used edge cluster related types in the GraphQL transport layer packae edgecluster implements used edge cluster related types in the GraphQL transport layer
packae relay implements common relay types used in the GraphQL transport layer packae relay implements common relay types used in the GraphQL transport layer
packae relay implements common relay types used in the GraphQL transport layer packae relay implements common relay types used in the GraphQL transport layer
packae tenant implements used tenant related types in the GraphQL transport layer packae tenant implements used tenant related types in the GraphQL transport layer packae tenant implements used tenant related types in the GraphQL transport layer
packae tenant implements used tenant related types in the GraphQL transport layer packae tenant implements used tenant related types in the GraphQL transport layer packae tenant implements used tenant related types in the GraphQL transport layer

Jump to

Keyboard shortcuts

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