Documentation
¶
Index ¶
- func GenerateInstanceId(length int) string
- func GetAttribute(attributes []types.AttributeType, attributeName string) string
- func GetHostname() string
- func GetUserAttributeString(attributes []types.AttributeType, attributeName string) string
- func Int32Ptr(i int32) *int32
- func MakeAttribute(key, value string) types.AttributeType
- func MakeVolumeMounts() []corev1.VolumeMount
- func MakeVolumes(pvcName string) []corev1.Volume
- func MapSubscriptionStatus(status string) stripe.SubscriptionStatus
- type Crypto
- type PasswordConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateInstanceId ¶
GenerateInstanceId Generates a unique alphanumeric instance id with a given length. This is used to ensure deployments, and PVC's in the same namespace do not have conflicts. It is also used to generate a unique id for a playfab for the dedicated src so that multiple servers can run on a single port.
func GetAttribute ¶
func GetAttribute(attributes []types.AttributeType, attributeName string) string
GetAttribute Returns the string value for a given attribute name from Cognito.
func GetHostname ¶
func GetHostname() string
func GetUserAttributeString ¶
func GetUserAttributeString(attributes []types.AttributeType, attributeName string) string
func MakeAttribute ¶
func MakeAttribute(key, value string) types.AttributeType
MakeAttribute Creates a Cognito attribute that can be persisted.
func MakeVolumeMounts ¶
func MakeVolumeMounts() []corev1.VolumeMount
MakeVolumeMounts Creates the PVC volume mount locations for the deployment pod. These volume mounts are the only places files can be installed that will persist outside the life of the src.
func MakeVolumes ¶
MakeVolumes creates the volumes that will be mounted for both the src deployment and any file installation jobs.
func MapSubscriptionStatus ¶
func MapSubscriptionStatus(status string) stripe.SubscriptionStatus
Types ¶
type Crypto ¶
type Crypto struct {
// contains filtered or unexported fields
}
func MakeCrypto ¶
func MakeCrypto() *Crypto
func (*Crypto) GeneratePassword ¶
func (c *Crypto) GeneratePassword(config PasswordConfig) (string, error)
GeneratePassword generates a cryptographically secure password
func (*Crypto) MakeCognitoSecretHash ¶
MakeCognitoSecretHash Creates a hash based on the user id, service id and secret which must be sent with every cognito auth request (along with a refresh token) to get a new access token.