gqlschema

package
v0.0.0-...-34ee2f8 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 15 Imported by: 33

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 {
		AllowPrivilegedContainers           func(childComplexity int) int
		AutoScalerMax                       func(childComplexity int) int
		AutoScalerMin                       func(childComplexity int) int
		DiskType                            func(childComplexity int) int
		EnableKubernetesVersionAutoUpdate   func(childComplexity int) int
		EnableMachineImageVersionAutoUpdate func(childComplexity int) int
		KubernetesVersion                   func(childComplexity int) int
		LicenceType                         func(childComplexity int) int
		MachineImage                        func(childComplexity int) int
		MachineImageVersion                 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
	}

	HibernationStatus struct {
		Hibernated          func(childComplexity int) int
		HibernationPossible func(childComplexity int) int
	}

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

	Mutation struct {
		DeprovisionRuntime       func(childComplexity int, id string) int
		HibernateRuntime         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
		UpgradeShoot             func(childComplexity int, id string, config UpgradeShootInput) int
	}

	OpenStackProviderConfig struct {
		CloudProfileName     func(childComplexity int) int
		FloatingPoolName     func(childComplexity int) int
		LoadBalancerProvider func(childComplexity int) int
		Zones                func(childComplexity int) 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 {
		HibernationStatus       func(childComplexity int) int
		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"`
	ConflictStrategy *ConflictStrategy   `json:"conflictStrategy"`
}

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 ConflictStrategy

type ConflictStrategy string
const (
	ConflictStrategyMerge   ConflictStrategy = "Merge"
	ConflictStrategyReplace ConflictStrategy = "Replace"
)

func (ConflictStrategy) IsValid

func (e ConflictStrategy) IsValid() bool

func (ConflictStrategy) MarshalGQL

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

func (ConflictStrategy) String

func (e ConflictStrategy) String() string

func (*ConflictStrategy) UnmarshalGQL

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

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"`
	TargetSecret                        *string                `json:"targetSecret"`
	Provider                            *string                `json:"provider"`
	Region                              *string                `json:"region"`
	Seed                                *string                `json:"seed"`
	MachineType                         *string                `json:"machineType"`
	MachineImage                        *string                `json:"machineImage"`
	MachineImageVersion                 *string                `json:"machineImageVersion"`
	DiskType                            *string                `json:"diskType"`
	VolumeSizeGb                        *int                   `json:"volumeSizeGB"`
	WorkerCidr                          *string                `json:"workerCidr"`
	AutoScalerMin                       *int                   `json:"autoScalerMin"`
	AutoScalerMax                       *int                   `json:"autoScalerMax"`
	MaxSurge                            *int                   `json:"maxSurge"`
	MaxUnavailable                      *int                   `json:"maxUnavailable"`
	Purpose                             *string                `json:"purpose"`
	LicenceType                         *string                `json:"licenceType"`
	EnableKubernetesVersionAutoUpdate   *bool                  `json:"enableKubernetesVersionAutoUpdate"`
	EnableMachineImageVersionAutoUpdate *bool                  `json:"enableMachineImageVersionAutoUpdate"`
	AllowPrivilegedContainers           *bool                  `json:"allowPrivilegedContainers"`
	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 {
	Name                                string                 `json:"name"`
	KubernetesVersion                   string                 `json:"kubernetesVersion"`
	Provider                            string                 `json:"provider"`
	TargetSecret                        string                 `json:"targetSecret"`
	Region                              string                 `json:"region"`
	MachineType                         string                 `json:"machineType"`
	MachineImage                        *string                `json:"machineImage"`
	MachineImageVersion                 *string                `json:"machineImageVersion"`
	DiskType                            *string                `json:"diskType"`
	VolumeSizeGb                        *int                   `json:"volumeSizeGB"`
	WorkerCidr                          string                 `json:"workerCidr"`
	AutoScalerMin                       int                    `json:"autoScalerMin"`
	AutoScalerMax                       int                    `json:"autoScalerMax"`
	MaxSurge                            int                    `json:"maxSurge"`
	MaxUnavailable                      int                    `json:"maxUnavailable"`
	Purpose                             *string                `json:"purpose"`
	LicenceType                         *string                `json:"licenceType"`
	EnableKubernetesVersionAutoUpdate   *bool                  `json:"enableKubernetesVersionAutoUpdate"`
	EnableMachineImageVersionAutoUpdate *bool                  `json:"enableMachineImageVersionAutoUpdate"`
	AllowPrivilegedContainers           *bool                  `json:"allowPrivilegedContainers"`
	ProviderSpecificConfig              *ProviderSpecificInput `json:"providerSpecificConfig"`
	Seed                                *string                `json:"seed"`
}

type GardenerUpgradeInput

type GardenerUpgradeInput struct {
	KubernetesVersion                   *string                `json:"kubernetesVersion"`
	MachineType                         *string                `json:"machineType"`
	DiskType                            *string                `json:"diskType"`
	VolumeSizeGb                        *int                   `json:"volumeSizeGB"`
	AutoScalerMin                       *int                   `json:"autoScalerMin"`
	AutoScalerMax                       *int                   `json:"autoScalerMax"`
	MachineImage                        *string                `json:"machineImage"`
	MachineImageVersion                 *string                `json:"machineImageVersion"`
	MaxSurge                            *int                   `json:"maxSurge"`
	MaxUnavailable                      *int                   `json:"maxUnavailable"`
	Purpose                             *string                `json:"purpose"`
	EnableKubernetesVersionAutoUpdate   *bool                  `json:"enableKubernetesVersionAutoUpdate"`
	EnableMachineImageVersionAutoUpdate *bool                  `json:"enableMachineImageVersionAutoUpdate"`
	ProviderSpecificConfig              *ProviderSpecificInput `json:"providerSpecificConfig"`
}

type HibernationStatus

type HibernationStatus struct {
	Hibernated          *bool `json:"hibernated"`
	HibernationPossible *bool `json:"hibernationPossible"`
}

type KymaConfig

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

type KymaConfigInput

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

type KymaProfile

type KymaProfile string
const (
	KymaProfileEvaluation KymaProfile = "Evaluation"
	KymaProfileProduction KymaProfile = "Production"
)

func (KymaProfile) IsValid

func (e KymaProfile) IsValid() bool

func (KymaProfile) MarshalGQL

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

func (KymaProfile) String

func (e KymaProfile) String() string

func (*KymaProfile) UnmarshalGQL

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

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)
	UpgradeShoot(ctx context.Context, id string, config UpgradeShootInput) (*OperationStatus, error)
	HibernateRuntime(ctx context.Context, id string) (*OperationStatus, error)
	RollBackUpgradeOperation(ctx context.Context, id string) (*RuntimeStatus, error)
	ReconnectRuntimeAgent(ctx context.Context, id string) (string, error)
}

