clientlib

package
v0.0.0-...-cd73554 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNetwork    = errors.New("network error, try again later")
	ErrorValidation = errors.New("data validation error, check your inputs")
)

Functions

func CheckLimits

func CheckLimits(data []byte, ttl int, hits int) string

func Decrypt

func Decrypt(data string, keyStr string, pc chan []byte)
func EditLink(apiEndpoint string, hc chan string, phc chan string, delete bool, dc chan string, ttl int, hits int, ehc chan string) (shared.APIResponse, error)

func Encrypt

func Encrypt(data []byte, kd chan []byte, sc chan []byte, dc chan string)

func GenHash

func GenHash(keyStr string, hc chan string)

func GenID

func GenID() string

func GenPass

func GenPass(keyStr string, hc chan string)
func GetLink(apiEndpoint string, hc chan string, phc chan string) (shared.APIResponseData, error)

func KeyDerivation

func KeyDerivation(keyStr string, kc chan []byte, sc chan []byte)

func ShareDecode

func ShareDecode(data []byte) (string, []byte)

func ShareEncode

func ShareEncode(shareType string, data []byte) []byte

Types

type File

type File struct {
	Name     string
	MimeType string
	Data     []byte
}

func (*File) Decode

func (file *File) Decode(data []byte) (extra []byte, err error)

func (File) Encode

func (file File) Encode() (encoded []byte)

func (*File) Load

func (file *File) Load(path string, data []byte)

Jump to

Keyboard shortcuts

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