tenantmapping

package
v0.0.0-...-6d13c91 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindKeyPath

func FindKeyPath(json interface{}, targetKey string) string

func NewCurrentPath

func NewCurrentPath(currentPath, key string) string

Types

type AssignedTenant

type AssignedTenant struct {
	State                string          `json:"state"`
	AssignmentID         string          `json:"uclAssignmentId"`
	DeploymentRegion     string          `json:"deploymentRegion"`
	ApplicationNamespace string          `json:"applicationNamespace"`
	ApplicationURL       string          `json:"applicationUrl"`
	ApplicationTenantID  string          `json:"applicationTenantId"`
	SubaccountID         string          `json:"subaccountId"`
	Subdomain            string          `json:"subdomain"`
	SystemName           string          `json:"uclSystemName"`
	SystemTenantID       string          `json:"uclSystemTenantId"`
	Configuration        json.RawMessage `json:"configuration"`
}

AssignedTenant is a structure used to JSON decode the assignedTenant in the Body

type Body

type Body struct {
	Context        Context        `json:"context"`
	ReceiverTenant ReceiverTenant `json:"receiverTenant"`
	AssignedTenant AssignedTenant `json:"assignedTenant"`
}

Body is a structure used to JSON decode the request body sent to the adapter handler

func (*Body) AddReceiverTenantOutboundCommunicationIfMissing

func (b *Body) AddReceiverTenantOutboundCommunicationIfMissing() error

func (*Body) GetTenantCommunication

func (b *Body) GetTenantCommunication(tenantType TenantType, communicationType string) gjson.Result

GetTenantCommunication returns the Body tenant(Receiver or Assigned) communication(inbound or outbound)

func (*Body) String

func (b *Body) String() string

String prints the data in the tenant mapping request body excepts the configuration part because it could have sensitive data. We should NOT include the configuration in this method.

func (*Body) Validate

func (b *Body) Validate() error

Validate validates the request Body

type Context

type Context struct {
	Platform        string `json:"platform"`
	CrmID           string `json:"crmId"`
	AccountID       string `json:"accountId"`
	FormationID     string `json:"uclFormationId"`
	FormationName   string `json:"uclFormationName"`
	FormationTypeID string `json:"uclFormationTypeId"`
	Operation       string `json:"operation"`
}

Context is a structure used to JSON decode the context in the Body

func (Context) Validate

func (c Context) Validate() error

Validate validates the Body's Context

type ReceiverTenant

type ReceiverTenant struct {
	State                string          `json:"state"`
	AssignmentID         string          `json:"uclAssignmentId"`
	DeploymentRegion     string          `json:"deploymentRegion"`
	ApplicationNamespace string          `json:"applicationNamespace"`
	ApplicationURL       string          `json:"applicationUrl"`
	ApplicationTenantID  string          `json:"applicationTenantId"`
	SubaccountID         string          `json:"subaccountId"`
	Subdomain            string          `json:"subdomain"`
	SystemName           string          `json:"uclSystemName"`
	SystemTenantID       string          `json:"uclSystemTenantId"`
	Configuration        json.RawMessage `json:"configuration"`
}

ReceiverTenant is a structure used to JSON decode the receiverTenant in the Body

func (ReceiverTenant) Validate

func (rt ReceiverTenant) Validate() error

Validate validates the Body's ReceiverTenant

type TenantType

type TenantType int
const (
	AssignedTenantType TenantType = iota
	ReceiverTenantType
)

Jump to

Keyboard shortcuts

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