edgecluster

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEdgeClusterContract

type CreateEdgeClusterContract interface {
	// MutateAndGetPayload creates a new edge cluster and returns the payload contains the result of creating a new edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to create
	// Returns the new edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args CreateEdgeClusterInputArgument) (CreateEdgeClusterPayloadResolverContract, error)
}

CreateEdgeClusterContract declares the type to use when creating a new edge cluster

type CreateEdgeClusterInput

type CreateEdgeClusterInput struct {
	TenantID         graphql.ID
	Name             string
	ClusterSecret    string
	ClusterType      string
	ClientMutationId *string
}

type CreateEdgeClusterInputArgument

type CreateEdgeClusterInputArgument struct {
	Input CreateEdgeClusterInput
}

type CreateEdgeClusterPayloadResolverContract

type CreateEdgeClusterPayloadResolverContract interface {
	// EdgeCluster returns the new edge cluster inforamtion
	// ctx: Mandatory. Reference to the context
	// Returns the new edge cluster inforamtion
	EdgeCluster(ctx context.Context) (EdgeClusterTypeEdgeResolverContract, error)

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

CreateEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of creating a new edge cluster

type DeleteEdgeClusterContract

type DeleteEdgeClusterContract interface {
	// MutateAndGetPayload update an existing edge cluster and returns the payload contains the result of deleting an existing edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to update
	// Returns the deleted edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args DeleteEdgeClusterInputArgument) (DeleteEdgeClusterPayloadResolverContract, error)
}

DeleteEdgeClusterContract declares the type to use when updating an existing edge cluster

type DeleteEdgeClusterInput

type DeleteEdgeClusterInput struct {
	EdgeClusterID    graphql.ID
	ClientMutationId *string
}

type DeleteEdgeClusterInputArgument

type DeleteEdgeClusterInputArgument struct {
	Input DeleteEdgeClusterInput
}

type DeleteEdgeClusterPayloadResolverContract

type DeleteEdgeClusterPayloadResolverContract interface {
	// DeletedEdgeClusterID returns the unique identifier of the edge cluster that got deleted
	// ctx: Mandatory. Reference to the context
	// Returns the unique identifier of the the edge cluster that got deleted
	DeletedEdgeClusterID(ctx context.Context) graphql.ID

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

DeleteEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of deleting an existing edge cluster

type EdgeClusterClientContract

type EdgeClusterClientContract interface {
	// CreateClient creats a new edge cluster gRPC client and returns the connection
	// and the client to the caller.
	// Returns connection and the edge cluster gRPC client or error if something goes wrong.
	CreateClient() (*grpc.ClientConn, edgeClusterGrpcContract.EdgeClusterServiceClient, error)
}

EdgeClusterClientContract wraps the edge cluser gRPC client to make it easy for testing

type EdgeClusterClusterEdgeClusterInputArgument

type EdgeClusterClusterEdgeClusterInputArgument struct {
	EdgeClusterID graphql.ID
}

type EdgeClusterDetail

type EdgeClusterDetail struct {
	EdgeCluster        *edgeclusterGrpcContract.EdgeCluster
	ProvisioningDetail *edgeclusterGrpcContract.EdgeClusterProvisioningDetail
}

type EdgeClusterEdgeClustersInputArgument

type EdgeClusterEdgeClustersInputArgument struct {
	relay.ConnectionArgument
	EdgeClusterIDs *[]graphql.ID
	SortOption     *string
}

type EdgeClusterProvisioningDetailResolverContract

type EdgeClusterProvisioningDetailResolverContract interface {
	// Status returns the edge cluster current status
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster current status
	Status(ctx context.Context) *EdgeClusterStatus

	// PublicIPAddress returns the edge cluster public IP address
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster public IP address
	PublicIPAddress(ctx context.Context) *string

	// KubeconfigContent returns the edge cluster Kubeconfig content
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster Kubeconfig content
	KubeconfigContent(ctx context.Context) *string
}

EdgeClusterProvisioningDetailResolverContract declares the resolver that returns edge cluster provisioning details

type EdgeClusterResolverContract

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

	// Name returns edge cluster name
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster name
	Name(ctx context.Context) string

	// ClusterSecret returns edge cluster secret
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster secret
	ClusterSecret(ctx context.Context) string

	// ClusterType returns the edge cluster current type
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster current type or error if something went wrong
	ClusterType(ctx context.Context) (string, error)

	// Tenant returns edge cluster tenant
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster tenant
	Tenant(ctx context.Context) (EdgeClusterTenantResolverContract, error)

	// ProvisioningDetail returns edge cluster provisioning detail
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster provisioning detail
	ProvisioningDetail(ctx context.Context) (EdgeClusterProvisioningDetailResolverContract, error)
}

EdgeClusterResolverContract declares the resolver that can retrieve edge cluster information

type EdgeClusterStatus

type EdgeClusterStatus int
const (
	Provisioning EdgeClusterStatus = iota
	Ready
	Deleting
)

type EdgeClusterTenantResolverContract

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

	// Name returns tenant name
	// ctx: Mandatory. Reference to the context
	// Returns the tenant name
	Name(ctx context.Context) string
}

