sendshit

package module
v0.0.0-...-9576528 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 9 Imported by: 0

README

sendshit-go

Build Status Go Report Card go-doc

Golang package to encrypt and upload files to sendsh.it

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptFile

func EncryptFile(name string, data []byte, key string) (string, error)

EncryptFile Encrypts a file with a key

func GenerateRandomString

func GenerateRandomString(size int) (string, error)

GenerateRandomString Generates a random hex string

Types

type Response

type Response struct {
	ID string `json:"id"`
}

Response of API Upload

func UploadFile

func UploadFile(encryptedData string) (Response, error)

UploadFile Uploads the encrypted file data to the API

type Upload

type Upload struct {
	URL  string `json:"url"`
	Name string `json:"name"`
}

Upload structure

Jump to

Keyboard shortcuts

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