gqlschema

package
v0.0.0-...-1c44903 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type AWSProviderConfig

type AWSProviderConfig struct {
	Zone         *string `json:"zone"`
	VpcCidr      *string `json:"vpcCidr"`
	PublicCidr   *string `json:"publicCidr"`
	InternalCidr *string `json:"internalCidr"`
}

func (AWSProviderConfig) IsProviderSpecificConfig

func (AWSProviderConfig) IsProviderSpecificConfig()

type AWSProviderConfigInput

type AWSProviderConfigInput struct {
	Zone         string `json:"zone"`
	VpcCidr      string `json:"vpcCidr"`
	PublicCidr   string `json:"publicCidr"`
	InternalCidr string `json:"internalCidr"`
}

type AzureProviderConfig

type AzureProviderConfig struct {
	VnetCidr *string  `json:"vnetCidr"`
	Zones    []string `json:"zones"`
}

func (AzureProviderConfig) IsProviderSpecificConfig

func (AzureProviderConfig) IsProviderSpecificConfig()

type AzureProviderConfigInput

type AzureProviderConfigInput struct {
	VnetCidr string   `json:"vnetCidr"`
	Zones    []string `json:"zones"`
}

type ClusterConfigInput

type ClusterConfigInput struct {
	GardenerConfig *GardenerConfigInput `json:"gardenerConfig"`
}

type ComplexityRoot

type ComplexityRoot struct {
	AWSProviderConfig struct {
		InternalCidr func(childComplexity int) int
		PublicCidr   func(childComplexity int) int
		VpcCidr      func(childComplexity int) int
		Zone         func(childComplexity int) int
	}

	AzureProviderConfig struct {
		VnetCidr func(childComplexity int) int
		Zones    func(childComplexity int) int
	}

	ComponentConfiguration struct {
		Component     func(childComplexity int) int
		Configuration func(childComplexity int) int
		Namespace     func(childComplexity int) int
		SourceURL     func(childComplexity int) int
	}

	ConfigEntry struct {
		Key    func(childComplexity int) int
		Secret func(childComplexity int) int
		Value  func(childComplexity int) int
	}

	Error struct {
		Message func(childComplexity int) int
	}

	GCPProviderConfig struct {
		Zones func(childComplexity int) int
	}

	GardenerConfig struct {
		AutoScalerMax          func(childComplexity int) int
		AutoScalerMin          func(childComplexity int) int
		DiskType               func(childComplexity int) int
		KubernetesVersion      func(childComplexity int) int
		LicenceType            func(childComplexity int) int
		MachineType            func(childComplexity int) int
		MaxSurge               func(childComplexity int) int
		MaxUnavailable         func(childComplexity int) int
		Name                   func(childComplexity int) int
		Provider               func(childComplexity int) int
		ProviderSpecificConfig func(childComplexity int) int
		Purpose                func(childComplexity int) int
		Region                 func(childComplexity int) int
		Seed                   func(childComplexity int) int
		TargetSecret           func(childComplexity int) int
		VolumeSizeGb           func(childComplexity int) int
		WorkerCidr             func(childComplexity int) int
	}

	KymaConfig struct {
		Components    func(childComplexity int) int
		Configuration func(childComplexity int) int
		Version       func(childComplexity int) int
	}

	Mutation struct {
		DeprovisionRuntime       func(childComplexity int, id string) int
		ProvisionRuntime         func(childComplexity int, config ProvisionRuntimeInput) int
		ReconnectRuntimeAgent    func(childComplexity int, id string) int
		RollBackUpgradeOperation func(childComplexity int, id string) int
		UpgradeRuntime           func(childComplexity int, id string, config UpgradeRuntimeInput) int
	}

	OperationStatus struct {
		ID        func(childComplexity int) int
		Message   func(childComplexity int) int
		Operation func(childComplexity int) int
		RuntimeID func(childComplexity int) int
		State     func(childComplexity int) int
	}

	Query struct {
		RuntimeOperationStatus func(childComplexity int, id string) int
		RuntimeStatus          func(childComplexity int, id string) int
	}

	RuntimeConfig struct {
		ClusterConfig func(childComplexity int) int
		Kubeconfig    func(childComplexity int) int
		KymaConfig    func(childComplexity int) int
	}

	RuntimeConnectionStatus struct {
		Errors func(childComplexity int) int
		Status func(childComplexity int) int
	}

	RuntimeStatus struct {
		LastOperationStatus     func(childComplexity int) int
		RuntimeConfiguration    func(childComplexity int) int
		RuntimeConnectionStatus func(childComplexity int) int
	}
}

