util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseSlackAttachment

func BaseSlackAttachment() *model.SlackAttachment

func Decrypt

func Decrypt(key []byte, text string) (string, error)

func Encrypt

func Encrypt(key []byte, text string) (string, error)

func GetCircleciClient

func GetCircleciClient(authToken string) *circleci2.APIClient

func GetKeyHash

func GetKeyHash(key string) string

GetKeyHash can be used to create a hash from a string

func KVCompareAndSet

func KVCompareAndSet(key string, oldData, newData []byte, updater func(oldData []byte) ([]byte, error)) error

func Min

func Min(a, b int) int

Min - since math.Min is for floats and casting to and from floats is dangerous.

func SendEphemeralCommandResponse

func SendEphemeralCommandResponse(message string) (*model.CommandResponse, *model.AppError)

SendEphemeralCommandResponse can be used to return an ephemeral message as the response for a slash command

func SplitArgs

func SplitArgs(s string) ([]string, error)

SplitArgs is used to split a string to an array of arguments with separators: "(quotes) and spaces We cant use strings.split as it includes empty string if deliminator is the last character in input string

Types

This section is empty.

Jump to

Keyboard shortcuts

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