cloudoreg

package
v0.0.0-...-c5ff3dd Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderRHIdentity             = "x-rh-identity"
	HeaderRHSourcesAccountNumber = "x-rh-sources-account-number"
	HeaderRHSourcesOrgID         = "x-rh-sources-org-id"
	HeaderEventType              = "event_type"
	SOURCES_RESOURCE_TYPE        = "Application"
)

Variables

View Source
var (
	AvailabilityStatusMap = map[bool]string{
		// contains filtered or unexported fields
	}
)

Functions

func DefaultCloudoregConfig

func DefaultCloudoregConfig() *config.Config

func ForwardableMessageHeaders

func ForwardableMessageHeaders(msg *kafka.Message) []kafka.Header

func HeadersAsMap

func HeadersAsMap(msg *kafka.Message) map[string]kafka.Header

func LogKafka

func LogKafka(logChan chan kafka.LogEvent)

Types

type ApplicationAuthenticationCreate

type ApplicationAuthenticationCreate struct {
	ID               json.Number `json:"id"`
	CreatedAt        string      `json:"created_at"`
	UpdatedAt        string      `json:"updated_at"`
	PausedAt         string      `json:"paused_at"`
	ApplicationID    json.Number `json:"application_id"`
	AuthenticationID json.Number `json:"authentication_id"`
	Tenant           string      `json:"tenant"`
}

type Cloudoreg

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

func NewCloudoreg

func NewCloudoreg(ctx context.Context, config *config.Config) (*Cloudoreg, error)

func (*Cloudoreg) ConsumeAndProcess

func (c *Cloudoreg) ConsumeAndProcess(ctx context.Context)

func (*Cloudoreg) ProcessApplicationAuthenticationCreate

func (c *Cloudoreg) ProcessApplicationAuthenticationCreate(ctx context.Context,
	appAuth *ApplicationAuthenticationCreate, ebsAccount, orgID string) (bool, error)

ProcessApplicationAuthenticationCreate validates the source and establishes the trust at rhsm-api cloudaccess side

func (*Cloudoreg) ProcessSourceEventMessage

func (c *Cloudoreg) ProcessSourceEventMessage(ctx context.Context, msg *kafka.Message)

func (*Cloudoreg) Produce

func (c *Cloudoreg) Produce(applicationId string, available bool, err error, headers []kafka.Header) error

func (*Cloudoreg) Run

func (c *Cloudoreg) Run(ctx context.Context)

func (*Cloudoreg) VerifyAccountAccess

func (c *Cloudoreg) VerifyAccountAccess(awsARN arn.ARN) (bool, error)

Jump to

Keyboard shortcuts

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