-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* continued trend of hacking the crap out of gosoap * add basic Retrieve function and definitions to get objects' metadata * added TestRetrieveEvent and TestRetrieveUser to test it * added StructGen method to generate go structs for CvObjects * added definitions files for Contact, Event, Reg and User * updated README with notes on StructGen
- Loading branch information
1 parent
fa73331
commit 4f4b816
Showing
10 changed files
with
517 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
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
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,82 @@ | ||
package gocvent | ||
|
||
// ContactRetrieveResult defines the result wrapper | ||
type ContactRetrieveResult struct { | ||
CvObject Contact `xml:"RetrieveResult>CvObject"` | ||
} | ||
|
||
// Contact defines the CvObject | ||
type Contact struct { | ||
Active bool `xml:"Active,attr"` | ||
ActivityId string `xml:"ActivityId,attr"` | ||
CCEmailAddress string `xml:"CCEmailAddress,attr"` | ||
Company string `xml:"Company,attr"` | ||
ContactType string `xml:"ContactType,attr"` | ||
ContactTypeCode string `xml:"ContactTypeCode,attr"` | ||
CreatedBy string `xml:"CreatedBy,attr"` | ||
CreatedDate string `xml:"CreatedDate,attr"` | ||
DateOfBirth string `xml:"DateOfBirth,attr"` | ||
Designation string `xml:"Designation,attr"` | ||
EmailAddress string `xml:"EmailAddress,attr"` | ||
EmailAddressStatus string `xml:"EmailAddressStatus,attr"` | ||
ExcludedFromEmail bool `xml:"ExcludedFromEmail,attr"` | ||
ExpirationDate string `xml:"ExpirationDate,attr"` | ||
FacebookURL string `xml:"FacebookURL,attr"` | ||
FirstName string `xml:"FirstName,attr"` | ||
Gender string `xml:"Gender,attr"` | ||
HomeAddress1 string `xml:"HomeAddress1,attr"` | ||
HomeAddress2 string `xml:"HomeAddress2,attr"` | ||
HomeAddress3 string `xml:"HomeAddress3,attr"` | ||
HomeCity string `xml:"HomeCity,attr"` | ||
HomeCountry string `xml:"HomeCountry,attr"` | ||
HomeCountryCode string `xml:"HomeCountryCode,attr"` | ||
HomeFax string `xml:"HomeFax,attr"` | ||
HomePhone string `xml:"HomePhone,attr"` | ||
HomePostalCode string `xml:"HomePostalCode,attr"` | ||
HomeState string `xml:"HomeState,attr"` | ||
HomeStateCode string `xml:"HomeStateCode,attr"` | ||
Id string `xml:"Id,attr"` | ||
ImageURL string `xml:"ImageURL,attr"` | ||
IsCreatedViaTestReg bool `xml:"IsCreatedViaTestReg,attr"` | ||
IsObfuscated bool `xml:"IsObfuscated,attr"` | ||
JoinDate string `xml:"JoinDate,attr"` | ||
LastModifiedBy string `xml:"LastModifiedBy,attr"` | ||
LastModifiedDate string `xml:"LastModifiedDate,attr"` | ||
LastName string `xml:"LastName,attr"` | ||
LastOptOutBy string `xml:"LastOptOutBy,attr"` | ||
LastOptOutDate string `xml:"LastOptOutDate,attr"` | ||
LastRenewalDate string `xml:"LastRenewalDate,attr"` | ||
LinkedInURL string `xml:"LinkedInURL,attr"` | ||
LogDate string `xml:"LogDate,attr"` | ||
LogReason string `xml:"LogReason,attr"` | ||
LogResponse string `xml:"LogResponse,attr"` | ||
MembershipCode string `xml:"MembershipCode,attr"` | ||
MiddleName string `xml:"MiddleName,attr"` | ||
MobilePhone string `xml:"MobilePhone,attr"` | ||
NationalIdentificationNumber string `xml:"NationalIdentificationNumber,attr"` | ||
Nickname string `xml:"Nickname,attr"` | ||
OptedIn bool `xml:"OptedIn,attr"` | ||
Pager string `xml:"Pager,attr"` | ||
ParentContactId string `xml:"ParentContactId,attr"` | ||
PassportCountry string `xml:"PassportCountry,attr"` | ||
PassportCountryCode string `xml:"PassportCountryCode,attr"` | ||
PassportNumber string `xml:"PassportNumber,attr"` | ||
PrimaryAddress string `xml:"PrimaryAddress,attr"` | ||
Salutation string `xml:"Salutation,attr"` | ||
SMTPCode string `xml:"SMTPCode,attr"` | ||
SocialSecurityNumber string `xml:"SocialSecurityNumber,attr"` | ||
SourceId string `xml:"SourceId,attr"` | ||
Title string `xml:"Title,attr"` | ||
TwitterURL string `xml:"TwitterURL,attr"` | ||
WorkAddress1 string `xml:"WorkAddress1,attr"` | ||
WorkAddress2 string `xml:"WorkAddress2,attr"` | ||
WorkAddress3 string `xml:"WorkAddress3,attr"` | ||
WorkCity string `xml:"WorkCity,attr"` | ||
WorkCountry string `xml:"WorkCountry,attr"` | ||
WorkCountryCode string `xml:"WorkCountryCode,attr"` | ||
WorkFax string `xml:"WorkFax,attr"` | ||
WorkPhone string `xml:"WorkPhone,attr"` | ||
WorkPostalCode string `xml:"WorkPostalCode,attr"` | ||
WorkState string `xml:"WorkState,attr"` | ||
WorkStateCode string `xml:"WorkStateCode,attr"` | ||
} |
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,70 @@ | ||
package gocvent | ||
|
||
// EventRetrieveResult defines the result wrapper | ||
type EventRetrieveResult struct { | ||
CvObject Event `xml:"RetrieveResult>CvObject"` | ||
} | ||
|
||
// Event defines the CvObject | ||
type Event struct { | ||
ArchiveDate string `xml:"ArchiveDate,attr"` | ||
Capacity string `xml:"Capacity,attr"` | ||
Category string `xml:"Category,attr"` | ||
City string `xml:"City,attr"` | ||
ClosedBy string `xml:"ClosedBy,attr"` | ||
Country string `xml:"Country,attr"` | ||
CountryCode string `xml:"CountryCode,attr"` | ||
CreatedBy string `xml:"CreatedBy,attr"` | ||
Currency string `xml:"Currency,attr"` | ||
EventCalendarAlternateURL string `xml:"EventCalendarAlternateURL,attr"` | ||
EventCalendarCompletedURL string `xml:"EventCalendarCompletedURL,attr"` | ||
EventCalendarLinkText string `xml:"EventCalendarLinkText,attr"` | ||
EventCode string `xml:"EventCode,attr"` | ||
EventDescription string `xml:"EventDescription,attr"` | ||
EventEndDate string `xml:"EventEndDate,attr"` | ||
EventLaunchDate string `xml:"EventLaunchDate,attr"` | ||
EventStartDate string `xml:"EventStartDate,attr"` | ||
EventStatus string `xml:"EventStatus,attr"` | ||
EventTitle string `xml:"EventTitle,attr"` | ||
ExternalAuthentication bool `xml:"ExternalAuthentication,attr"` | ||
Hidden bool `xml:"Hidden,attr"` | ||
Id string `xml:"Id,attr"` | ||
InternalNote string `xml:"InternalNote,attr"` | ||
LastModifiedDate string `xml:"LastModifiedDate,attr"` | ||
Location string `xml:"Location,attr"` | ||
MeetingRequestId string `xml:"MeetingRequestId,attr"` | ||
MerchantAccount string `xml:"MerchantAccount,attr"` | ||
MerchantAccountId string `xml:"MerchantAccountId,attr"` | ||
PhoneNumber string `xml:"PhoneNumber,attr"` | ||
PlannerCompany string `xml:"PlannerCompany,attr"` | ||
PlannerEmailAddress string `xml:"PlannerEmailAddress,attr"` | ||
PlannerFirstName string `xml:"PlannerFirstName,attr"` | ||
PlannerLastName string `xml:"PlannerLastName,attr"` | ||
PlannerPrefix string `xml:"PlannerPrefix,attr"` | ||
PlannerTitle string `xml:"PlannerTitle,attr"` | ||
PlanningStatus string `xml:"PlanningStatus,attr"` | ||
PostalCode string `xml:"PostalCode,attr"` | ||
RSVPbyDate string `xml:"RSVPbyDate,attr"` | ||
StakeholderAddress1 string `xml:"StakeholderAddress1,attr"` | ||
StakeholderAddress2 string `xml:"StakeholderAddress2,attr"` | ||
StakeholderAddress3 string `xml:"StakeholderAddress3,attr"` | ||
StakeholderCity string `xml:"StakeholderCity,attr"` | ||
StakeholderCompany string `xml:"StakeholderCompany,attr"` | ||
StakeholderCountryCode string `xml:"StakeholderCountryCode,attr"` | ||
StakeholderEmailAddress string `xml:"StakeholderEmailAddress,attr"` | ||
StakeholderFirstName string `xml:"StakeholderFirstName,attr"` | ||
StakeholderHomePhone string `xml:"StakeholderHomePhone,attr"` | ||
StakeholderLastName string `xml:"StakeholderLastName,attr"` | ||
StakeholderMobilePhone string `xml:"StakeholderMobilePhone,attr"` | ||
StakeholderPostalCode string `xml:"StakeholderPostalCode,attr"` | ||
StakeholderStateCode string `xml:"StakeholderStateCode,attr"` | ||
StakeholderTitle string `xml:"StakeholderTitle,attr"` | ||
StakeholderWorkFax string `xml:"StakeholderWorkFax,attr"` | ||
StakeholderWorkPhone string `xml:"StakeholderWorkPhone,attr"` | ||
State string `xml:"State,attr"` | ||
StateCode string `xml:"StateCode,attr"` | ||
StreetAddress1 string `xml:"StreetAddress1,attr"` | ||
StreetAddress2 string `xml:"StreetAddress2,attr"` | ||
StreetAddress3 string `xml:"StreetAddress3,attr"` | ||
Timezone string `xml:"Timezone,attr"` | ||
} |
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,45 @@ | ||
package gocvent | ||
|
||
// RegistrationRetrieveResult defines the result wrapper | ||
type RegistrationRetrieveResult struct { | ||
CvObject Registration `xml:"RetrieveResult>CvObject"` | ||
} | ||
|
||
// Registration defines the CvObject | ||
type Registration struct { | ||
CancelledDate string `xml:"CancelledDate,attr"` | ||
CCEmailAddress string `xml:"CCEmailAddress,attr"` | ||
Company string `xml:"Company,attr"` | ||
ConfirmationNumber string `xml:"ConfirmationNumber,attr"` | ||
ContactId string `xml:"ContactId,attr"` | ||
Credit string `xml:"Credit,attr"` | ||
EmailAddress string `xml:"EmailAddress,attr"` | ||
EventCode string `xml:"EventCode,attr"` | ||
EventId string `xml:"EventId,attr"` | ||
EventStartDate string `xml:"EventStartDate,attr"` | ||
EventTitle string `xml:"EventTitle,attr"` | ||
FirstName string `xml:"FirstName,attr"` | ||
GroupId string `xml:"GroupId,attr"` | ||
GroupLeader bool `xml:"GroupLeader,attr"` | ||
Id string `xml:"Id,attr"` | ||
InternalNote string `xml:"InternalNote,attr"` | ||
InvitedBy string `xml:"InvitedBy,attr"` | ||
InviteeId string `xml:"InviteeId,attr"` | ||
IsTestRegistrant bool `xml:"IsTestRegistrant,attr"` | ||
LastModifiedDate string `xml:"LastModifiedDate,attr"` | ||
LastName string `xml:"LastName,attr"` | ||
ModifiedBy string `xml:"ModifiedBy,attr"` | ||
OriginalResponseDate string `xml:"OriginalResponseDate,attr"` | ||
Participant bool `xml:"Participant,attr"` | ||
ReferenceId string `xml:"ReferenceId,attr"` | ||
RegistrationDate string `xml:"RegistrationDate,attr"` | ||
RegistrationType string `xml:"RegistrationType,attr"` | ||
RegistrationTypeCode string `xml:"RegistrationTypeCode,attr"` | ||
ResponseMethod string `xml:"ResponseMethod,attr"` | ||
SourceId string `xml:"SourceId,attr"` | ||
Status string `xml:"Status,attr"` | ||
TargetedListId string `xml:"TargetedListId,attr"` | ||
TargetedListName string `xml:"TargetedListName,attr"` | ||
Title string `xml:"Title,attr"` | ||
WorkPhone string `xml:"WorkPhone,attr"` | ||
} |
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,51 @@ | ||
package gocvent | ||
|
||
// UserRetrieveResult defines the result wrapper | ||
type UserRetrieveResult struct { | ||
CvObject User `xml:"RetrieveResult>CvObject"` | ||
} | ||
|
||
// User defines the CvObject | ||
type User struct { | ||
Active bool `xml:"Active,attr"` | ||
Address1 string `xml:"Address1,attr"` | ||
Address2 string `xml:"Address2,attr"` | ||
Address3 string `xml:"Address3,attr"` | ||
AllEventVisibility bool `xml:"AllEventVisibility,attr"` | ||
AllRFPVisibility bool `xml:"AllRFPVisibility,attr"` | ||
AllSurveyVisibility bool `xml:"AllSurveyVisibility,attr"` | ||
ChangePasswordOnLogin bool `xml:"ChangePasswordOnLogin,attr"` | ||
City string `xml:"City,attr"` | ||
Company string `xml:"Company,attr"` | ||
Country string `xml:"Country,attr"` | ||
CountryCode string `xml:"CountryCode,attr"` | ||
CreatedBy string `xml:"CreatedBy,attr"` | ||
CreatedDate string `xml:"CreatedDate,attr"` | ||
DefaultContactGroupId string `xml:"DefaultContactGroupId,attr"` | ||
Email string `xml:"Email,attr"` | ||
FederatedId string `xml:"FederatedId,attr"` | ||
FirstName string `xml:"FirstName,attr"` | ||
HomeFax string `xml:"HomeFax,attr"` | ||
HomePhone string `xml:"HomePhone,attr"` | ||
Id string `xml:"Id,attr"` | ||
LastLoginDate string `xml:"LastLoginDate,attr"` | ||
LastModifiedBy string `xml:"LastModifiedBy,attr"` | ||
LastModifiedDate string `xml:"LastModifiedDate,attr"` | ||
LastName string `xml:"LastName,attr"` | ||
MobilePhone string `xml:"MobilePhone,attr"` | ||
Pager string `xml:"Pager,attr"` | ||
Password string `xml:"Password,attr"` | ||
Passwordstrong string `xml:"Password (strong),attr"` | ||
PasswordSalt string `xml:"Password Salt,attr"` | ||
PostalCode string `xml:"PostalCode,attr"` | ||
Prefix string `xml:"Prefix,attr"` | ||
State string `xml:"State,attr"` | ||
StateCode string `xml:"StateCode,attr"` | ||
Title string `xml:"Title,attr"` | ||
Username string `xml:"Username,attr"` | ||
UserRole string `xml:"UserRole,attr"` | ||
UserRoleId string `xml:"UserRoleId,attr"` | ||
UserType string `xml:"UserType,attr"` | ||
WorkFax string `xml:"WorkFax,attr"` | ||
WorkPhone string `xml:"WorkPhone,attr"` | ||
} |
Oops, something went wrong.