actions

package
v0.0.0-...-f8e8671 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNameInList

func CheckNameInList(listName []string, name string) bool

func GetAPageSecrets

func GetAPageSecrets(svc *secretsmanager.SecretsManager, token *string, maxResult int64) (*secretsmanager.ListSecretsOutput, error)

func GetAWSCognitoAppName

func GetAWSCognitoAppName() string

func GetAWSCognitoClientID

func GetAWSCognitoClientID() string

func GetAWSCognitoClientSecret

func GetAWSCognitoClientSecret() string

func GetAWSCognitoHost

func GetAWSCognitoHost() string

func GetAWSCognitoRegion

func GetAWSCognitoRegion() string

func GetAWSRegions

func GetAWSRegions() ([]string, error)

func GetFilterNames

func GetFilterNames() []string

func GetListSecrets

func GetListSecrets(region string) ([]*secretsmanager.SecretListEntry, error)

func GetSecretByARN

func GetSecretByARN(region, arn string) (secretsmanager.DescribeSecretOutput, error)

func GetSecretValueByARN

func GetSecretValueByARN(region, arn string) (secretsmanager.GetSecretValueOutput, error)

func UpdateSecretValueBinary

func UpdateSecretValueBinary(region string, arn string, binaryVaue []byte) (secretsmanager.GetSecretValueOutput, error)

func ValidPassword

func ValidPassword(username string, password string) (bool, error)

Types

type Accounts

type Accounts map[string]string

func GetUsers

func GetUsers() (Accounts, error)

type CognitoToken

type CognitoToken struct {
	AccessToken *string `json:"access_token"`
	TokenType   *string `json:"token_type"`
	IDToken     *string `json:"id_token"`
	ExpiresIn   *int64  `json:"expires_in"`
}

func GetAWSCognitoAccessToken

func GetAWSCognitoAccessToken(authCode string) (CognitoToken, error)

type CognitoUserInfo

type CognitoUserInfo struct {
	Sub               string `json:"sub"`
	Name              string `json:"name"`
	GivenName         string `json:"given_name"`
	FamilyName        string `json:"family_name"`
	PreferredUsername string `json:"preferred_username"`
	Email             string `json:"email"`
}

func GetAWSCognitoUserInfo

func GetAWSCognitoUserInfo(accessToken string) (CognitoUserInfo, error)

func (CognitoUserInfo) IsValidEmail

func (c CognitoUserInfo) IsValidEmail() (bool, error)

type LoginClaims

type LoginClaims struct {
	jwt.StandardClaims
}

type Token

type Token struct {
	Token   string    `json:"token"`
	Expiry  int       `json:"expiry"`
	Created time.Time `json:"created"`
}

func GenerateJWTToken

func GenerateJWTToken(data TokenPayload, expiry int) (*Token, error)

type TokenPayload

type TokenPayload struct {
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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