util

package
v0.0.0-...-2d91164 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSha256HMAC

func ComputeSha256HMAC(message, key []byte) string

func DecodePayloadBody

func DecodePayloadBody(body []byte) ([]byte, error)

func FindTemplate

func FindTemplate(templates *template.Template, args ...string) (*template.Template, []string)

FindTemplate takes in arguments, attempts to find the associated template, and returns the args that followed the template. Example: input is 'describe mounts mount 123' and template 'describe_mounts.tpl' is found, that template is returned along with the left over arguments []string{ "mount", "123" }

func GetAbsoluteFilePath

func GetAbsoluteFilePath(file string) string

func ParseArgs

func ParseArgs(args []string) map[string]interface{}

ParseArgs take an argument string, and convert it into a map

func SendResponseURL

func SendResponseURL(url string, body []byte) (int, []byte, error)

SendResponseURL sends the provided message as the POST body

func StripSlackUsers

func StripSlackUsers(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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