EdgeClusterTenantResolverContract declares the resolver that returns edge cluster tenant

type EdgeClusterTypeConnectionResolverContract

type EdgeClusterTypeConnectionResolverContract interface {
	// PageInfo returns the paging information compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the paging information
	PageInfo(ctx context.Context) (relay.PageInfoResolverContract, error)

	// Edges returns the edge cluster edges compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster edges
	Edges(ctx context.Context) (*[]EdgeClusterTypeEdgeResolverContract, error)

	// TotalCount returns total count of the matched edge clusters
	// ctx: Mandatory. Reference to the context
	// Returns the total count of the matched edge cluster
	TotalCount(ctx context.Context) *int32
}

EdgeClusterTypeConnectionResolverContract declares the resolver that returns edge cluster edge compatible with graphql-relay

type EdgeClusterTypeEdgeResolverContract

type EdgeClusterTypeEdgeResolverContract interface {
	// Node returns the edge cluster resolver
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster resolver or error if something goes wrong
	Node(ctx context.Context) (EdgeClusterResolverContract, error)

	// Cursor returns the cursor for the edge cluster edge compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the cursor
	Cursor(ctx context.Context) string
}

EdgeClusterTypeEdgeResolverContract declares the resolver that returns edge cluster edge compatible with graphql-relay

type MutationResolverCreatorContract

type MutationResolverCreatorContract interface {
	// NewCreateEdgeCluster creates new instance of the CreateEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewCreateEdgeCluster(ctx context.Context) (CreateEdgeClusterContract, error)

	// NewCreateEdgeClusterPayloadResolver creates new instance of the CreateEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Mandatory. The edge cluster details
	// cursor: Mandatory. The edge cluster cursor
	// Returns the new instance or error if something goes wrong
	NewCreateEdgeClusterPayloadResolver(
		ctx context.Context,
		clientMutationId *string,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail,
		cursor string) (CreateEdgeClusterPayloadResolverContract, error)

	// NewUpdateEdgeCluster creates new instance of the UpdateEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewUpdateEdgeCluster(ctx context.Context) (UpdateEdgeClusterContract, error)

	// NewUpdateEdgeClusterPayloadResolver creates new instance of the UpdateEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Mandatory. The edge cluster details
	// cursor: Mandatory. The edge cluster cursor
	// Returns the new instance or error if something goes wrong
	NewUpdateEdgeClusterPayloadResolver(
		ctx context.Context,
		clientMutationId *string,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail,
		cursor string) (UpdateEdgeClusterPayloadResolverContract, error)

	// NewDeleteEdgeCluster creates new instance of the DeleteEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewDeleteEdgeCluster(ctx context.Context) (DeleteEdgeClusterContract, error)

	// NewDeleteEdgeClusterPayloadResolver creates new instance of the DeleteEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// Returns the new instance or error if something goes wrong
	NewDeleteEdgeClusterPayloadResolver(
		ctx context.Context,
		edgeClusterID string,
		clientMutationId *string) (DeleteEdgeClusterPayloadResolverContract, error)
}

type QueryResolverCreatorContract

