gt

package module
v1.0.1-beta.0...-cdd694f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: Unlicense Imports: 6 Imported by: 0

README

gt

A simple and easy to use Go library and cli tool to generate WordPress.com guided transfer signatures for hosts looking to implement support

Documentation

Overview

A library to help in dealing with WordPress.com guided transfers in Go

This is meant to support hosting providers looking to support incoming transfers via the Guided Transfer API.

For end user documentation about this feature, please See: https://en.support.wordpress.com/guided-transfer/

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPost = fmt.Errorf("One or more POST pairs was invalid")

ErrInvalidPost signifies that one of the post strings did not conform to key=value

View Source
var ErrWritingHasher = fmt.Errorf("An error occured attempting to generate a sha256 hmac")

ErrWritingHasher is an error that should not normally occur and, perhaps, should generate a panic. the hash.Hash returned an error from it's Write() function fall

Functions

func Sign

func Sign(psk, uri string, post []string) ([]byte, error)

Sign allows you to sign the uri and post parameters with the given PSK for use in authenticating a Guided transfer HTTP request. The post slice should be in the form of "key=value". the Sign function will split the key, and value, and do any necessary url encoding, so do not pre urlencode your data for this function.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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