utils

package
v0.0.0-...-e984f34 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineShares

func CombineShares(shares [][]byte) ([]byte, error)

CombineShares combines the shares to reconstruct the master key

func Contains

func Contains(actions []string, action string) bool

func ConvertCertificateToPEM

func ConvertCertificateToPEM(certDER []byte) string

ConvertCertificateToPEM converts a DER encoded certificate to PEM format

func ConvertPrivateKeyToPEM

func ConvertPrivateKeyToPEM(privateKey interface{}) (string, error)

ConvertPrivateKeyToPEM converts a private key to PEM format

func GeneratePassword

func GeneratePassword() string

func GenerateUsername

func GenerateUsername() string

func MD5Checksum

func MD5Checksum(data []byte) string

func ScanForSecrets

func ScanForSecrets(text string) []string

ScanForSecrets scans the given text and returns potential secrets

func ToInt

func ToInt(i string) int

func ToInt64

func ToInt64(i string) int64

Types

type AppRoleIdentity

type AppRoleIdentity struct {
	AppRoleID string
	RoleName  string
}

func (AppRoleIdentity) GetAuthType

func (a AppRoleIdentity) GetAuthType() string

func (AppRoleIdentity) GetGroups

func (a AppRoleIdentity) GetGroups() []string

func (AppRoleIdentity) GetID

func (a AppRoleIdentity) GetID() string

func (AppRoleIdentity) GetUsername

func (a AppRoleIdentity) GetUsername() string

type Identity

type Identity interface {
	GetID() string
	GetUsername() string
	GetAuthType() string
	GetGroups() []string
}

type UserIdentity

type UserIdentity struct {
	UserID   string
	Username string
	Groups   []string
}

func (UserIdentity) GetAuthType

func (u UserIdentity) GetAuthType() string

func (UserIdentity) GetGroups

func (u UserIdentity) GetGroups() []string

func (UserIdentity) GetID

func (u UserIdentity) GetID() string

func (UserIdentity) GetUsername

func (u UserIdentity) GetUsername() string

Jump to

Keyboard shortcuts

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