helpers

package
v0.0.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfigMap

func CreateConfigMap(config *config.Config, resource interface{}, svcName string, svcNamespace string, configMapTemplate map[string]string) string

CreateConfigMap will create a Kubernetes Servic Using ExternalName types

func CreateExternalNameService

func CreateExternalNameService(config *config.Config, resource interface{}, svcName string, svcNamespace string, externalNameTemplate string, svcPort int32) string

CreateExternalNameService will create a Kubernetes Servic Using ExternalName types

func CreateParam

func CreateParam(key string, value string) *cloudformation.Parameter

CreateParam returns a new prefilled cloudformation param

func CreateTag

func CreateTag(key string, value string) *cloudformation.Tag

CreateTag returns a new prefilled cloudformation tag

func GetCloudFormationTemplate

func GetCloudFormationTemplate(config *config.Config, rType string, name string, namespace string) string

GetCloudFormationTemplate will return the url to the CFT from the CFT resource

func GetCloudFormationTemplateByName

func GetCloudFormationTemplateByName(config *config.Config, name string, namespace string) (interface{}, error)

GetCloudFormationTemplateByName will find the resource by name

func GetDynamoDBByName

func GetDynamoDBByName(config *config.Config, name string, namespace string) (interface{}, error)

GetDynamoDBByName will find the resource by name

func GetECRRepositoryByName

func GetECRRepositoryByName(config *config.Config, name string, namespace string) (interface{}, error)

GetECRRepositoryByName will find the resource by name

func GetS3BucketByName

func GetS3BucketByName(config *config.Config, name string, namespace string) (interface{}, error)

GetS3BucketByName will find the resource by name

func GetSNSSubscriptionByName

func GetSNSSubscriptionByName(config *config.Config, name string, namespace string) (interface{}, error)

GetSNSSubscriptionByName will find the resource by name

func GetSNSTopicByName

func GetSNSTopicByName(config *config.Config, name string, namespace string) (interface{}, error)

GetSNSTopicByName will find the resource by name

func GetSQSQueueByName

func GetSQSQueueByName(config *config.Config, name string, namespace string) (interface{}, error)

GetSQSQueueByName will find the resource by name

func IsStackComplete

func IsStackComplete(status string, defaultRet bool) bool

IsStackComplete will determine if it's in a state to process

func KubernetesResourceName

func KubernetesResourceName(name string) string

KubernetesResourceName returns the resource name for other components

func StackName

func StackName(clusterName string, resourceType string, name string, namespace string) string

StackName will return the proper stack name for each component

func Stringify

func Stringify(attr interface{}) string

Stringify will create a string based on the params

func Templatize

func Templatize(tempStr string, data interface{}) (resp string, err error)

Templatize returns the proper values based on the templating

Types

type Data

type Data struct {
	Helpers Helpers
	Obj     interface{}
	Config  *config.Config
}

Data wrapps the object that is needed for the services

type Helpers

type Helpers struct {
	KubernetesResourceName          func(string) string
	GetCloudFormationTemplateByName func(*config.Config, string, string) (interface{}, error)
	GetDynamoDBByName               func(*config.Config, string, string) (interface{}, error)
	GetECRRepositoryByName          func(*config.Config, string, string) (interface{}, error)
	GetS3BucketByName               func(*config.Config, string, string) (interface{}, error)
	GetSNSSubscriptionByName        func(*config.Config, string, string) (interface{}, error)
	GetSNSTopicByName               func(*config.Config, string, string) (interface{}, error)
	GetSQSQueueByName               func(*config.Config, string, string) (interface{}, error)
}

Helpers defines all the Helper functions that are exposed to the templates

func New

func New() Helpers

New Will return helpers to be passed into the templates

Jump to

Keyboard shortcuts

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