authutils

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func ContainsString(slice []string, val string) bool

ContainsString returns true if the provided value is in the provided slice

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes

func GenerateRandomString

func GenerateRandomString(s int) (string, error)

GenerateRandomString returns a URL-safe, base64 encoded securely generated random string

func HashSha256

func HashSha256(data []byte) ([]byte, error)

HashSha256 returns the SHA256 hash of the input

func ReadResponseBody

func ReadResponseBody(resp *http.Response) ([]byte, error)

ReadResponseBody reads the body of a http.Response and returns it

func RemoveString

func RemoveString(slice []string, val string) ([]string, bool)

RemoveString removes the provided value from the provided slice

Returns modified slice. If val is not found returns unmodified slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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