type QueryResolverCreatorContract interface {
	// NewEdgeClusterResolver creates new EdgeClusterResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Optional. The edge cluster details, if provided, the value be used instead of contacting  the edge cluster service
	// Returns the EdgeClusterResolverContract or error if something goes wrong
	NewEdgeClusterResolver(
		ctx context.Context,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail) (EdgeClusterResolverContract, error)

	// NewEdgeClusterTypeEdgeResolver creates new EdgeClusterTypeEdgeResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// cursor: Mandatory. The cursor
	// edgeClusterDetail: Optional. The edge cluster details, if provided, the value be used instead of contacting  the edge cluster service
	// Returns the EdgeClusterTypeEdgeResolverContract or error if something goes wrong
	NewEdgeClusterTypeEdgeResolver(
		ctx context.Context,
		edgeClusterID string,
		cursor string,
		edgeClusterDetail *EdgeClusterDetail) (EdgeClusterTypeEdgeResolverContract, error)

	// NewEdgeClusterTypeConnectionResolver creates new EdgeClusterTypeConnectionResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusters: Mandatory. Reference the list of edge clusters
	// hasPreviousPage: Mandatory. Indicates whether more edges exist prior to the set defined by the clients arguments
	// hasNextPage: Mandatory. Indicates whether more edges exist following the set defined by the clients arguments
	// totalCount: Mandatory. The total count of matched edge clusters
	// Returns the EdgeClusterTypeConnectionResolverContract or error if something goes wrong
	NewEdgeClusterTypeConnectionResolver(
		ctx context.Context,
		edgeClusters []*edgeclusterGrpcContract.EdgeClusterWithCursor,
		hasPreviousPage bool,
		hasNextPage bool,
		totalCount int32) (EdgeClusterTypeConnectionResolverContract, error)

	// NewEdgeClusterTenantResolver creates new EdgeClusterTenatnResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// tenantID: Mandatory. The tenant unique identifier
	// Returns the EdgeClusterTenatnResolverContract or error if something goes wrong
	NewEdgeClusterTenantResolver(
		ctx context.Context,
		tenantID string) (EdgeClusterTenantResolverContract, error)

	// NewEdgeClusterProvisioningDetailResolver creates new EdgeClusterProvisioningDetailResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// provisioningDetail: Optional. The edge cluster provisioning details
	// Returns the EdgeClusterProvisioningDetailResolverContract or error if something goes wrong
	NewEdgeClusterProvisioningDetailResolver(
		ctx context.Context,
		provisioningDetail *edgeclusterGrpcContract.EdgeClusterProvisioningDetail) (EdgeClusterProvisioningDetailResolverContract, error)
}

type RootResolverContract

type RootResolverContract interface {
	// CreateEdgeCluster returns create edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the create edge cluster mutator or error if something goes wrong
	CreateEdgeCluster(
		ctx context.Context,
		args CreateEdgeClusterInputArgument) (CreateEdgeClusterPayloadResolverContract, error)

	// UpdateEdgeCluster returns update edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the update edge cluster mutator or error if something goes wrong
	UpdateEdgeCluster(
		ctx context.Context,
		args UpdateEdgeClusterInputArgument) (UpdateEdgeClusterPayloadResolverContract, error)

	// DeleteEdgeCluster returns delete edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the delete edge cluster mutator or error if something goes wrong
	DeleteEdgeCluster(
		ctx context.Context,
		args DeleteEdgeClusterInputArgument) (DeleteEdgeClusterPayloadResolverContract, error)
}

RootResolverContract declares the root resolver

type UpdateEdgeClusterContract

type UpdateEdgeClusterContract interface {
	// MutateAndGetPayload update an existing edge cluster and returns the payload contains the result of updating an existing edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to update
	// Returns the updated edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args UpdateEdgeClusterInputArgument) (UpdateEdgeClusterPayloadResolverContract, error)
}

UpdateEdgeClusterContract declares the type to use when updating an existing edge cluster

type UpdateEdgeClusterInput

type UpdateEdgeClusterInput struct {
	EdgeClusterID    graphql.ID
	TenantID         graphql.ID
	Name             string
	ClusterSecret    string
	ClusterType      string
	ClientMutationId *string
}

type UpdateEdgeClusterInputArgument

type UpdateEdgeClusterInputArgument struct {
	Input UpdateEdgeClusterInput
}

type UpdateEdgeClusterPayloadResolverContract

type UpdateEdgeClusterPayloadResolverContract interface {
	// EdgeCluster returns the updated edge cluster inforamtion
	// ctx: Mandatory. Reference to the context
	// Returns the updated edge cluster inforamtion
	EdgeCluster(ctx context.Context) (EdgeClusterTypeEdgeResolverContract, error)

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

UpdateEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of updating an existing edge cluster

Jump to

Keyboard shortcuts

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