type ComponentConfiguration

type ComponentConfiguration struct {
	Component     string         `json:"component"`
	Namespace     string         `json:"namespace"`
	Configuration []*ConfigEntry `json:"configuration"`
	SourceURL     *string        `json:"sourceURL"`
}

type ComponentConfigurationInput

type ComponentConfigurationInput struct {
	Component     string              `json:"component"`
	Namespace     string              `json:"namespace"`
	Configuration []*ConfigEntryInput `json:"configuration"`
	SourceURL     *string             `json:"sourceURL"`
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type ConfigEntry

type ConfigEntry struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Secret *bool  `json:"secret"`
}

type ConfigEntryInput

type ConfigEntryInput struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Secret *bool  `json:"secret"`
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Error

type Error struct {
	Message *string `json:"message"`
}

type GCPProviderConfig

type GCPProviderConfig struct {
	Zones []string `json:"zones"`
}

func (GCPProviderConfig) IsProviderSpecificConfig

func (GCPProviderConfig) IsProviderSpecificConfig()

type GCPProviderConfigInput

type GCPProviderConfigInput struct {
	Zones []string `json:"zones"`
}

type GardenerConfig

type GardenerConfig struct {
	Name                   *string                `json:"name"`
	KubernetesVersion      *string                `json:"kubernetesVersion"`
	VolumeSizeGb           *int                   `json:"volumeSizeGB"`
	MachineType            *string                `json:"machineType"`
	Region                 *string                `json:"region"`
	Provider               *string                `json:"provider"`
	Purpose                *string                `json:"purpose"`
	LicenceType            *string                `json:"licenceType"`
	Seed                   *string                `json:"seed"`
	TargetSecret           *string                `json:"targetSecret"`
	DiskType               *string                `json:"diskType"`
	WorkerCidr             *string                `json:"workerCidr"`
	AutoScalerMin          *int                   `json:"autoScalerMin"`
	AutoScalerMax          *int                   `json:"autoScalerMax"`
	MaxSurge               *int                   `json:"maxSurge"`
	MaxUnavailable         *int                   `json:"maxUnavailable"`
	ProviderSpecificConfig ProviderSpecificConfig `json:"providerSpecificConfig"`
}

func (*GardenerConfig) UnmarshalJSON

