models

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 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"`
}

GetUserInput retrieves a user's information based on id.

type GetUserOutput

type GetUserOutput = User

GetUserOutput returns the Panther user details.

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"`
}

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"`
	InviteUser        *InviteUserInput        `json:"inviteUser"`
	ListUsers         *ListUsersInput         `json:"listUsers"`
	RemoveUser        *RemoveUserInput        `json:"removeUser"`
	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 ListUsersInput added in v0.2.0

type ListUsersInput struct {
	Limit           *int64  `json:"limit" validate:"omitempty,min=1"`
	PaginationToken *string `json:"paginationToken" validate:"omitempty,min=1"`
}

ListUsersInput lists all users in Panther.

type ListUsersOutput added in v0.2.0

type ListUsersOutput struct {
	Users           []*User `json:"users"`
	PaginationToken *string `json:"paginationToken"`
}

ListUsersOutput returns a page of users.

type RemoveUserInput added in v0.2.0

type RemoveUserInput struct {
	ID *string `json:"id" validate:"required,uuid4"`
}

RemoveUserInput deletes a user.

type ResetUserPasswordInput

type ResetUserPasswordInput struct {
	ID *string `json:"id" validate:"required,uuid4"`
}

ResetUserPasswordInput resets the password for a user.

type UpdateUserInput

type UpdateUserInput struct {
	ID *string `json:"id" validate:"required,uuid4"`

	// 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"`
}

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"`
	Status     *string `json:"status"`
}

User is a struct describing a Panther User.

Jump to

Keyboard shortcuts

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