kite: github.com/koding/kite/testutil Index | Files | Directories

package testutil

import "github.com/koding/kite/testutil"

Package testutil provides a default Kontrol kites for using in tests.

Index

Package Files

testutil.go

func NewConfig Uses

func NewConfig() *config.Config

func NewKiteKey Uses

func NewKiteKey() *jwt.Token

NewKiteKey returns a new generated kite key. (Copied and modified from kontrol.go) If the host does not have a kite.key file kite.New() panics. This is a helper to put a fake key on it's location.

func NewKiteKeyUsername Uses

func NewKiteKeyUsername(username string) *jwt.Token

NewKiteKeyUsername is like NewKiteKey() but it uses the given username instead of using the "testuser" name

func NewKiteKeyWithKeyPair Uses

func NewKiteKeyWithKeyPair(private, public string) *jwt.Token

func NewToken Uses

func NewToken(username, private, public string) *jwt.Token

NewToken creates new JWT token for the gien username. It embedds the given public key as kontrolKey and signs the token with the private one.

Directories

PathSynopsis
writekey

Package testutil imports 9 packages (graph) and is imported by 14 packages. Updated 2016-07-15. Refresh now. Tools for package owners.