func (g *GardenerConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON is used to handle unmarshaling ProviderSpecificConfig interface properly

type GardenerConfigInput

type GardenerConfigInput struct {
	KubernetesVersion      string                 `json:"kubernetesVersion"`
	VolumeSizeGb           int                    `json:"volumeSizeGB"`
	MachineType            string                 `json:"machineType"`
	Region                 string                 `json:"region"`
	Provider               string                 `json:"provider"`
	Purpose                *string                `json:"purpose"`
	LicenceType            *string                `json:"licenceType"`
	TargetSecret           string                 `json:"targetSecret"`
	DiskType               string                 `json:"diskType"`
	WorkerCidr             string                 `json:"workerCidr"`
	AutoScalerMin          int                    `json:"autoScalerMin"`
	AutoScalerMax          int                    `json:"autoScalerMax"`
	MaxSurge               int                    `json:"maxSurge"`
	MaxUnavailable         int                    `json:"maxUnavailable"`
	ProviderSpecificConfig *ProviderSpecificInput `json:"providerSpecificConfig"`
	Seed                   *string                `json:"seed"`
}

type KymaConfig

type KymaConfig struct {
	Version       *string                   `json:"version"`
	Components    []*ComponentConfiguration `json:"components"`
	Configuration []*ConfigEntry            `json:"configuration"`
}

type KymaConfigInput

type KymaConfigInput struct {
	Version       string                         `json:"version"`
	Components    []*ComponentConfigurationInput `json:"components"`
	Configuration []*ConfigEntryInput            `json:"configuration"`
}

type Labels

type Labels map[string]interface{}

func (Labels) MarshalGQL

func (y Labels) MarshalGQL(w io.Writer)

func (*Labels) UnmarshalGQL

func (y *Labels) UnmarshalGQL(v interface{}) error

type MutationResolver

type MutationResolver interface {
	ProvisionRuntime(ctx context.Context, config ProvisionRuntimeInput) (*OperationStatus, error)
	UpgradeRuntime(ctx context.Context, id string, config UpgradeRuntimeInput) (*OperationStatus, error)
	DeprovisionRuntime(ctx context.Context, id string) (string, error)
	RollBackUpgradeOperation(ctx context.Context, id string) (*RuntimeStatus, error)
	ReconnectRuntimeAgent(ctx context.Context, id string) (string, error)
}

type OperationState

type OperationState string
const (
	OperationStatePending    OperationState = "Pending"
	OperationStateInProgress OperationState = "InProgress"
	OperationStateSucceeded  OperationState = "Succeeded"
	OperationStateFailed     OperationState = "Failed"
)

func (OperationState) IsValid

func (e OperationState) IsValid() bool

func (OperationState) MarshalGQL

func (e OperationState) MarshalGQL(w io.Writer)

func (OperationState) String

func (e OperationState) String() string

func (*OperationState) UnmarshalGQL

func (e *OperationState) UnmarshalGQL(v interface{}) error

type OperationStatus

type OperationStatus struct {
	ID        *string        `json:"id"`
	Operation OperationType  `json:"operation"`
	State     OperationState `json:"state"`
	Message   *string        `json:"message"`
	RuntimeID *string        `json:"runtimeID"`
}

type OperationType

type OperationType string
const (
	OperationTypeProvision        OperationType = "Provision"
	OperationTypeUpgrade          OperationType = "Upgrade"
	OperationTypeDeprovision      OperationType = "Deprovision"
	OperationTypeReconnectRuntime OperationType = "ReconnectRuntime"
)

func (OperationType) IsValid

func (e OperationType) IsValid() bool

func (OperationType) MarshalGQL

func (e OperationType) MarshalGQL(w io.Writer)

func (OperationType) String

func (e OperationType) String() string

func (*OperationType) UnmarshalGQL

func (e *OperationType) UnmarshalGQL(v interface{}) error

type ProviderSpecificConfig

type ProviderSpecificConfig interface {
	IsProviderSpecificConfig()
}

type ProviderSpecificInput

type ProviderSpecificInput struct {
	GcpConfig   *GCPProviderConfigInput   `json:"gcpConfig"`
	AzureConfig *AzureProviderConfigInput `json:"azureConfig"`
	AwsConfig   *AWSProviderConfigInput   `json:"awsConfig"`
}

type ProvisionRuntimeInput

type ProvisionRuntimeInput struct {
	RuntimeInput  *RuntimeInput       `json:"runtimeInput"`
	ClusterConfig *ClusterConfigInput `json:"clusterConfig"`
	KymaConfig    *KymaConfigInput    `json:"kymaConfig"`
}

type QueryResolver

type QueryResolver interface {
	RuntimeStatus(ctx context.Context, id string) (*RuntimeStatus, error)
	RuntimeOperationStatus(ctx context.Context, id string) (*OperationStatus, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

type RuntimeAgentConnectionStatus

type RuntimeAgentConnectionStatus string
const (
	RuntimeAgentConnectionStatusPending      RuntimeAgentConnectionStatus = "Pending"
	RuntimeAgentConnectionStatusConnected    RuntimeAgentConnectionStatus = "Connected"
	RuntimeAgentConnectionStatusDisconnected RuntimeAgentConnectionStatus = "Disconnected"
)

func (RuntimeAgentConnectionStatus) IsValid

func (e RuntimeAgentConnectionStatus) IsValid() bool

func (RuntimeAgentConnectionStatus) MarshalGQL

func (e RuntimeAgentConnectionStatus) MarshalGQL(w io.Writer)

func (RuntimeAgentConnectionStatus) String

func (*RuntimeAgentConnectionStatus) UnmarshalGQL

func (e *RuntimeAgentConnectionStatus) UnmarshalGQL(v interface{}) error

type RuntimeConfig

type RuntimeConfig struct {
	ClusterConfig *GardenerConfig `json:"clusterConfig"`
	KymaConfig    *KymaConfig     `json:"kymaConfig"`
	Kubeconfig    *string         `json:"kubeconfig"`
}

type RuntimeConnectionStatus

type RuntimeConnectionStatus struct {
	Status RuntimeAgentConnectionStatus `json:"status"`
	Errors []*Error                     `json:"errors"`
}

type RuntimeInput

type RuntimeInput struct {
	Name        string  `json:"name"`
	Description *string `json:"description"`
	Labels      *Labels `json:"labels"`
}

type RuntimeStatus

type RuntimeStatus struct {
	LastOperationStatus     *OperationStatus         `json:"lastOperationStatus"`
	RuntimeConnectionStatus *RuntimeConnectionStatus `json:"runtimeConnectionStatus"`
	RuntimeConfiguration    *RuntimeConfig           `json:"runtimeConfiguration"`
}

type UpgradeRuntimeInput

type UpgradeRuntimeInput struct {
	KymaConfig *KymaConfigInput `json:"kymaConfig"`
}

Jump to

Keyboard shortcuts

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