-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pipeline demo * Demo Pipeline Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Based on PR Review Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Models Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Models done * Package JSON change Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Package JSON change Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Package JSON change Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>
- Loading branch information
1 parent
502dda1
commit e6953c6
Showing
1 changed file
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
package pipeline | ||
|
||
type ActionOps int | ||
|
||
const ( | ||
Insert ActionOps = 1 + iota | ||
Skip | ||
Delete | ||
Update | ||
) | ||
|
||
// | ||
type Result struct { | ||
// Meta for Zip file info | ||
Meta Meta `json:"meta"` | ||
|
||
// ParsedResult for Orgs, Users | ||
ParsedResult ParsedResult `json:"parsed_result"` | ||
} | ||
|
||
type Meta struct { | ||
// StageResults holds Skipped instances | ||
StageResults []StageResult `json:"stage_results"` | ||
|
||
// ZipFile for zip file location | ||
ZipFile string `json:"zip_file"` | ||
|
||
// UnzipFolder for unzipped folder's location | ||
UnzipFolder string `json:"unzip_folder"` | ||
} | ||
|
||
type StageResult struct { | ||
StageName string `json:"stage_name"` | ||
IsSuccess bool `json:"is_success"` | ||
Failure error `json:"failure"` | ||
} | ||
|
||
type ParsedResult struct { | ||
// Orgs array | ||
Orgs []Org `json:"orgs"` | ||
|
||
// Users array | ||
Users []User `json:"users"` | ||
|
||
// OrgsUsers for Orgs and Users associations | ||
OrgsUsers []OrgsUsersAssociations `json:"orgs_users_associations"` | ||
} | ||
|
||
// OrgsUsersAssociations | ||
type OrgsUsersAssociations struct { | ||
// OrgName | ||
OrgName Org `json:"org_name"` | ||
|
||
// Users UserAssociation slice | ||
Users []UserAssociation `json:"user_association"` | ||
} | ||
type UserAssociation struct { | ||
// Username | ||
Username string `json:"username"` | ||
|
||
// IsAdmin | ||
IsAdmin bool `json:"is_admin"` | ||
} | ||
|
||
type KeyDump struct { | ||
ID string `json:"id"` | ||
AuthzID string `json:"authz_id"` | ||
Username string `json:"username"` | ||
Email string `json:"email"` | ||
PubkeyVersion int `json:"pubkey_version"` | ||
PublicKey interface{} `json:"public_key"` | ||
SerializedObject string `json:"serialized_object"` | ||
LastUpdatedBy string `json:"last_updated_by"` | ||
CreatedAt string `json:"created_at"` | ||
UpdatedAt string `json:"updated_at"` | ||
ExternalAuthenticationUID interface{} `json:"external_authentication_uid"` | ||
RecoveryAuthenticationEnabled interface{} `json:"recovery_authentication_enabled"` | ||
Admin bool `json:"admin"` | ||
HashedPassword interface{} `json:"hashed_password"` | ||
Salt interface{} `json:"salt"` | ||
HashType interface{} `json:"hash_type"` | ||
} | ||
|
||
type Org struct { | ||
|
||
// Org Name | ||
Name string `json:"name"` | ||
|
||
// FullName | ||
FullName string `json:"full_name"` | ||
|
||
// ActionOps for Insert Skip Update and Delete | ||
ActionOps ActionOps `json:"guid"` | ||
} | ||
|
||
type User struct { | ||
Username string `json:"username"` | ||
Email string `json:"email"` | ||
DisplayName string `json:"display_name"` | ||
FirstName string `json:"first_name"` | ||
LastName string `json:"last_name"` | ||
MiddleName string `json:"middle_name"` | ||
|
||
// AutomateUsername is ldap username | ||
AutomateUsername string `json:"automate_username"` | ||
|
||
// Connector ldap user | ||
Connector string `json:"connector"` | ||
|
||
// IsConflicting for user's existance in db | ||
IsConflicting bool `json:"is_conflicting"` | ||
|
||
// IsAdmin (user is admin or not) | ||
IsAdmin bool `json:"is_admin"` | ||
} |