easysdk

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

README

easy-sdk-go

A set of simple functions to make life easier.

Listing functions is dev.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptMailMessage

func EncryptMailMessage(key, body []byte) ([]byte, error)

EncryptMailMessage encrypts a mail with given public key.

func EncryptRC4

func EncryptRC4(data []byte, ciph *CipherRC4) []byte

func FileExists

func FileExists(filename string) bool

FileExists check is file exist

func FileStringReplace

func FileStringReplace(FilePath string, Original string, Replace string) error

func FileStringReplaceRegEx

func FileStringReplaceRegEx(FilePath string, RegEx string, Replace string) error

func FileWriteBytes

func FileWriteBytes(FilePath string, Data []byte) error

func FolderExist

func FolderExist(path string) (bool, error)

func GenerateUrlHash

func GenerateUrlHash() string

func GetMD5Hash

func GetMD5Hash(text string) string

GetMD5Hash generate md5 hash from string

func GetMD5HashByte

func GetMD5HashByte(text []byte) string

GetMD5Hash generate md5 hash from []byte

func InsertIntoString

func InsertIntoString(s string, interval int, sep rune) string

func MakeSecureString

func MakeSecureString(text string) string

func MattermostSendMessage

func MattermostSendMessage(url, hook, message string, isCode bool, warning bool) (string, error)

func Message

func Message(status bool, message string) map[string]interface{}

Message show message in request

func PgpEncrypt

func PgpEncrypt(publicKeyring string, secretString string) (string, error)

func RandIntBytes

func RandIntBytes(n int) string

func RandStringBytes

func RandStringBytes(n int) string

func Respond

func Respond(w http.ResponseWriter, data map[string]interface{})

Respond add headers to respond

func ReverseFloat64

func ReverseFloat64(input []float64) []float64

func ReverseInts

func ReverseInts(input []int) []int

func ReverseStrings

func ReverseStrings(input []string) []string

func RunCMD

func RunCMD(Command string, Home string) (string, error)

func SendGetTorRequest

func SendGetTorRequest(url string) ([]byte, error)

func SendPostTorRequest

func SendPostTorRequest(url string, postData url.Values) ([]byte, error)

func StringToFloat32

func StringToFloat32(text string) (float32, error)

func StringToFloat64

func StringToFloat64(text string) (float64, error)

func StringToUint

func StringToUint(text string) (uint, error)

func StringToUint64

func StringToUint64(text string) (uint64, error)

Types

type CipherRC4

type CipherRC4 struct {
	// contains filtered or unexported fields
}

func NewCipherRC4

func NewCipherRC4(key []byte) (*CipherRC4, error)

func (*CipherRC4) Reset

func (c *CipherRC4) Reset()

func (*CipherRC4) XorKeyStreamGeneric

func (c *CipherRC4) XorKeyStreamGeneric(dst, src []byte)

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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