type OpenStackProviderConfig

type OpenStackProviderConfig struct {
	Zones                []string `json:"zones"`
	FloatingPoolName     string   `json:"floatingPoolName"`
	CloudProfileName     string   `json:"cloudProfileName"`
	LoadBalancerProvider string   `json:"loadBalancerProvider"`
}

func (OpenStackProviderConfig) IsProviderSpecificConfig

func (OpenStackProviderConfig) IsProviderSpecificConfig()

type OpenStackProviderConfigInput

type OpenStackProviderConfigInput struct {
	Zones                []string `json:"zones"`
	FloatingPoolName     string   `json:"floatingPoolName"`
	CloudProfileName     string   `json:"cloudProfileName"`
	LoadBalancerProvider string   `json:"loadBalancerProvider"`
}

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"
	OperationTypeUpgradeShoot     OperationType = "UpgradeShoot"
	OperationTypeDeprovision      OperationType = "Deprovision"
	OperationTypeReconnectRuntime OperationType = "ReconnectRuntime"
	OperationTypeHibernate        OperationType = "Hibernate"
)

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"`
	OpenStackConfig *OpenStackProviderConfigInput `json:"openStackConfig"`
}

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"`
	HibernationStatus       *HibernationStatus       `json:"hibernationStatus"`
}

type UpgradeRuntimeInput

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

type UpgradeShootInput

type UpgradeShootInput struct {
	GardenerConfig *GardenerUpgradeInput `json:"gardenerConfig"`
}

Jump to

Keyboard shortcuts

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