package edgebsl import ( "time" "edge-infra.dev/pkg/edge/bsl" ) // BslConfig type BslConfig struct { //nolint ActivationSubscriptionURL string RootURI string RootOrg string OrgPrefix string TopLevelProjectID string BslReconcilesInterval string Port string Mode string SQL SQLConfig AccessKey *bsl.AccessKey Client *bsl.Client BasicAuthCreds BslSubscriptionBasicAuth } // Subscription BasicAuth type BslSubscriptionBasicAuth struct { Username string Password string } // BSL Onboarding New Org Subscription Payload type BSLSubscriptionPayload struct { TopicID struct { Name string `json:"name"` } `json:"topicId"` CorrelationID string `json:"correlationId"` MessageID string `json:"messageId"` ReceiptTimeMs int64 `json:"receiptTimeMs"` Attributes []struct { Key string `json:"key"` Value string `json:"value"` } `json:"attributes"` Payload string `json:"payload"` } // EdgeOrgGroup type EdgeOrgGroup struct { GroupName string `json:"groupName"` GroupDescription string `json:"description,omitempty"` } // EdgeOrgGroupMembership type EdgeOrgGroupMembership struct { GroupName string `json:"groupName"` Members []EdgeOrgGroupMember `json:"members"` } // EdgeOrgGroupMember type EdgeOrgGroupMember struct { Username string `json:"username"` } // BFFUserRequest type BFFUserRequest struct { Username string `json:"username"` Email string `json:"email"` FullName string `json:"fullName"` GivenName string `json:"givenName"` FamilyName string `json:"familyName"` TelephoneNumber string `json:"telephoneNumber"` Status string `json:"status"` Address *BFFUserAddress `json:"address"` } type SQLConfig struct { ConnectionName string User string Password string DatabaseName string } // BFFUserAddress type BFFUserAddress struct { City string `json:"city"` Country string `json:"country"` PostalCode string `json:"postalCode"` State string `json:"state"` Street string `json:"street"` } // BFFUserPasswordReset type BFFUserPasswordReset struct { Username string `json:"username"` Password string `json:"password"` } // EnterpriseType type EnterpriseType struct { Name string `json:"name"` Description string `json:"description"` } // EdgeOrgs type EdgeOrgs struct { LastPage bool `json:"lastPage"` PageNumber int `json:"pageNumber"` TotalPages int `json:"totalPages"` TotalResults int `json:"totalResults"` PageContent []EdgeOrgsPageContent `json:"pageContent"` } // AllEdgeOrgs type AllEdgeOrgs struct { PageNumber int `json:"page"` PageContent []AllEdgeOrgsPageContent `json:"data"` } // AllEdgeOrgsPageContent type AllEdgeOrgsPageContent struct { DisplayName string `json:"displayName"` ID string `json:"id"` Parent bool `json:"isParent"` OrganizationName string `json:"name"` FullyQualifiedName string `json:"fullyQualifiedName"` } // EdgeOrgsPageContent type EdgeOrgsPageContent struct { Username string `json:"username"` FullName string `json:"fullyQualifiedName"` Status string `json:"status"` Primary bool `json:"primary"` OrganizationName string `json:"name"` } type OrganizationViewData struct { ID string `json:"id"` Description string `json:"description"` DisplayName string `json:"displayName"` OrganizationName string `json:"organizationName"` Parent bool `json:"parent"` } // BSLRoles type BSLRoles struct { //nolint Groups []EdgeOrgGroup `json:"groups"` Roles []BSLRole `json:"roles"` } // BSLRole type BSLRole struct { //nolint Name string `json:"roleName"` } type GetGroupRolesResponse struct { Content []BSLRole `json:"content"` } // UserID contains username `acct:ncr@jsmith` for creating access key. type UserID struct { Username string `json:"username"` } // AccessKeyRequest request for creating access key. type AccessKeyRequest struct { UserID UserID `json:"userId"` } // AccessKeyResponse response for creating an access key for the specified user. type AccessKeyResponse struct { SharedKey string `json:"sharedKey"` SecretKey string `json:"secretKey"` UserID UserID `json:"userId"` Active bool `json:"active"` CreationTimestamp time.Time `json:"creationTimestamp"` DeactivationTimestamp time.Time `json:"deactivationTimestamp"` } // edgeUser represents the edge user for edge user secret creation. type edgeUser struct { userType string secretName string bffUser bool }