factory

package
v0.0.0-...-6337964 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2014 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

func NewFactory

func NewFactory(st *state.State, c *gc.C) *Factory

func (*Factory) MakeAnyUser

func (factory *Factory) MakeAnyUser() *state.User

MakeAnyUser will create a user with no specified values.

func (*Factory) MakeUser

func (factory *Factory) MakeUser(params UserParams) *state.User

MakeUser will create a user with values defined by the params. For attributes of UserParams that are the default empty values, some meaningful valid values are used instead.

func (*Factory) UniqueInteger

func (factory *Factory) UniqueInteger() int

func (*Factory) UniqueString

func (factory *Factory) UniqueString(prefix string) string

type UserParams

type UserParams struct {
	Username    string
	DisplayName string
	Password    string
	Creator     string
}

Jump to

Keyboard shortcuts

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