Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) AddChildGroupMembership(parentGroupName, childGroupName string) error
- func (api *API) AddParentGroupMembership(parentGroupName, childGroupName string) error
- func (api *API) AddUser(...) error
- func (api *API) AddUserToGroup(userName, groupName string) error
- func (api *API) CreateGroup(groupName, description string, isActive bool) error
- func (api *API) GetUser(userName string) (*User, error)
- func (api *API) GetUserAttributes(userName string) (*Attributes, error)
- func (api *API) RemoveGroup(groupName string) error
- func (api *API) RemoveUser(userName string) error
- func (api *API) RemoveUserAttribute(userName, attributeName string) error
- func (api *API) RemoveUserFromGroup(userName, groupName string) error
- func (api *API) StoreUserAttributes(userName string, attributes *Attributes) error
- func (api *API) UpdateUser(userName, userFirstName, userLastName, userDisplayName, userEmail string, ...) error
- type Attribute
- type Attributes
- type Group
- type GroupAttributes
- type GroupName
- type PasswordValue
- type User
- type UserRename
Constants ¶
View Source
const ( VERSION = "0.3.0" NAME = "crowd-go" )
Variables ¶
View Source
var ( ErrorGeneralEmptyURL = errors.New("You must set the crowd base URL") ErrorGeneralEmptyApplication = errors.New("You must set the crowd application name") ErrorGeneralEmptyPassword = errors.New("You must set a password to access the crowd application") ErrorGeneralNoPermissions = errors.New("Your application has no permission to perform the desired request") )
View Source
var ( ErrorUserAlreadyInGroup = errors.New("User is already a direct member of the group") ErrorUserNotFound = errors.New("User could not be found") ErrorInvalidUserDataOrUserExists = errors.New("Invalid user data, for example missing password or the user already exists") ErrorInvalidUserDataOrMismatch = errors.New("Invalid user data, for example the usernames in the body and the uri don't match") )
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) AddChildGroupMembership ¶ added in v0.3.0
Add a new child group membership.
func (*API) AddParentGroupMembership ¶ added in v0.3.0
Add a new parent group membership.
func (*API) AddUser ¶ added in v0.3.0
func (api *API) AddUser(userName, userPassword, userFirstName, userLastName, userDisplayName, userEmail string, isActive bool) error
Add a new crowd user.
func (*API) AddUserToGroup ¶
Add a user to an existing group.
func (*API) CreateGroup ¶ added in v0.3.0
Create a new group.
func (*API) GetUserAttributes ¶ added in v0.3.0
func (api *API) GetUserAttributes(userName string) (*Attributes, error)
Get the attributes of a crowd user.
func (*API) RemoveGroup ¶ added in v0.3.0
Remove a group.
func (*API) RemoveUser ¶ added in v0.3.0
Remove a crowd user.
func (*API) RemoveUserAttribute ¶ added in v0.3.0
Remove attributes from a crowd user.
func (*API) RemoveUserFromGroup ¶ added in v0.3.0
Remove a user from a group.
func (*API) StoreUserAttributes ¶ added in v0.3.0
func (api *API) StoreUserAttributes(userName string, attributes *Attributes) error
Store (new) attributes for a crowd user.
type Attributes ¶ added in v0.3.0
type Attributes struct {
Attributes []*Attribute `json:"attributes,omitempty"`
}
type GroupAttributes ¶ added in v0.3.0
type PasswordValue ¶ added in v0.3.0
type PasswordValue struct {
Value string `json:"value,omitempty"`
}
type User ¶ added in v0.3.0
type User struct { Name string `json:"name"` FirstName string `json:"first-name"` LastName string `json:"last-name"` DisplayName string `json:"display-name"` Email string `json:"email"` Key string `json:"key,omitempty"` IsActive bool `json:"active"` Password PasswordValue `json:"password,omitempty"` Attributes Attributes `json:"attributes,omitempty"` }
type UserRename ¶ added in v0.3.0
type UserRename struct {
NewName string `json:"new-name"`
}
Click to show internal directories.
Click to hide internal directories.