Documentation ¶
Index ¶
- func GetAWSProfile() string
- func GetClientID() string
- func GetPoolID() string
- func GetRegion() string
- func LogError(message string, err error)
- func LogInfo(message string)
- func ValidateConfig() error
- func ValidateRegion(region string) error
- type CognitoClient
- func (c *CognitoClient) CreateGroup(groupName string) error
- func (c *CognitoClient) DeleteGroup(groupName string) error
- func (c *CognitoClient) DeleteUser(userID string) error
- func (c *CognitoClient) DisableUser(userID string) error
- func (c *CognitoClient) EnableUser(userID string) error
- func (c *CognitoClient) GetUserByID(userID string) (*User, error)
- func (c *CognitoClient) ListGroups() ([]string, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAWSProfile ¶
func GetAWSProfile() string
func GetClientID ¶
func GetClientID() string
func ValidateConfig ¶
func ValidateConfig() error
ValidateConfig checks if the config has been initialized.
func ValidateRegion ¶
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.