utils

package
v0.0.0-...-e4dda8d Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const INCORRECT_USERNAME_PASSWD = "Incorrect user name or password"

Variables

View Source
var ACCEPT_APPLICATION_JSON = "ACCEPT_APPLICATION_JSON"
View Source
var ACCOUNT_ID = "ACCOUNT_ID"
View Source
var AMAZON_COGNITO = ".amazoncognito.com"
View Source
var APIGATEWAYURL = "API_GATEWAY_URL"
View Source
var AUTH = ".auth."
View Source
var BASE_URL = "BASE_URL"
View Source
var LOG_LEVEL = "LOG_LEVEL"
View Source
var REGION = "REGION"
View Source
var Rainmaker_Oauth2_Authorize_URL = "Rainmaker_Oauth2_Authorize_URL"
View Source
var Rainmaker_Oauth2_Email_URL = "Rainmaker_Oauth2_Email_URL"
View Source
var Rainmaker_Oauth2_Token_URL = "Rainmaker_Oauth2_Token_URL"
View Source
var Rainmaker_Oauth2_UserInfo_URL = "Rainmaker_Oauth2_UserInfo_URL"
View Source
var STAGE_NAME = "STAGE_NAME"
View Source
var TIME_TO_LIVE = "TIME_TO_LIVE"

Functions

func DbCreateItem

func DbCreateItem(dbhandle *dynamodb.DynamoDB, table_name string, v interface{}) error

func DbGetItem

func DbGetItem(dbhandle *dynamodb.DynamoDB, table_name string, query interface{}, out interface{}) error

The entire composite key: Primary + Range Key must be used

func DbQuery

func DbQuery(dbhandle *dynamodb.DynamoDB, tableName, indexName string, limit int64, startKey map[string]*dynamodb.AttributeValue, expr expression.Expression, out interface{}) (error, map[string]*dynamodb.AttributeValue)

Query based on some conditions on the composite keys

func GetAcceptApplicationJson

func GetAcceptApplicationJson() string

func GetAccountId

func GetAccountId() string

func GetApiGatewayHostURL

func GetApiGatewayHostURL() string

func GetAppClientId

func GetAppClientId() string

func GetBaseApi

func GetBaseApi() string

func GetCliErrRespObject

func GetCliErrRespObject(status int, errorText string) events.APIGatewayProxyResponse

func GetCognitoUser

func GetCognitoUser(cognitoAccessToken string) (models.AccessTokenHeader, error)

func GetDomain

func GetDomain(userPoolId string) (string, error)

func GetDynamoDbConnectionByRegion

func GetDynamoDbConnectionByRegion() *dynamodb.DynamoDB

func GetIDPAccessTokenURL

func GetIDPAccessTokenURL() string

func GetIDPAuthorizeURL

func GetIDPAuthorizeURL() string

func GetIDPUserEmailsURL

func GetIDPUserEmailsURL() string

func GetIDPUserURL

func GetIDPUserURL() string

func GetLambdaEnv

func GetLambdaEnv(funtionName string) (*lambda.EnvironmentResponse, error)

func GetLogLevel

func GetLogLevel() string

func GetRegion

func GetRegion() string

func GetRespObject

func GetRespObject(status int, v interface{}) events.APIGatewayProxyResponse

func GetServErrRespObject

func GetServErrRespObject(errorText string) events.APIGatewayProxyResponse

func GetStageName

func GetStageName() string

func GetTimeToLive

func GetTimeToLive() string

func GetUserPoolId

func GetUserPoolId() string

func IsSuperAdmin

func IsSuperAdmin(accessToken string) (bool, error)

func LogDebug

func LogDebug(args ...string)

func LogError

func LogError(args ...string)

func LogInfo

func LogInfo(args ...string)

func LogWarn

func LogWarn(args ...string)

func TenantGetContext

func TenantGetContext() (models.TenantContext, error)

func TenantGetDBName

func TenantGetDBName(tenctx models.TenantContext, table string) string

func UpdateLambdaEnv

func UpdateLambdaEnv(funtionName string, environment *lambda.EnvironmentResponse) error

func UserDBGetByName

func UserDBGetByName(tenctx models.TenantContext, userName string) (models.UserDetails, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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