Documentation ¶
Index ¶
Constants ¶
View Source
const INTERNAL = "internal"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct { // external id of the group ID string `json:"id" dynamodbav:"id"` IdpID string `json:"idpId" dynamodbav:"idpId"` Name string `json:"name" dynamodbav:"name"` Description string `json:"description" dynamodbav:"description"` Status types.IdpStatus `json:"status" dynamodbav:"status"` Users []string `json:"users" dynamodbav:"users"` Source string `json:"source" dynamodbav:"source"` // CreatedAt is a read-only field after the request has been created. CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
type IDPGroup ¶
func (IDPGroup) ToInternalGroup ¶
type IDPUser ¶
type IDPUser struct { // ID is the IDP id for this user ID string FirstName string LastName string Email string // groups is a list of idp group ids, these will not match the internal dynamo ids Groups []string }
IDPUser is a generic user type which should be returned by our IDP implementations
func (IDPUser) ToInternalUser ¶
type User ¶
type User struct { // internal id of the user ID string `json:"id" dynamodbav:"id"` FirstName string `json:"firstName" dynamodbav:"firstName"` LastName string `json:"lastName" dynamodbav:"lastName"` Email string `json:"email" dynamodbav:"email"` Groups []string `json:"groups" dynamodbav:"groups"` Status types.IdpStatus `json:"status" dynamodbav:"status"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
func (*User) AddGroup ¶
AddGroup adds the group to the list in memory if it is not already there, it does not update the database
func (*User) BelongsToGroup ¶
func (*User) RemoveGroup ¶
RemoveGroup removes the group from the list in memory, it does not update the database
type UserNotFoundError ¶
type UserNotFoundError struct {
User string
}
func (UserNotFoundError) Error ¶
func (e UserNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.