models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: AGPL-3.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validator

func Validator() *validator.Validate

Validator builds a custom struct validator.

Types

type GetUserInput

type GetUserInput struct {
	ID         *string `json:"id" validate:"required,uuid4"`
	UserPoolID *string `json:"userPoolId" validate:"required,min=1"`
}

GetUserInput retrieves a user's information based on id.

type GetUserOrganizationAccessInput

type GetUserOrganizationAccessInput struct {
	Email *string `json:"email" validate:"required,email"`
}

GetUserOrganizationAccessInput retrieves a user's organization id based on email.

type GetUserOrganizationAccessOutput

type GetUserOrganizationAccessOutput struct {
	UserPoolID     *string `json:"userPoolId"`
	AppClientID    *string `json:"appClientId"`
	IdentityPoolID *string `json:"identityPoolId"`
}

GetUserOrganizationAccessOutput retrieves a user's organization id based on email.

type GetUserOutput

type GetUserOutput = User

GetUserOutput returns the Panther user details.

type Group

type Group struct {
	Description *string `json:"description"`
	Name        *string `json:"name"`
}

Group is a struct for Panther Group containing employees.

type InviteUserInput

type InviteUserInput struct {
	GivenName  *string `json:"givenName" validate:"required,min=1"`
	FamilyName *string `json:"familyName" validate:"required,min=1"`
	Email      *string `json:"email" validate:"required,email"`
	UserPoolID *string `json:"userPoolId" validate:"required,min=1"`
	Role       *string `json:"role" validate:"required,min=1"`
}

InviteUserInput creates a new user with minimal permissions and sends them an invite.

type InviteUserOutput

type InviteUserOutput struct {
	ID *string `json:"id"`
}

InviteUserOutput returns the randomly generated user id.

type LambdaInput

type LambdaInput struct {
	GetUser                   *GetUserInput                   `json:"getUser"`
	GetUserOrganizationAccess *GetUserOrganizationAccessInput `json:"getUserOrganizationAccess"`
	InviteUser                *InviteUserInput                `json:"inviteUser"`
	ResetUserPassword         *ResetUserPasswordInput         `json:"resetUserPassword"`
	UpdateUser                *UpdateUserInput                `json:"updateUser"`
}

LambdaInput is the invocation event expected by the Lambda function.

Exactly one action must be specified.

type ResetUserPasswordInput

type ResetUserPasswordInput struct {
	ID         *string `json:"id" validate:"required,uuid4"`
	UserPoolID *string `json:"userPoolId" validate:"required,min=1"`
}

ResetUserPasswordInput resets the password for a user.

type UpdateUserInput

type UpdateUserInput struct {
	ID         *string `json:"id" validate:"required,uuid4"`
	UserPoolID *string `json:"userPoolId" validate:"required,min=1"`

	// At least one of the following must be specified:
	GivenName   *string `json:"givenName" validate:"omitempty,min=1"`
	FamilyName  *string `json:"familyName" validate:"omitempty,min=1"`
	Email       *string `json:"email" validate:"omitempty,min=1"`
	PhoneNumber *string `json:"phoneNumber" validate:"omitempty,min=1"`
}

UpdateUserInput updates user details.

type User

type User struct {
	CreatedAt   *int64  `json:"createdAt"`
	Email       *string `json:"email"`
	FamilyName  *string `json:"familyName"`
	GivenName   *string `json:"givenName"`
	ID          *string `json:"id"`
	PhoneNumber *string `json:"phoneNumber"`
	Role        *string `json:"role"` // Roles are group name
	Status      *string `json:"status"`
}

User is a struct describing a Panther User.

type UserItem

type UserItem struct {
	ID *string `json:"id"`
}

UserItem defines the fields in the Users table row.

Jump to

Keyboard shortcuts

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