marketplace

package
v2.0.0-...-345fa11 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PullSecretEndpoint       = "provisioning/v1/rhm-operator/rhm-operator-secret"
	RegistrationEndpoint     = "provisioning/v1/registered-clusters"
	MigrateChildRRS3Endpoint = "provisioning/v1/child-yaml-migration"
	AuthenticationEndpoint   = "subscriptions/api/v1/keys/authentication"
)

endpoints

View Source
const EnvStage = "stage"
View Source
const (
	RegistrationStatusInstalled = "INSTALLED"
)

Variables

This section is empty.

Functions

func GetJWTTokenClaim

func GetJWTTokenClaim(jwtToken string) (*utils.MarketplaceClaims, error)

GetJWTTokenClaims will parse JWT token and fetch the rhmAccountId

func WithBearerAuth

func WithBearerAuth(rt http.RoundTripper, token string) http.RoundTripper

func WithHeader

func WithHeader(rt http.RoundTripper) withHeader

Types

type Auth

type Auth struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	Auth     string `json:"auth"`
}

type EntitlementKey

type EntitlementKey struct {
	Auths map[string]Auth `json:"auths"`
}

type MarketplaceClient

type MarketplaceClient struct {
	// contains filtered or unexported fields
}

func (*MarketplaceClient) GetMarketplaceSecret

func (mhttp *MarketplaceClient) GetMarketplaceSecret() (*corev1.Secret, error)

func (*MarketplaceClient) MigrateChildRRS3

func (mhttp *MarketplaceClient) MigrateChildRRS3(account *MarketplaceClientAccount) error

func (*MarketplaceClient) RegistrationStatus

func (m *MarketplaceClient) RegistrationStatus(account *MarketplaceClientAccount) (RegistrationStatusOutput, error)

func (*MarketplaceClient) RhmAccountExists

func (m *MarketplaceClient) RhmAccountExists() (bool, error)

func (*MarketplaceClient) UnRegister

type MarketplaceClientAccount

type MarketplaceClientAccount struct {
	AccountId   string `json:"accountId"`
	ClusterUuid string `json:"uuid"`
}

type MarketplaceClientBuilder

type MarketplaceClientBuilder struct {
	Url      string
	Insecure bool
}

func NewMarketplaceClientBuilder

func NewMarketplaceClientBuilder(cfg *config.OperatorConfig) *MarketplaceClientBuilder

func (*MarketplaceClientBuilder) NewMarketplaceClient

func (b *MarketplaceClientBuilder) NewMarketplaceClient(
	token string,
	tokenClaims *utils.MarketplaceClaims,
) (*MarketplaceClient, error)

type MarketplaceClientConfig

type MarketplaceClientConfig struct {
	Url      string
	Token    string
	Insecure bool
	Claims   *utils.MarketplaceClaims
}

type RegisteredAccount

type RegisteredAccount struct {
	Id        string `json:"_id"`
	AccountId string
	Uuid      string
	Status    string
}

type RegistrationStatusInput

type RegistrationStatusInput struct {
	MarketplaceClientAccount
}

type RegistrationStatusOutput

type RegistrationStatusOutput struct {
	StatusCode         int
	Registration       *RegisteredAccount
	RegistrationStatus string
	Err                error
}

func (RegistrationStatusOutput) TransformConfigStatus

func (resp RegistrationStatusOutput) TransformConfigStatus() status.Conditions

Jump to

Keyboard shortcuts

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