internal

package
v0.0.0-...-b21e963 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSProfile

func GetAWSProfile() string

func GetClientID

func GetClientID() string

func GetPoolID

func GetPoolID() string

func GetRegion

func GetRegion() string

func LogError

func LogError(message string, err error)

LogError logs an error with the logger.

func LogInfo

func LogInfo(message string)

LogInfo logs an informational message with the logger.

func ValidateConfig

func ValidateConfig() error

ValidateConfig checks if the config has been initialized.

func ValidateRegion

func ValidateRegion(region string) error

Types

type CognitoClient

type CognitoClient struct {
	// contains filtered or unexported fields
}

CognitoClient is a struct that holds the Cognito service client.

func NewCognitoClient

func NewCognitoClient() (*CognitoClient, error)

NewCognitoClient creates a new CognitoClient instance.

func (*CognitoClient) CreateGroup

func (c *CognitoClient) CreateGroup(groupName string) error

CreateGroup creates a new group in the Cognito user pool.

func (*CognitoClient) DeleteGroup

func (c *CognitoClient) DeleteGroup(groupName string) error

DeleteGroup deletes a group by its name.

func (*CognitoClient) DeleteUser

func (c *CognitoClient) DeleteUser(userID string) error

DeleteUser deletes a user from Amazon Cognito by their Cognito user ID.

func (*CognitoClient) DisableUser

func (c *CognitoClient) DisableUser(userID string) error

DisableUser disables a user in Amazon Cognito by their Cognito user ID.

func (*CognitoClient) EnableUser

func (c *CognitoClient) EnableUser(userID string) error

EnableUser enables a user in Amazon Cognito by their Cognito user ID.

func (*CognitoClient) GetUserByID

func (c *CognitoClient) GetUserByID(userID string) (*User, error)

GetUserByID retrieves user details by their Cognito user ID.

func (*CognitoClient) ListGroups

func (c *CognitoClient) ListGroups() ([]string, error)

ListGroups retrieves a list of all available groups.

type User

type User struct {
	Username       string
	UserAttributes []*cognitoidentityprovider.AttributeType
	Status         string
}

User holds user attributes, username, and status.

Jump to

Keyboard shortcuts

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