to

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 15 Imported by: 7 modules, 51 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

to is a list of Functions use to convert things to things

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AByte

func AByte(input interface{}) ([]byte, error)

Takes a string, *string, or struct and returns []byte (json marshal)

func ABytep

func ABytep(s []byte) *[]byte

func ArnPath

func ArnPath(arn string) string

func ArnRegionAccountResource

func ArnRegionAccountResource(arnstr string) (string, string, string)

func AwsRegionAccountFromContext

func AwsRegionAccountFromContext(ctx context.Context) (*string, *string)

func AwsRegionAccountLambdaNameFromContext

func AwsRegionAccountLambdaNameFromContext(ctx context.Context) (region, account, lambdaName string)

func Base64

func Base64(str *string) string

func Base64p

func Base64p(str *string) *string

func Boolp

func Boolp(s bool) *bool

func CompactJSON

func CompactJSON(input interface{}) (string, error)

func CompactJSONStr

func CompactJSONStr(input interface{}) string

func ErrorType

func ErrorType(invokeError error) string

Take from aws-lambda-go.Function#lambdaErrorResponse

func Float64p

func Float64p(s float64) *float64

func FromJSON

func FromJSON(input interface{}) (interface{}, error)

FromJSON Map Converts a string of JSON or a Struct into a map[string]interface{}

func Int64p

func Int64p(s int64) *int64

func InterpolateArnVariables

func InterpolateArnVariables(state_machine *string, region *string, account_id *string, name_or_arn *string) *string

InterpolateArnVariables replaces any resource parameter templates with the appropriate values

func Intp

func Intp(s int) *int

func LambdaArn

func LambdaArn(region *string, account_id *string, name_or_arn *string) *string

LambdaArn takes a name OR arn and returns Arn defaulting to AWS Environment variables

func LambdaArnFromContext

func LambdaArnFromContext(ctx context.Context) (string, error)

func PrettyJSON

func PrettyJSON(input interface{}) (string, error)

PrettyJSON takes a string or a struct and returns it as PrettyJSON

func PrettyJSONStr

func PrettyJSONStr(input interface{}) string

PrettyJSONStr takes a string or a struct and returns it as PrettyJSON, no error

func RandomString

func RandomString(n int) string

func RegionAccount

func RegionAccount() (*string, *string)

func RegionAccountOrExit

func RegionAccountOrExit() (*string, *string)

func RoleArn

func RoleArn(account_id *string, name_or_arn *string) *string

func SHA256AByte

func SHA256AByte(b *[]byte) string

SHA256AByte returns a hex string of the SHA256 of a byte array

func SHA256File

func SHA256File(file_path string) (string, error)

SHA256File returns a hex string of the SHA256 of a file

func SHA256Str

func SHA256Str(str *string) string

SHA256Str returns a hex string of the SHA256 of a string

func SHA256Struct

func SHA256Struct(str interface{}) string

func StepArn

func StepArn(region *string, account_id *string, name_or_arn *string) *string

StepArn takes a name OR arn and returns Arn defaulting to AWS Environment variables

func StrSlice

func StrSlice(strps []*string) []string

func Strp

func Strp(s string) *string

Strp return a string pointer from string

func Strs

func Strs(s *string) string

func TimeUUID

func TimeUUID(prefix string) *string

TimeUUID returns time base UUID with prefix

func Timep

func Timep(s time.Time) *time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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