gke

package
v0.0.0-...-4711c86 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gke implements helper methods to create and list GKE cluster

Package gke implements helper methods to create and list GKE cluster

Package gke implements helper methods to create and list GKE cluster

Package gke implements helper methods to create and list GKE cluster

Package gke implements helper methods to create and list GKE cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnknownError

func IsUnknownError(err error) bool

IsUnknownError indicates whether the error is of type UnknownError

func NewUnknownError

func NewUnknownError(message string) error

NewUnknownError creates a new UnknownError error

func NewUnknownErrorWithError

func NewUnknownErrorWithError(message string, err error) error

NewUnknownErrorWithError creates a new UnknownError error

Types

type CreateClusterRequest

type CreateClusterRequest struct {
	Name          string            `json:"name"`
	Description   string            `json:"description"`
	ClusterLabels map[string]string `json:"clusterLabels"`
	NodeLabels    map[string]string `json:"nodeLabels"`
}

CreateClusterRequest contains the request to create a GKE cluster

func (CreateClusterRequest) Validate

func (val CreateClusterRequest) Validate() error

Validate validates the CreateClusterRequest model and return error if the validation fails Returns error if validation fails

type CreateClusterResponse

type CreateClusterResponse struct {
}

CreateClusterResponse contains the response of creating a GKE cluster

type GkeContract

type GkeContract interface {
	// CreateCluster creates a new GKE cluster using provided
	// context: Mandatory The reference to the context
	// request: Mandatory. The request to create a GKE cluster
	// Returns either the result of creating new GKE cluster or error if something goes wrong.
	CreateCluster(
		ctx context.Context,
		request *CreateClusterRequest) (*CreateClusterResponse, error)
}

GkeContract declares the service that provides helper methods required by different demo automation functions to create and list GKE cluster

func NewGkeService

func NewGkeService(
	configurationService configuration.ConfigurationContract) (GkeContract, error)

NewGkeService creates new instance of the GkeService, setting up all dependencies and returns the instance configurationService: Mandatory. Reference to the configuration service Returns the new service or error if something goes wrong

type UnknownError

type UnknownError struct {
	Message string
	Err     error
}

UnknownError indicates that an unknown error has happened

func (UnknownError) Error

func (e UnknownError) Error() string

Error returns message for the UnknownError error type Returns the error nessage

func (UnknownError) Unwrap

func (e UnknownError) Unwrap() error

Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil

Directories

Path Synopsis
Package mock_gke is a generated GoMock package.
Package mock_gke is a generated GoMock package.

Jump to

Keyboard shortcuts

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