subnet

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 19 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// Constants for subnet configuration
	ConsoleSubnetURL = "CONSOLE_SUBNET_URL"
)

Variables

View Source
var OfflinePublicKeys = []string{
	`-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaK31xujr6/rZ7ZfXZh3SlwovjC+X8wGq
qkltaKyTLRENd4w3IRktYYCRgzpDLPn/nrf7snV/ERO5qcI7fkEES34IVEr+2Uff
JkO2PfyyAYEO/5dBlPh1Undu9WQl6J7B
-----END PUBLIC KEY-----`,
}

Functions

func GenerateRegToken added in v0.14.0

func GenerateRegToken(clusterRegInfo mc.ClusterRegistrationInfo) (string, error)

func GetAPIKey added in v0.19.2

func GetAPIKey(client http.ClientI, token string) (string, error)

func GetClusterRegInfo added in v0.14.0

func GetClusterRegInfo(admInfo madmin.InfoMessage) mc.ClusterRegistrationInfo

func GetLicenseInfoFromJWT

func GetLicenseInfoFromJWT(license string, publicKeys []string) (*licverifier.LicenseInfo, error)

GetLicenseInfoFromJWT will return license metadata from a jwt string license

func GetOrganizations added in v0.14.0

func GetOrganizations(client http.ClientI, token string) ([]*models.SubnetOrganization, error)

func GetSubnetAPIKeyUsingLicense added in v0.34.0

func GetSubnetAPIKeyUsingLicense(lic string) (string, error)

func LogWebhookURL added in v0.24.0

func LogWebhookURL() string

func UploadAuthHeaders added in v0.26.0

func UploadAuthHeaders(apiKey string) map[string]string

func UploadURL added in v0.26.0

func UploadURL(uploadType string, filename string) string

Types

type LicenseTokenConfig added in v0.14.0

type LicenseTokenConfig struct {
	APIKey  string
	License string
	Proxy   string
}

func Register added in v0.14.0

func Register(client http.ClientI, admInfo madmin.InfoMessage, apiKey, token, accountID string) (*LicenseTokenConfig, error)

type LoginResp added in v0.14.0

type LoginResp struct {
	AccessToken string
	MfaToken    string
}

func Login added in v0.14.0

func Login(client http.ClientI, username, password string) (*LoginResp, error)

func LoginWithMFA added in v0.14.0

func LoginWithMFA(client http.ClientI, username, mfaToken, otp string) (*LoginResp, error)

type MfaReq added in v0.14.0

type MfaReq struct {
	Username string `json:"username"`
	OTP      string `json:"otp"`
	Token    string `json:"token"`
}

MfaReq - JSON payload of the SUBNET mfa api

Jump to

Keyboard shortcuts

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