users

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//SpacesSuccessStatusCode - return success status for a space api call
	SpacesSuccessStatusCode = 200
	//ErrListUserSpaces - error when list users on spaces fails
	ErrListUserSpaces = errors.New("there was an error calling list user spaces endpoint")
	//OrgsSuccessStatusCode - org api call success status code
	OrgsSuccessStatusCode = 200
	//ErrListUserOrgs - error object for failed user org request
	ErrListUserOrgs = errors.New("there was an error calling list user orgs endpoint")
	//InvitedGuestUserValue - uaa record value for a invited user
	InvitedGuestUserValue = "uaa"
	//CreatedFieldname - uaa record fieldname for a user creation timestamp
	CreatedFieldname = "created"
	//DayOverDayHistoryLimit - limit for how far back the day over day user lookup should go
	DayOverDayHistoryLimit = 20
)
View Source
var GetCurrentDate = func() time.Time {
	return time.Now()
}

GetCurrentDate - function that returns the current date as a time.Time

Functions

func TimeStringifier added in v0.0.16

func TimeStringifier(t time.Time) string

TimeStringifier - function to create a string from time.Time object in a specific standard format

Types

type UserAggregate

type UserAggregate struct {
	UserCount        int
	UAACount         int
	ExternalCount    int
	OrphanedCount    int
	CreateDayOverDay map[string]int
}

UserAggregate - a user info aggregation object. bucket of stuff

func (*UserAggregate) Compile

func (s *UserAggregate) Compile(users cf.UserAPIResponse)

Compile - compile the info aggregates

func (*UserAggregate) GenerateUserCreateBuckets added in v0.0.16

func (s *UserAggregate) GenerateUserCreateBuckets()

GenerateUserCreateBuckets - method to generate create user history buckets on the aggregate object

type UserSearch

type UserSearch struct {
	Client           cloudFoundryClient
	ClientTargetInfo *cf.CloudFoundryAPIInfo
}

UserSearch - a user search object

func (*UserSearch) BuildQuery

func (s *UserSearch) BuildQuery(usertype, username string) (query string)

BuildQuery - construct a query string

func (*UserSearch) Init

func (s *UserSearch) Init(client cloudFoundryClient) *UserSearch

Init - initialize the user search object

func (*UserSearch) List

func (s *UserSearch) List(usertype, username string) (users cf.UserAPIResponse, err error)

List - lists the matches from a query on usertype/username

Jump to

Keyboard shortcuts

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