helpers

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetBaseURLHelper = GetBaseURL

Functions

func CreateJsonMetadata

func CreateJsonMetadata() string

func GenerateBearerTokenHelper

func GenerateBearerTokenHelper(credKeys map[string]interface{}, options BearerTokenOptions) (*internalAuthApi.V1GetAuthTokenResponse, *skyflowError.SkyflowError)

GenerateBearerTokenHelper helper functions

func GenerateSignedDataTokensHelper

func GenerateSignedDataTokensHelper(clientID, keyID string, pvtKey *rsa.PrivateKey, options SignedDataTokensOptions, tokenURI string) ([]SignedDataTokensResponse, *skyflowError.SkyflowError)

Generate signed tokens

func GetBaseURL

func GetBaseURL(urlStr string) (string, *skyflowError.SkyflowError)

func GetCredentialParams

func GetCredentialParams(credKeys map[string]interface{}) (string, string, string, *skyflowError.SkyflowError)

Helper for extracting credentials

func GetPrivateKey

func GetPrivateKey(credKeys map[string]interface{}) (*rsa.PrivateKey, *skyflowError.SkyflowError)

func GetPrivateKeyFromPem

func GetPrivateKeyFromPem(pemKey string) (*rsa.PrivateKey, *skyflowError.SkyflowError)

func GetScopeUsingRoles

func GetScopeUsingRoles(roles []string) string

func GetSignedBearerUserToken

func GetSignedBearerUserToken(clientID, keyID, tokenURI string, pvtKey *rsa.PrivateKey, options BearerTokenOptions) (string, *skyflowError.SkyflowError)

func GetSignedDataTokens

func GetSignedDataTokens(credKeys map[string]interface{}, options SignedDataTokensOptions) ([]SignedDataTokensResponse, *skyflowError.SkyflowError)

Generate and Sign Tokens

func ParseCredentialsFile

func ParseCredentialsFile(credentialsFilePath string) (map[string]interface{}, *skyflowError.SkyflowError)

Helper function to read and parse credentials from file

func ParsePrivateKey

func ParsePrivateKey(pemKey string) (*rsa.PrivateKey, *skyflowError.SkyflowError)

ParsePrivateKey Parse RSA Private Key from PEM

Types

This section is empty.

Jump to

Keyboard shortcuts

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