Documentation ¶
Index ¶
- Constants
- func ContainsString(slice []string, val string) bool
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(s int) (string, error)
- func GetValue[T any](items map[string]interface{}, key string, required bool) (T, error)
- func HashSha256(data []byte) ([]byte, error)
- func ReadResponseBody(resp *http.Response) ([]byte, error)
- func RemoveString(slice []string, val string) ([]string, bool)
Constants ¶
View Source
const ( //AllApps indicates that all apps may be accessed AllApps string = "all" //AllOrgs indicates that all orgs may be accessed AllOrgs string = "all" )
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString returns true if the provided value is in the provided slice
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string
func GetValue ¶
GetValue returns the value corresponding to key in items; returns an error if missing and required or not the expected type
func HashSha256 ¶
HashSha256 returns the SHA256 hash of the input
func ReadResponseBody ¶
ReadResponseBody reads the body of a http.Response and returns it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.