util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64DecodeContent

func Base64DecodeContent(buf *string) (*bytes.Buffer, error)

func GetActorName

func GetActorName(inputActor string, apikey string) (string, error)

func GetFamilyName

func GetFamilyName(inputFamily string, apikey string) (string, error)

func HttpGetQuery

func HttpGetQuery(p types.Endpoint, apiKey string) ([]byte, error)

func HttpMultipartFileUpload

func HttpMultipartFileUpload(p types.Endpoint, apiKey string, body io.Reader, filename string) ([]byte, error)

func HttpRawFileUpload

func HttpRawFileUpload(p types.Endpoint, apiKey string, body io.Reader, filename string) ([]byte, error)

func PrettyPrintJson

func PrettyPrintJson(buf []byte) error

func Unzip

func Unzip(src string, dest string) error

Types

type Hash

type Hash int

Hash is a enum to support different types of hashes

const (
	// MD5 is the enum to compare against for MD5 hashes
	MD5 Hash = iota
	// SHA1 is the enum to compare against for SHA1 hashes
	SHA1
	// SHA256 is the enum to compare against for SHA256 hashes
	SHA256
)

func GetHashType

func GetHashType(hash string) (Hash, error)

Jump to

Keyboard shortcuts

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